案例一:删除某一个文件
# rm <file>
案例二:删除某一个目录以及目录里的所有文件
# rm -r <directory>
案例三:非交互式删除某一个目录以及目录里的所有文件
# rm -rf <directory>
案例四:非交互式删除当前目录下的所有隐藏文件
# rm -rf .#*
案例五:非交互式删除所有特定后缀名称的文件
# rm -rf *txt
(补充:这里以非交互式删除所有以 txt 作为后缀名称的文件为例)
# rm <file>
# rm -r <directory>
# rm -rf <directory>
# rm -rf .#*
# rm -rf *txt
(补充:这里以非交互式删除所有以 txt 作为后缀名称的文件为例)
# convert <input options> <output file name> <output options> <output file name>
# convert "a.png" "a.png.jpg"
(补充:这里以将 a.png 转换成 a.png.jpg 为例)
# ls -1 *.png | xargs -n 1 bash -c 'convert "$0" "${0%.png}.jpg"'
(补充:这里以将当前目录下的所有 *.png 文件转换成 *.png.jpg 文件)
/boot >= 5G
/var/tmp >= 10G
/tmp >= 10G
swap >= 2G
/ all remaining space
/boot Use standard partition
/var/tmp Use logical partition
/tmp Use logical partition
swap Use logical partition
/ Use logical partition
/boot xfs
/var/tmp xfs
/tmp xfs
swap swap
/ xfs
/boot defaults
/var/tmp rw,nosuid,nodev,noexec,relatime,strictatime
/tmp rw,nosuid,nodev,noexec,relatime,strictatime
swap defaults
/ defaults
/boot/efi >= 5G
/var/tmp >= 10G
/tmp >= 10G
swap >= 2G
/ all remaining space
/boot/efi Use standard partition
/var/tmp Use logical partition
/tmp Use logical partition
swap Use logical partition
/ Use logical partition
/boot/efi vfat
/var/tmp xfs
/tmp xfs
swap swap
/ xfs
/boot/efi defaults
/var/tmp rw,nosuid,nodev,noexec,relatime,strictatime
/tmp rw,nosuid,nodev,noexec,relatime,strictatime
swap defaults
/ defaults
/boot >= 5G
/var/tmp >= 10G
/tmp >= 10G
swap >= 2G
/ all remaining space
/boot Use standard partition
/var/tmp Use logical partition
/tmp Use logical partition
swap Use logical partition
/ Use logical partition
/boot xfs
/var/tmp xfs
/tmp xfs
swap swap
/ xfs
/boot defaults
/var/tmp rw,nosuid,nodev,noexec,relatime,strictatime
/tmp rw,nosuid,nodev,noexec,relatime,strictatime
swap defaults
/ defaults
/boot/efi >= 5G
/var/tmp >= 10G
/tmp >= 10G
swap >= 2G
/ all remaining space
/boot/efi Use standard partition
/var/tmp Use logical partition
/tmp Use logical partition
swap Use logical partition
/ Use logical partition
/boot/efi vfat
/var/tmp xfs
/tmp xfs
swap swap
/ xfs
/boot/efi defaults
/var/tmp rw,nosuid,nodev,noexec,relatime,strictatime
/tmp rw,nosuid,nodev,noexec,relatime,strictatime
swap defaults
/ defaults
# find / -type f \( -perm -1000 -o -perm -2000 -o -perm -4000 \) -print