df 用來顯示當(dāng)前的系統(tǒng)磁盤情況德撬。
root@ubuntu:~# df -ah
df: ‘/mnt/hgfs’: Protocol error
Filesystem Size Used Avail Use% Mounted on
sysfs 0 0 0 - /sys
proc 0 0 0 - /proc
udev 970M 4.0K 970M 1% /dev
devpts 0 0 0 - /dev/pts
tmpfs 196M 1.5M 195M 1% /run
/dev/sda1 18G 3.8G 13G 23% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 0 0 0 - /sys/fs/fuse/connections
none 0 0 0 - /sys/kernel/debug
none 0 0 0 - /sys/kernel/security
none 5.0M 0 5.0M 0% /run/lock
none 980M 144K 980M 1% /run/shm
none 100M 36K 100M 1% /run/user
none 0 0 0 - /sys/fs/pstore
systemd 0 0 0 - /sys/fs/cgroup/systemd
vmware-vmblock 0 0 0 - /run/vmblock-fuse
gvfsd-fuse 0.0K 0.0K 0.0K - /run/user/112/gvfs
du 命令顯示大小
root@ubuntu:~# du -ah
4.0K ./cats.txt
4.0K ./herpets.txt
0 ./nohup.out
8.0K ./.viminfo
4.0K ./pets.txt
4.0K ./.profile
4.0K ./.selected_editor
4.0K ./.vim/.netrwhist
8.0K ./.vim
4.0K ./html.txt
12K ./.bash_history
0 ./1n/2.txt
4.0K ./1n/2/3/4/5
8.0K ./1n/2/3/4
12K ./1n/2/3
16K ./1n/2
0 ./1n/1.txt
20K ./1n
4.0K ./.bashrc
4.0K ./pet.txt
0 ./1/2.txt
4.0K ./1/2/3/4/5
8.0K ./1/2/3/4
12K ./1/2/3
16K ./1/2
0 ./1/1.txt
20K ./1
4.0K ./web.txt
4.0K ./my.txt
1.1M ./1.txt
1.2M .
查看分區(qū)掛載
root@ubuntu:~# df -h
df: ‘/mnt/hgfs’: Protocol error
Filesystem Size Used Avail Use% Mounted on
udev 970M 4.0K 970M 1% /dev
tmpfs 196M 1.5M 195M 1% /run
/dev/sda1 18G 3.8G 13G 23% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 980M 144K 980M 1% /run/shm
none 100M 36K 100M 1% /run/user