Linux:目录&文件基本操作

- 表示上一次所在目录,~ 通常表示当前用户的"home"目录。使用 pwd 命令可以获取当前所在路径(绝对路径)。


新建文件:touch test
创建目录:mkdir -p father/son/grandson
复制文件:cp test father/son/grandson
复制目录:cp -r father family
删除文件:rm test
删除目录:rm -f test
移动文件:mv file1 Documents
重命名文件:mv file1 myfile
输出文件内容:cat -n passwd、nl passwd
查看文件:more、less 、head -n 10 passwd、tail -n 10 -f passwd
查看文件类型:file passwd

posted on 2015-09-19 22:07  幸福框架  阅读(432)  评论(0编辑  收藏  举报

导航

我要啦免费统计