What is the unix command to see how much disk spac

2019-03-17 18:24发布

I'm looking for the equivalent of right clicking on the drive in windows and seeing the disk space used and remaining info.

10条回答
何必那么认真
2楼-- · 2019-03-17 18:52

I love doing du -sh * | sort -nr | less to sort by the largest files first

查看更多
爷的心禁止访问
3楼-- · 2019-03-17 18:52

All these answers are superficially correct. However, the proper answer is

 apropos disk   # And pray your admin maintains the whatis database

because asking questions the answers of which lay at your fingertips in the manual wastes everybody's time.

查看更多
贪生不怕死
4楼-- · 2019-03-17 18:53
df -g .

Option g for Size in GBs Block and . for current working directory.

查看更多
萌系小妹纸
5楼-- · 2019-03-17 18:54

su -sm ./*

You can see every file and folder size (-sm=Mb ; -sk=Kb) in the current directory like a list. This way runs in all Unix/Linux environment.

查看更多
爷、活的狠高调
6楼-- · 2019-03-17 18:56

Use the df command:

df -h

查看更多
地球回转人心会变
7楼-- · 2019-03-17 18:56
df -tk

for Disk Free size in 1024 byte blocks

查看更多
登录 后发表回答