bio07@ecm-cefa:~$ pwd
/home/bio07
bio07@ecm-cefa:~$ mkdir project #存放生信项目
bio07@ecm-cefa:~$ mkdir tmp #存放杂七杂八
bio07@ecm-cefa:~$ mkdir src #存放源代码
bio07@ecm-cefa:~$ mkdir biosoft #存放生信软件
bio07@ecm-cefa:~$ ls
project src tmp biosoft
bio07@ecm-cefa:~$ rm biosoft
rm: cannot remove 'biosoft': Is a directory #biosoft不是一个文件
bio07@ecm-cefa:~$ rm -r biosoft #或者 rmdir biosoft
bio07@ecm-cefa:~$ ls
project src tmp
#删除文件 rm
#删除空目录 rmdir
#删除非空目录 rm -r
bio07@ecm-cefa:~$ cd tmp #改变工作路径到tmp
bio07@ecm-cefa:~/tmp$ pwd
/home/bio07/tmp
bio07@ecm-cefa:~/tmp$ cd - #回到主目录
/home/bio07
bio07@ecm-cefa:~$ mkdir rm_test
bio07@ecm-cefa:~$ cd rm_test
bio07@ecm-cefa:~/rm_test$ touch doodle.txt #touch为新建文件命令
bio07@ecm-cefa:~/rm_test$ rm doodle.txt #删除doodle.txt文件
bio07@ecm-cefa:~/rm_test$ mkdir huahua
bio07@ecm-cefa:~/rm_test$ cd huahua
bio07@ecm-cefa:~/rm_test/huahua$ touch haha.txt #新建haha.txt,总结rm_test里面有huahua,huahua里面有haha.txt
bio07@ecm-cefa:~/rm_test/huahua$ cd #返回主目录
bio07@ecm-cefa:~$ ls
biosoft project rm_test src tmp
bio07@ecm-cefa:~$ cd rm_test
bio07@ecm-cefa:~/rm_test$ ls
huahua
bio07@ecm-cefa:~/rm_test$ rm huahua
rm: cannot remove 'huahua': Is a directory
bio07@ecm-cefa:~/rm_test$ rmdir huahua
rmdir: failed to remove 'huahua': Directory not empty #huahua里面有文件haha.txt
bio07@ecm-cefa:~/rm_test$ rm -r huahua
bio07@ecm-cefa:~/rm_test$ ls
bio07@ecm-cefa:~$ rmdir rm_test
bio07@ecm-cefa:~$ ls
biosoft project src tmp
bio07@ecm-cefa:~$ cd tmp
bio07@ecm-cefa:~/tmp$ vi hello_world.txt
hello world
my name is gigi, i`m here to learn something about the world.
We know the program is so difficult to learn, and we can change our mind to think about it.
The R has many rules and we may not deal with it, we should learn how to use the search engine to solve our problems.We can also ask somebody else for help.
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
5,0-1
:x 退出并保存
esc先退出编辑模式
bio07@ecm-cefa:~/tmp$ cat hello_world.txt
hello world
my name is gigi, i`m here to learn something about the world.
We know the program is so difficult to learn, and we can change our mind to think about it.
The R has many rules and we may not deal with it, we should learn how to use the search engine to solve our problems.We can also ask somebody else for help.
bio07@ecm-cefa:~/tmp$ head -n3 hello_world.txt
hello world
my name is gigi, i`m here to learn something about the world.
We know the program is so difficult to learn, and we can change our mind to think about it.
bio07@ecm-cefa:~/tmp$ cp hello_world.txt new_file.txt #将hello_world.txt复制文件为new_file.txt
bio07@ecm-cefa:~/tmp$ mv new_file.txt home.txt #将new_file.txt名字换成home.txt
bio07@ecm-cefa:~/tmp$ mv home.txt ~ #移动home.txt到主目录中
bio07@ecm-cefa:~/tmp$ cd #回到主目录中
bio07@ecm-cefa:~$ ls
biosoft home.txt project src tmp
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 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. 腾讯云 版权所有