In this post, we will use the du command. This command does estimate file space usage; and It will summarize disk usage of each FILE, recursively for directories.
The description on the arguments we will use.
-h, —human-readable print sizes in human readable format (e.g., 1K 234M 2G) -s, —summarize display only a total for each argument
1 2 3 | #Summarize the current folder size. 11:33:57-androidyue~/googlecode$ du -sh 85M . |
---|
1 2 | 11:34:03-androidyue~/googlecode$ du -sh apps-for-android/ 11M apps-for-android/ |
---|
1 2 3 4 5 6 | 11:35:17-androidyue~/googlecode$ ls | xargs du -sh 11M apps-for-android 22M depot_tools 740K _gclient_src_fo4RrR 42M gerrit 11M reviewboard-read-only |
---|
More detailed information
ls – list directory contents Description:List information about the FILEs (the current directory by default) xargs – build and execute command lines from standard input