1:cp /var/log/wtmp .
将..复制到当前目录
2:cp -r /etc/ /tmp
将etc目录下内容全部复制到tmp下面(必须加r)
3:cp -u 目标 目的
当有差异的时候复制
4:rm
-f 强制删除
-i 交互删除
-r递归删除
5:mv
-f 强制移动
-i 若存在,询问
-u 源文件新,更新
6:cat
-A完整显示,包含特殊字符
-E显示换行符
-n显示行号
-T显示tab键
-v列出看不见的字符
7:nl显示文件并添加行号
8:more一页一页的显示文件
空格翻页
回车翻行
:f 文件名及当前行号
q 离开more
9:less跟more相似。可以向前翻页(pagedown)
10:head -n 显示文件前几行
11:tail -n 显示文件后几行
寻找文件
12:which 寻找执行命令
-a 所有的命令
13:whereis
-b 只找二进制
-m 只找帮助路径下的文件
-s 只找源文件
-u 没有帮助文件的文件
14:locate fileName
15:find命令