1. Du command: du -sh * View the file size in the current directory
Two, add swap partition
mkswap /dev/sdb1
free -m
swapon / dev / sdb1
free -m
vim /etc/fstab
/dev/sdb1 swap swap defaults 0 0
3. Disk capacity quota
redhat 5/6 usrquota redhat 7/8 uquota
mount | grep /boot
xfs_quota -x -c 'limit bsoft=3m bhard=6m isoft=3 ihard=6 abc' /boot
edquota -u abc
Four, soft and hard way link
Soft link (symbolic link): equivalent to a shortcut in windows, delete the original file, the link file becomes invalid.
Hard link: the original file is deleted and the new file can be used normally
ln command: used to create a link file, the format is "In [option] target".
Parameters: -s (soft link), without -s (hard link)
ln -s ini.cfg 1.cfg ln ini.cfg 1.cfg
Five, RAID (Redundant Array of Independent Disks)
RAID 0 RAID 1 RAID 5 RAID 10
mdadm command: used to manage software RAID disk array in Linux system, the format is "mdadm [mode] <RAID device name> [option] [member device name]"
Parameters: -a (test device name); -n (specify the number of devices); -l (specify RAID level); -C (create); -v (display process); -f (simulate equipment damage); -r ( Remove device); -Q (view summary information); -D (view detailed information); -S (stop RAID disk array)
mdadm -Cv /dev/md0 -a yes -n 4 -l 10 /dev/sd[b-e]