zoukankan      html  css  js  c++  java
  • Show information of directory or disk

    There are so many commands of Ubuntu, we just need to know useful and high-frequency commands. I have collected a little common commands which may be  useful for you in the future.

    Check the size of directory

    sudo df -h #show the current info of partitions
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda2        40G  2.9G   35G   8% /
    udev            2.0G  4.0K  2.0G   1% /dev
    tmpfs           790M  864K  789M   1% /run
    none            5.0M     0  5.0M   0% /run/lock
    none            2.0G  152K  2.0G   1% /run/shm
    none            100M   40K  100M   1% /run/user
    sudo du
    /home/pinxiong/ --max-depth=1 -h #show the first-level sub-directory info in directory '/home/pinxiong' 4.0K /home/pinxiong/Templates 43M /home/pinxiong/.mozilla 4.0K /home/pinxiong/Pictures 32K /home/pinxiong/.gconf 32K /home/pinxiong/.pulse 4.0K /home/pinxiong/Downloads 12K /home/pinxiong/.mission-control 444K /home/pinxiong/.local 120K /home/pinxiong/.config 4.0K /home/pinxiong/Public 4.0K /home/pinxiong/Videos 4.0K /home/pinxiong/Documents 12K /home/pinxiong/.dbus 716K /home/pinxiong/.cache 4.0K /home/pinxiong/Music 4.0K /home/pinxiong/Desktop 8.0K /home/pinxiong/.gnome2 44M /home/pinxiong/
    sudo du
    /home/pinxiong/ -sh #show the size of directory '/home/pinxiong' 44M /home/pinxiong/
  • 相关阅读:
    斐波那契数列
    用两个栈实现队列
    从尾到头打印链表
    HDOJ5877(dfs序+离散化+树状数组)
    HDOJ5876(补图的最短路)
    POJ3090(欧拉函数)
    POJ2478(欧拉函数)
    POJ2407(欧拉函数)
    POJ2142(扩展欧几里得)
    POJ3020(最小边覆盖)
  • 原文地址:https://www.cnblogs.com/pinxiong/p/3690174.html
Copyright © 2011-2022 走看看