从命令行检查Ubuntu上的磁盘使用情况

Ubuntu Linux, like all unix varieties, includes the du command line utility. du stands for Disk Usage, as I’m sure you assumed.

与所有unix变种一样,Ubuntu Linux也包含du命令行实用程序。 我敢肯定,du代表“磁盘使用率”。

Go ahead, just type the command in your home directory:

继续,只需在您的主目录中键入命令:

geek@ubuntu-desktop:~$ du 8 ./.gconf/desktop/gnome/accessibility/keyboard 12 ./.gconf/desktop/gnome/accessibility 8 ./.gconf/desktop/gnome/screen/default/0 12 ./.gconf/desktop/gnome/screen/default 16 ./.gconf/desktop/gnome/screen 8 ./.gconf/desktop/gnome/font_rendering 40 ./.gconf/desktop/gnome 44 ./.gconf/desktop 8 ./.gconf/apps/panel/applets/clock_screen0/prefs 16 ./.gconf/apps/panel/applets/clock_screen0 8 ./.gconf/apps/panel/applets/trashapplet_screen0 8 ./.gconf/apps/panel/applets/workspace_switcher_screen0/prefs 16 ./.gconf/apps/panel/applets/workspace_switcher_screen0

geek @ ubuntu-desktop:〜$ du 8 ./.gconf/desktop/gnome/accessibility/keyboard 12 ./.gconf/desktop/gnome/accessibility 8 ./.gconf/desktop/gnome/screen/default/0 12。 /.gconf/desktop/gnome/screen/default 16 ./.gconf/desktop/gnome/screen 8 ./.gconf/desktop/gnome/font_rendering 40 ./.gconf/desktop/gnome 44 ./.gconf/desktop 8 ./.gconf/apps/panel/applets/clock_screen0/prefs 16 ./.gconf/apps/panel/applets/clock_screen0 8 ./.gconf/apps/panel/applets/trashapplet_screen0 8 .... gconf / apps / apps / panel / applets / workspace_switcher_screen0 / prefs 16 ./.gconf/apps/panel/applets/workspace_switcher_screen0

It shows you a very verbose output by default, which isn’t always extremely useful. Thankfully it also includes a lot of extra options.

默认情况下,它向您显示非常详细的输出,但并非总是非常有用。 值得庆幸的是,它还包含许多额外的选项。

To find the total size of files and folders in our current directory, listed by MB:

要查找当前目录中文件和文件夹的总大小(按MB列出):

geek@ubuntu-desktop:~$ du -s -m * 1 Desktop 0 Examples 17 VMwareTools-5.5.2-29772.tar.gz

怪胎@ ubuntu-desktop:〜$ du -s -m * 1桌面0示例17 VMwareTools-5.5.2-29772.tar.gz

Now we are getting somewhere. That’s some pretty useful output.

现在我们到了某个地方。 这是一些非常有用的输出。

翻译自: https://www.howtogeek.com/howto/ubuntu/check-your-disk-usage-on-ubuntu-from-the-command-line/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值