




pwd # 显示当前路径
bio02@ecm-cefa:~$ pwd
/home/bio02mkdir # 创建目录
bio02@ecm-cefa:~$ mkdir hello #新建hello目录ls # 显示列表
bio02@ecm-cefa:~$ ls
biosoft hello project src tmp #除了四个已有目录,新增一个hello目录rm # 删文件
rmdir # 删空目录
rm -r # 删非空目录(删除统一展示了,如下,因为不会随意切换目录,导致删除要挨个进入目录删)
bio02@ecm-cefa:~$ rm -r tmp
bio02@ecm-cefa:~$ mkdir tmp
bio02@ecm-cefa:~$ cd tmp
bio02@ecm-cefa:~/tmp$ mkdir rm\_test
bio02@ecm-cefa:~/tmp$ cd rm\_test
bio02@ecm-cefa:~/tmp/rm\_test$ mkdir huahua
bio02@ecm-cefa:~/tmp/rm\_test$ cd huahua
bio02@ecm-cefa:~/tmp/rm\_test/huahua$ touch doodle.txt
bio02@ecm-cefa:~/tmp/rm\_test/huahua$ rm doodle.txt
bio02@ecm-cefa:~/tmp/rm\_test/huahua$ cd
bio02@ecm-cefa:~$ cd tmp
bio02@ecm-cefa:~/tmp$ cd rm\_test
bio02@ecm-cefa:~/tmp/rm\_test$ rmdir huahua
bio02@ecm-cefa:~/tmp/rm\_test$ cd
bio02@ecm-cefa:~$ cd tmp
bio02@ecm-cefa:~/tmp$ rmdir rm\_test
bio02@ecm-cefa:~/tmp$ cd # 进入目录
bio02@ecm-cefa:~$ cd tmpvi # 建脚本或文档
bio02@ecm-cefa:~/tmp/new$ vi hello\_world.txtcat # 查看文档并展示到屏幕
bio02@ecm-cefa:~/tmp/new$ cat hello\_world.txt
i today is a good day,i meet my boyfriend,he is older than me,he finished his work then meet me.we have a good time.head # 输出前十行(然而我只发挥了一行)
bio02@ecm-cefa:~/tmp/new$ head hello\_world.txt
i today is a good day,i meet my boyfriend,he is older than me,he finished his work then meet me.we have a good time.tail # 输出后十行(如上括号所言)
bio02@ecm-cefa:~/tmp/new$ tail hello\_world.txt
i today is a good day,i meet my boyfriend,he is older than me,he finished his work then meet me.we have a good time.head -n # 数字 自定义输出几行
bio02@ecm-cefa:~/tmp/new$ head -n 2 hello\_world.txt
i today is a good day,i meet my boyfriend,he is older than me,he finished his work then meet me.we have a good time.cp # 复制
bio02@ecm-cefa:~/tmp/new$ cp hello\_world.txt hello\_boymv # 移动
bio02@ecm-cefa:~/tmp/new$ mv hello\_world.txt tmp
bio02@ecm-cefa:~/tmp/new$ 
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。