Home > bioinformatics, Linux > Size of directory tree

Size of directory tree

February 14th, 2012

This is a simple script for Linux to check size of a directory and sub-directories :

1. check size of a current directory with sub-directories:

du –block-size=M  | sort  -n

2. check size of /home/user/alex directory with sub-directories:

du –block-size=M   /home/user/alex | sort  -n

3. check size of /home/user/alex directory with depth=2 sub-directories:

du –block-size=M  –max-depth=2  /home/user/alex | sort  -n

 

 

bioinformatics, Linux ,

  1. No comments yet.