1.
查看历史使用的命令history
2.
切换目录
cd ~桌面
cd ..
cd -
3.
查看文件
cat小文件
more
tail -f动态刷新
搜索文件内容
cut -d: -f1 /etc/passwd 以:为间隔符 提取第1列
wc -l 行数
wc -c列数
wc -w单词个数
find / -name fstab全盘搜索文件名为fstab的文件
find / -user ibeifeng
diff --brief a.txt b.txt
diff -c a.txt b.txt
touch -d "20:12" filename黑客
4.
cp -r dirname
重定向
ls -l a.txt > res.txt只输出正确信息
ls -l a.txt >> res.txt只输出正确信息
ls -l wwwaaa > res.txt只输出错误信息
ls -l asd &> res.txt输出所有信息
管道符
1.统计目录的文件个数
ls -l /etc | wc -l
2.重置密码
echo 123456 | passwd --stdin ibeifeng
echo 'uptime'
echo $(uptime)
自定义命令
alias mycommand1="...."
vi编辑器
末行模式
set nu