Determine total size of directory

questions, answers, problems, reviews, ...
.:: Preferred language(s): english
.:: Permissions: everybody
Post Reply
User avatar
geohei
Site Admin
Posts: 3388
Joined: Tuesday, 19.11.2002 07:56
Location: Luxembourg
Contact:

Determine total size of directory

Post by geohei »

Show total size of my_directory in bytes, KB, MB, GB, TB and human readable format.

Code: Select all

root@ganymede:/media/raid# du -sB1 my_directory
2150891474944   my_directory
root@ganymede:/media/raid# du -sBK my_directory
2100479956K     my_directory
root@ganymede:/media/raid# du -sBM my_directory
2051250M        my_directory
root@ganymede:/media/raid# du -sBG my_directory
2004G   my_directory
root@ganymede:/media/raid# du -sBT my_directory
2T      my_directory
root@ganymede:/media/raid# du -sh my_directory
2.0T    my_directory
Image
Post Reply