Last active
January 17, 2019 23:33
-
-
Save shau-lok/21f005007b57df818fae3f110f8cc4dd to your computer and use it in GitHub Desktop.
terminal-du,df
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get current dir size! | |
$ du -sh | |
>>> 224M . | |
# get specific file (logs) size! | |
$ du -sh logs | |
>>> 2.7M logs | |
# get disk useage | |
$ df -h | |
>>> | |
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on | |
/dev/disk1s1 113Gi 94Gi 14Gi 88% 2520858 9223372036852254949 0% / | |
devfs 187Ki 187Ki 0Bi 100% 648 0 100% /dev | |
/dev/disk1s4 113Gi 4.0Gi 14Gi 23% 4 9223372036854775803 0% /private/var/vm | |
map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net | |
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home | |
# get each folder size | |
$ du -h -d 1 | |
>>> | |
➜ github.com du -h -d 1 | |
6.3M ./nikto | |
72M ./google-io-2014-compat | |
28K ./personal | |
162M ./RengwuxianRxjava | |
60M ./shadowsocks-mac-dmg | |
60M ./JJSearchViewAnim | |
34M ./MyApplication | |
27M ./platform_packages_apps_mms | |
35M ./JazzyListView |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment