pwd # 显示当前路径
bio02@ecm-cefa:~$ pwd
/home/bio02
mkdir # 创建目录
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 tmp
vi # 建脚本或文档
bio02@ecm-cefa:~/tmp/new$ vi hello\_world.txt
cat # 查看文档并展示到屏幕
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\_boy
mv # 移动
bio02@ecm-cefa:~/tmp/new$ mv hello\_world.txt tmp
bio02@ecm-cefa:~/tmp/new$
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有