代码语言:Linux复制
pwd
bio06@ecm-cefa:~$ mkdir biosof
bio06@ecm-cefa:~$ mkdir biosoft
bio06@ecm-cefa:~$ mkdir tmp
bio06@ecm-cefa:~$ mkdir src
bio06@ecm-cefa:~$ mkdir project
bio06@ecm-cefa:~$ ls
biosof biosoft project src tmp
bio06@ecm-cefa:~$ cd tmp
bio06@ecm-cefa:~/tmp$ pwd
/home/bio06/tmp
bio06@ecm-cefa:~/tmp$ cd -
/home/bio06
bio06@ecm-cefa:~$ cd tmp
bio06@ecm-cefa:~/tmp$ cd ~
bio06@ecm-cefa:~$ mkdir rm_test
bio06@ecm-cefa:~$ cd rm_test
bio06@ecm-cefa:~/rm_test$ touch doodle.txt
bio06@ecm-cefa:~/rm_test$ mkdir huahua
bio06@ecm-cefa:~/rm_test$ cd huahua
bio06@ecm-cefa:~/rm_test/huahua$ touch haha.txt
bio06@ecm-cefa:~/rm_test/huahua$ cd -
/home/bio06/rm_test
bio06@ecm-cefa:~/rm_test$ cd ~
bio06@ecm-cefa:~$ cd -
/home/bio06/rm_test
bio06@ecm-cefa:~/rm_test$ rm doodle.txt
bio06@ecm-cefa:~/rm_test$ rm-r huahua
rm-r: command not found
bio06@ecm-cefa:~/rm_test$ rm -r huahua
bio06@ecm-cefa:~/rm_test$ cd ~
bio06@ecm-cefa:~$ rm -f rm_test
rm: cannot remove 'rm_test': Is a directory
bio06@ecm-cefa:~$ rmdir rm_test
bio06@ecm-cefa:~$ cd tmp
bio06@ecm-cefa:~/tmp$ vi hello_world.txt
bio06@ecm-cefa:~/tmp$ cat hello_world.txt
i feel happy today
bio06@ecm-cefa:~/tmp$ cd
bio06@ecm-cefa:~$ cd -
/home/bio06/tmp
bio06@ecm-cefa:~/tmp$ head hello_world.txt
i feel happy today
bio06@ecm-cefa:~/tmp$ head -n1 hello_world.txt
i feel happy today
bio06@ecm-cefa:~/tmp$ cp hello_world.txt new_file.txt
bio06@ecm-cefa:~/tmp$ mv new_file.txt home.txt
bio06@ecm-cefa:~/tmp$ mv home.txt ~
bio06@ecm-cefa:~/tmp$ cd ~
bio06@ecm-cefa:~$ ls
biosoft home.txt project src tmp
bio06@ecm-cefa:~$