An example using "du"
Updated: Oct6,2019

The "du" command can be used easily for some things:



% pwd 
/home/sco/tmp
% ls 
A1/  A2/  disk_survey.parlab  disk_survey.table  

# print sizes in unit of Kbytes of everything from here on down the full tree 
% du -s --block-size=M . 
 

# print sizes in unit of Mbytes 
% du -s --block-size=M * 
3M	A1
2M	A2
1M	disk_survey.parlab
1M	disk_survey.table
1M	junk.fp
1M	list.1
1M	list.10
1M	My_list.subdirs

# print sizes in unit of Kbytes 
% du -s --block-size=K * 
2072K	A1
1036K	A2
4K	disk_survey.parlab
4K	disk_survey.table
4K	junk.fp
4K	list.1
4K	list.10
4K	My_list.subdirs


This approach is often very simple and fast.




Back to calling page