常用命令
#ls 命令
根据日期降序排列
ls -lht --time-style=long-iso
根据日期升序排列
ls -lhtr --time-style=long-iso
根据文件大小降序
ls -lhS
根据文件大小升序
ls -lhSr
#head
head -n -2 file
除了后面2行,其余都列出来
#tail
tail -n +3 file
从第3行(包含第3行)以后都会列出来
#vi命令
首行注释: 1,6s/^/#/g 首行解除注释:1,6s/^#//g
显示行号:set nu 取消行号:set nonu
查看系统版本
lsb_release -a
cat /etc/os-release
浙公网安备 33010602011771号