df 支持的命令参数简介linux
[root@imx6ull:~]# df [-PkmhT] [目录或档名] 选项与参数: -k :以 KBytes 的容量显示各档案系统; -m :以 MBytes 的容量显示各档案系统; -h :以人们较易阅读的 GBytes, MBytes, KBytes 等格式自行显示; -T :连同该 partition 的 filesystem 名称 (例如 ext3) 也列出;
root@mys6ull14x14:/# df Filesystem 1K-blocks Used Available Use% Mounted on ubi0:rootfs 213084 53776 154472 26% / devtmpfs 123340 4 123336 0% /dev tmpfs 123556 120 123436 0% /run tmpfs 123556 56 123500 0% /var/volatile root@mys6ull14x14:/# df -h Filesystem Size Used Available Use% Mounted on ubi0:rootfs 208.1M 52.5M 150.9M 26% / devtmpfs 120.4M 4.0K 120.4M 0% /dev tmpfs 120.7M 120.0K 120.5M 0% /run tmpfs 120.7M 56.0K 120.6M 0% /var/volatile root@mys6ull14x14:/# df -hT Filesystem Type Size Used Available Use% Mounted on ubi0:rootfs ubifs 208.1M 52.5M 150.9M 26% / devtmpfs devtmpfs 120.4M 4.0K 120.4M 0% /dev tmpfs tmpfs 120.7M 120.0K 120.5M 0% /run tmpfs tmpfs 120.7M 56.0K 120.6M 0% /var/volatile
输出结果提示信息含义简介。web
df 读取的资料整个文件系统的统计信息,在显示的结果中你须要特别留意的是那个根目录(/dev/root)的剩余容量。全部的资料都是由根目录衍生出来的,当根目录的剩余容量剩下 0 时,那你的 Linux 存储空间确定不够了。shell
du 命令支持参数简介bash
[root@imx6ull:~]# du [-aHLdclsxhmk] 文件或目录名称 选项与参数: -a 同时显示每一个文件的文件大小 -d N 将输出限制为深度<N 的目录 -c 显示总计 -s 每一个参数仅显示总计 -x 跳过不一样文件系统上的目录 -h 可读格式的大小(例如 1K 243M 2G) -m 大小(以兆字节为单位) -k 大小(以千字节为单位)(默认)
root@mys6ull14x14:/etc# du 0 ./apm/other.d 0 ./apm/scripts.d 0 ./apm/resume.d 0 ./apm/event.d 0 ./apm/suspend.d 4 ./apm 4 ./rpm/sysinfo 8 ./rpm 328 ./ssh 8 ./skel 24 ./udev/rules.d 8 ./udev/scripts 0 ./udev/mount.blacklist.d 44 ./udev 0 ./network/if-down.d 8 ./network/if-pre-up.d 0 ./network/if-post-down.d 0 ./network/if-up.d 12 ./network 32 ./iproute2 4 ./modprobe.d 188 ./init.d 20 ./default/volatiles 48 ./default 4 ./terminfo/a 4 ./terminfo/d 4 ./terminfo/l 4 ./terminfo/r 12 ./terminfo/s 16 ./terminfo/v 12 ./terminfo/x 56 ./terminfo 8 ./avahi/services 16 ./avahi 8 ./bluetooth 8 ./libnl 4 ./udhcpc.d 4 ./ofono 0 ./rc0.d 0 ./rc1.d 0 ./rc2.d 0 ./rc3.d 0 ./rc4.d 0 ./rc5.d 0 ./rc6.d 0 ./rcS.d 0 ./depmod.d 20 ./dbus-1/system.d 28 ./dbus-1 96 ./firmware 4 ./profile.d 1108 .
root@mys6ull14x14:/etc# du -ah 4.0K ./apm/apmd_proxy 0 ./apm/other.d 0 ./apm/scripts.d 0 ./apm/resume.d 0 ./apm/event.d 0 ./apm/suspend.d 4.0K ./apm 4.0K ./rpc 4.0K ./rpm/sysinfo/Dirnames 4.0K ./rpm/sysinfo 4.0K ./rpm/platform 8.0K ./rpm 4.0K ./ssh/sshd_config 4.0K ./ssh/ssh_host_dsa_key 4.0K ./ssh/ssh_host_rsa_key.pub 4.0K ./ssh/ssh_host_ecdsa_key.pub 296.0K ./ssh/moduli 4.0K ./ssh/ssh_host_rsa_key 0 ./ssh/ssh_host_dsa_key.pub 0 ./ssh/ssh_host_ed25519_key.pub 4.0K ./ssh/sshd_config_readonly 0 ./ssh/ssh_host_ed25519_key 4.0K ./ssh/ssh_config 4.0K ./ssh/ssh_host_ecdsa_key 328.0K ./ssh 4.0K ./nsswitch.conf 4.0K ./rpcbind.conf 4.0K ./passwd- 0 ./motd 0 ./mtab 4.0K ./skel/.bashrc 4.0K ./skel/.profile 8.0K ./skel 4.0K ./udev/rules.d/automount.rules 0 ./udev/rules.d/80-net-name-slot.rules 4.0K ./udev/rules.d/10-imx.rules 4.0K ./udev/rules.d/autonet.rules 4.0K ./udev/rules.d/50-firmware.rules 4.0K ./udev/rules.d/localextra.rules 4.0K ./udev/rules.d/local.rules 24.0K ./udev/rules.d 4.0K ./udev/udev.conf 4.0K ./udev/cache.data 4.0K ./udev/scripts/mount.sh 4.0K ./udev/scripts/network.sh 8.0K ./udev/scripts 0 ./udev/mount.blacklist.d 4.0K ./udev/mount.blacklist 44.0K ./udev 4.0K ./group- 4.0K ./busybox.links.nosuid 4.0K ./shadow- 4.0K ./network/interfaces 0 ./network/if-down.d 4.0K ./network/if-pre-up.d/nfsroot 4.0K ./network/if-pre-up.d/wpa-supplicant 8.0K ./network/if-pre-up.d 0 ./network/if-post-down.d/wpa-supplicant 0 ./network/if-post-down.d 0 ./network/if-up.d/ntpdate-sync 0 ./network/if-up.d 12.0K ./network 8.0K ./ld.so.cache 4.0K ./iproute2/rt_protos 4.0K ./iproute2/nl_protos 4.0K ./iproute2/group 4.0K ./iproute2/rt_realms 4.0K ./iproute2/rt_scopes 4.0K ./iproute2/rt_tables 4.0K ./iproute2/rt_dsfield 4.0K ./iproute2/ematch_map 32.0K ./iproute2 4.0K ./modprobe.d/blacklist.conf 4.0K ./modprobe.d 8.0K ./init.d/rc 4.0K ./init.d/rcS 4.0K ./init.d/apmd 4.0K ./init.d/halt 4.0K ./init.d/sshd 8.0K ./init.d/udev 4.0K ./init.d/save-rtc.sh 4.0K ./init.d/modutils.sh 4.0K ./init.d/read-only-rootfs-hook.sh 0 ./init.d/stop-bootlogd 4.0K ./init.d/alsa-state 4.0K ./init.d/bootmisc.sh 8.0K ./init.d/avahi-daemon 4.0K ./init.d/umountfs 4.0K ./init.d/functions.initscripts 4.0K ./init.d/run-postinsts 4.0K ./init.d/mountnfs.sh 0 ./init.d/functions 4.0K ./init.d/alignment.sh 4.0K ./init.d/syslog.busybox 4.0K ./init.d/rmnologin.sh 4.0K ./init.d/devpts.sh 4.0K ./init.d/hostname.sh 4.0K ./init.d/bluetooth 4.0K ./init.d/udev-cache 4.0K ./init.d/reboot 4.0K ./init.d/banner.sh 4.0K ./init.d/neard 4.0K ./init.d/ofono 4.0K ./init.d/sysfs.sh 4.0K ./init.d/mountall.sh 4.0K ./init.d/bootlogd 4.0K ./init.d/single 4.0K ./init.d/sendsigs 4.0K ./init.d/checkroot.sh 4.0K ./init.d/dmesg.sh 4.0K ./init.d/psplash.sh 0 ./init.d/syslog 4.0K ./init.d/hwclock.sh 8.0K ./init.d/populate-volatile.sh 4.0K ./init.d/urandom 4.0K ./init.d/rc.local 4.0K ./init.d/dbus-1 4.0K ./init.d/umountnfs.sh 4.0K ./init.d/rpcbind 4.0K ./init.d/networking 188.0K ./init.d 4.0K ./issue.net 4.0K ./hostname 4.0K ./default/rcS 4.0K ./default/apmd 0 ./default/usbd 4.0K ./default/volatiles/00_core 4.0K ./default/volatiles/01_bootlogd 4.0K ./default/volatiles/99_dbus 4.0K ./default/volatiles/99_sshd 4.0K ./default/volatiles/99_wpa_supplicant 20.0K ./default/volatiles 4.0K ./default/udev-cache 4.0K ./default/postinst 4.0K ./default/ntpdate 4.0K ./default/useradd 4.0K ./default/devpts 48.0K ./default 4.0K ./securetty 8.0K ./udev-cache.tar.gz 4.0K ./busybox.links.suid 4.0K ./limits 0 ./syslog-startup.conf 4.0K ./terminfo/a/ansi 4.0K ./terminfo/a 4.0K ./terminfo/d/dumb 4.0K ./terminfo/d 4.0K ./terminfo/l/linux 4.0K ./terminfo/l 4.0K ./terminfo/r/rxvt 4.0K ./terminfo/r 4.0K ./terminfo/s/sun 4.0K ./terminfo/s/screen-256color 4.0K ./terminfo/s/screen 12.0K ./terminfo/s 4.0K ./terminfo/v/vt52 4.0K ./terminfo/v/vt100 4.0K ./terminfo/v/vt102 4.0K ./terminfo/v/vt200 16.0K ./terminfo/v 4.0K ./terminfo/x/xterm-color 4.0K ./terminfo/x/xterm-256color 4.0K ./terminfo/x/xterm-xfree86 0 ./terminfo/x/xterm 12.0K ./terminfo/x 56.0K ./terminfo 4.0K ./netconfig 4.0K ./filesystems 4.0K ./syslog-startup.conf.busybox 4.0K ./passwd 4.0K ./gshadow- 4.0K ./avahi/avahi-daemon.conf 4.0K ./avahi/hosts 4.0K ./avahi/services/ssh.service 4.0K ./avahi/services/sftp-ssh.service 8.0K ./avahi/services 16.0K ./avahi 4.0K ./fstab 4.0K ./bluetooth/input.conf 4.0K ./bluetooth/network.conf 8.0K ./bluetooth 4.0K ./group 4.0K ./hosts 4.0K ./issue 4.0K ./libnl/pktloc 4.0K ./libnl/classid 8.0K ./libnl 4.0K ./udhcpc.d/50default 4.0K ./udhcpc.d 4.0K ./ofono/phonesim.conf 4.0K ./ofono 4.0K ./inittab 4.0K ./inputrc 0 ./depmod.d 4.0K ./host.conf 4.0K ./shadow 4.0K ./shells 4.0K ./wpa_supplicant.conf 12.0K ./login.defs 4.0K ./gshadow 4.0K ./syslog.conf.busybox 4.0K ./protocols 4.0K ./version 4.0K ./login.access 8.0K ./volatile.cache 0 ./syslog.conf 4.0K ./rc.local 0 ./ld.so.conf 4.0K ./dbus-1/system.d/avahi-dbus.conf 4.0K ./dbus-1/system.d/ofono.conf 4.0K ./dbus-1/system.d/bluetooth.conf 4.0K ./dbus-1/system.d/org.neard.conf 4.0K ./dbus-1/system.d/dbus-wpa_supplicant.conf 20.0K ./dbus-1/system.d 4.0K ./dbus-1/system.conf 4.0K ./dbus-1/session.conf 28.0K ./dbus-1 16.0K ./firmware/BCM43430A1.1DX.hcd 44.0K ./firmware/BCM43341B0.1BW.hcd 36.0K ./firmware/BCM4335C0.ZP.hcd 96.0K ./firmware 0 ./resolv.conf 4.0K ./profile 4.0K ./asound.conf 4.0K ./logrotate-dmesg.conf 4.0K ./profile.d/tslib.sh 4.0K ./profile.d 4.0K ./ts.conf 4.0K ./timestamp 20.0K ./services 1.1M .
root@mys6ull14x14:/# du -sm /*
2 /bin
7 /boot
0 /dev
1 /etc
0 /home
10 /lib
0 /media
0 /mnt
0 /proc
0 /run
2 /sbin
0 /sys
0 /tmp
65 /usr
0 /var
root@mys6ull14x14:/etc# du -d 1 4 ./apm 8 ./rpm 328 ./ssh 8 ./skel 44 ./udev 12 ./network 32 ./iproute2 4 ./modprobe.d 188 ./init.d 48 ./default 56 ./terminfo 16 ./avahi 8 ./bluetooth 8 ./libnl 4 ./udhcpc.d 4 ./ofono 0 ./rc0.d 0 ./rc1.d 0 ./rc2.d 0 ./rc3.d 0 ./rc4.d 0 ./rc5.d 0 ./rc6.d 0 ./rcS.d 0 ./depmod.d 28 ./dbus-1 96 ./firmware 4 ./profile.d 1108 .
(1)lsmod:列出已经安装了哪些模块
提示信息含义说明:session
root@mys6ull14x14:/etc# lsmod
Module Size Used by
8188eu 758318 0
这里显示有个模块:8188euless
(2)insmod:手工安装模块dom
(3)remod:卸载某个已经安装的模块ssh
(4)modinfo:查看某个模块的详细信息svg
# modinfo [-adlpn0Fkbvh] <模块文件> -a 或--author 显示模块开发人员。 -d 或--description 显示模块的说明。 -l 或—license 显示版本信息 -p 或--parameters 显示模块所支持的参数。 -0 或--null 用 \0 代替 \n -F 或--field=FIELD 仅打印提供的字段 -k 或--set-version=VERSION 用 VERSION 代替 `uname -r` -b 或--basedir=DIR 使用 DIR 做为/lib/modules 的文件系统根目录 -V 或--version 显示版本信息 -h 或--help 显示帮助信息
前面有显示了有个模块8188eu工具
root@mys6ull14x14:/etc# modinfo -d 8188eu
Realtek Wireless Lan Driver
(5)modprobe:自动安装模块