目录
1. ls 指令
2. pwd指令
3. cd 指令
root@hcss-ecs-78b3:/# cd /root
root@hcss-ecs-78b3:~# pwd
/root
root@hcss-ecs-78b3:~# cd .
root@hcss-ecs-78b3:~# pwd
/root
root@hcss-ecs-78b3:~# cd ..
root@hcss-ecs-78b3:/# pwd
/
root@hcss-ecs-78b3:/#
4. touch指令
root@hcss-ecs-78b3:~# touch hello.txt
root@hcss-ecs-78b3:~# pwd
/root
root@hcss-ecs-78b3:~# ls
hello.txt
5. mkdir指令
root@hcss-ecs-78b3:~# mkdir kiana
root@hcss-ecs-78b3:~# ll
total 116
drwx------ 12 root root 4096 Oct 15 11:03 ./
drwxr-xr-x 24 root root 4096 Oct 15 09:32 ../
drwx------ 3 root root 4096 Jul 22 2023 .ansible/
drwxr-xr-x 2 root root 4096 Jul 22 2023 .ansible_async/
-rw-r--r-- 1 root root 298 Oct 15 10:15 .bash_history
-rw-r--r-- 1 root root 3144 Jul 22 2023 .bashrc
drwx------ 2 root root 4096 Feb 10 2023 .cache/
drwxr-xr-x 7 root root 4096 Jul 22 2023 docker-library/
-rw-r--r-- 1 root root 21926 Jul 22 2023 get-docker.sh
-rw-r--r-- 1 root root 1326 Jul 21 2023 githubclone.sh
-rw------- 1 root root 0 Feb 10 2023 .history
-rwxr-xr-x 1 root root 15353 Jul 22 2023 HSSInstall*
drwxr-xr-x 2 root root 4096 Oct 15 11:03 kiana/
-rw------- 1 root root 20 Oct 15 10:11 .lesshst
drwxr-xr-x 8 root root 4096 Jul 22 2023 library/
drwxr-xr-x 3 root root 4096 Oct 15 09:29 .local/
-rw-r--r-- 1 root root 161 Jul 9 2019 .profile
drwx------ 4 root root 4096 Jul 22 2023 snap/
drwx------ 2 root root 4096 Oct 11 19:41 .ssh/
drwxr-xr-x 9 root root 4096 Jul 22 2023 stackhub/
-rw-r--r-- 1 root root 173 Jul 22 2023 .wget-hsts
-rw------- 1 root root 177 Oct 15 11:03 .Xauthority
root@hcss-ecs-78b3:~#
root@hcss-ecs-78b3:~# mkdir -p a/b/c
root@hcss-ecs-78b3:~# ll
total 120
drwx------ 13 root root 4096 Oct 15 11:05 ./
drwxr-xr-x 24 root root 4096 Oct 15 09:32 ../
drwxr-xr-x 3 root root 4096 Oct 15 11:05 a/
drwx------ 3 root root 4096 Jul 22 2023 .ansible/
drwxr-xr-x 2 root root 4096 Jul 22 2023 .ansible_async/
-rw-r--r-- 1 root root 298 Oct 15 10:15 .bash_history
-rw-r--r-- 1 root root 3144 Jul 22 2023 .bashrc
drwx------ 2 root root 4096 Feb 10 2023 .cache/
drwxr-xr-x 7 root root 4096 Jul 22 2023 docker-library/
-rw-r--r-- 1 root root 21926 Jul 22 2023 get-docker.sh
-rw-r--r-- 1 root root 1326 Jul 21 2023 githubclone.sh
-rw------- 1 root root 0 Feb 10 2023 .history
-rwxr-xr-x 1 root root 15353 Jul 22 2023 HSSInstall*
drwxr-xr-x 2 root root 4096 Oct 15 11:03 kiana/
-rw------- 1 root root 20 Oct 15 10:11 .lesshst
drwxr-xr-x 8 root root 4096 Jul 22 2023 library/
drwxr-xr-x 3 root root 4096 Oct 15 09:29 .local/
-rw-r--r-- 1 root root 161 Jul 9 2019 .profile
drwx------ 4 root root 4096 Jul 22 2023 snap/
drwx------ 2 root root 4096 Oct 11 19:41 .ssh/
drwxr-xr-x 9 root root 4096 Jul 22 2023 stackhub/
-rw-r--r-- 1 root root 173 Jul 22 2023 .wget-hsts
-rw------- 1 root root 177 Oct 15 11:03 .Xauthority
root@hcss-ecs-78b3:~#
root@hcss-ecs-78b3:~# tree kiana
kiana
0 directories, 0 files
root@hcss-ecs-78b3:~# tree a
a
└── b
└── c
2 directories, 0 files
root@hcss-ecs-78b3:~#
6. which指令
root@hcss-ecs-78b3:~#
root@hcss-ecs-78b3:~# which tree
/usr/bin/tree
root@hcss-ecs-78b3:~# which pwd
/usr/bin/pwd
root@hcss-ecs-78b3:~# which ls
/usr/bin/ls
root@hcss-ecs-78b3:~#
7. alias指令
8. rm指令
root@hcss-ecs-78b3:~# ll
total 120
drwx------ 13 root root 4096 Oct 15 11:05 ./
drwxr-xr-x 24 root root 4096 Oct 15 09:32 ../
drwxr-xr-x 3 root root 4096 Oct 15 11:05 a/
drwx------ 3 root root 4096 Jul 22 2023 .ansible/
drwxr-xr-x 2 root root 4096 Jul 22 2023 .ansible_async/
-rw-r--r-- 1 root root 298 Oct 15 10:15 .bash_history
-rw-r--r-- 1 root root 3144 Jul 22 2023 .bashrc
drwx------ 2 root root 4096 Feb 10 2023 .cache/
drwxr-xr-x 7 root root 4096 Jul 22 2023 docker-library/
-rw-r--r-- 1 root root 21926 Jul 22 2023 get-docker.sh
-rw-r--r-- 1 root root 1326 Jul 21 2023 githubclone.sh
-rw------- 1 root root 0 Feb 10 2023 .history
-rwxr-xr-x 1 root root 15353 Jul 22 2023 HSSInstall*
drwxr-xr-x 2 root root 4096 Oct 15 11:03 kiana/
-rw------- 1 root root 20 Oct 15 10:11 .lesshst
drwxr-xr-x 8 root root 4096 Jul 22 2023 library/
drwxr-xr-x 3 root root 4096 Oct 15 09:29 .local/
-rw-r--r-- 1 root root 161 Jul 9 2019 .profile
drwx------ 4 root root 4096 Jul 22 2023 snap/
drwx------ 2 root root 4096 Oct 11 19:41 .ssh/
drwxr-xr-x 9 root root 4096 Jul 22 2023 stackhub/
-rw-r--r-- 1 root root 173 Jul 22 2023 .wget-hsts
-rw------- 1 root root 177 Oct 15 11:03 .Xauthority
root@hcss-ecs-78b3:~# rm -rf kiana
root@hcss-ecs-78b3:~# ll
total 116
drwx------ 12 root root 4096 Oct 15 11:22 ./
drwxr-xr-x 24 root root 4096 Oct 15 09:32 ../
drwxr-xr-x 3 root root 4096 Oct 15 11:05 a/
drwx------ 3 root root 4096 Jul 22 2023 .ansible/
drwxr-xr-x 2 root root 4096 Jul 22 2023 .ansible_async/
-rw-r--r-- 1 root root 298 Oct 15 10:15 .bash_history
-rw-r--r-- 1 root root 3144 Jul 22 2023 .bashrc
drwx------ 2 root root 4096 Feb 10 2023 .cache/
drwxr-xr-x 7 root root 4096 Jul 22 2023 docker-library/
-rw-r--r-- 1 root root 21926 Jul 22 2023 get-docker.sh
-rw-r--r-- 1 root root 1326 Jul 21 2023 githubclone.sh
-rw------- 1 root root 0 Feb 10 2023 .history
-rwxr-xr-x 1 root root 15353 Jul 22 2023 HSSInstall*
-rw------- 1 root root 20 Oct 15 10:11 .lesshst
drwxr-xr-x 8 root root 4096 Jul 22 2023 library/
drwxr-xr-x 3 root root 4096 Oct 15 09:29 .local/
-rw-r--r-- 1 root root 161 Jul 9 2019 .profile
drwx------ 4 root root 4096 Jul 22 2023 snap/
drwx------ 2 root root 4096 Oct 11 19:41 .ssh/
drwxr-xr-x 9 root root 4096 Jul 22 2023 stackhub/
-rw-r--r-- 1 root root 173 Jul 22 2023 .wget-hsts
-rw------- 1 root root 177 Oct 15 11:03 .Xauthority
root@hcss-ecs-78b3:
9. man指令
root@hcss-ecs-78b3:~# man man
root@hcss-ecs-78b3:~# man pwd
root@hcss-ecs-78b3:~# man ll
10. cp指令
drwx------ 12 root root 4096 Oct 15 11:22 ./
drwxr-xr-x 24 root root 4096 Oct 15 09:32 ../
drwxr-xr-x 3 root root 4096 Oct 15 11:05 a/
drwx------ 3 root root 4096 Jul 22 2023 .ansible/
drwxr-xr-x 2 root root 4096 Jul 22 2023 .ansible_async/
-rw-r--r-- 1 root root 298 Oct 15 10:15 .bash_history
-rw-r--r-- 1 root root 3144 Jul 22 2023 .bashrc
drwx------ 2 root root 4096 Feb 10 2023 .cache/
drwxr-xr-x 7 root root 4096 Jul 22 2023 docker-library/
-rw-r--r-- 1 root root 21926 Jul 22 2023 get-docker.sh
-rw-r--r-- 1 root root 1326 Jul 21 2023 githubclone.sh
-rw------- 1 root root 0 Feb 10 2023 .history
-rwxr-xr-x 1 root root 15353 Jul 22 2023 HSSInstall*
-rw------- 1 root root 20 Oct 15 10:11 .lesshst
drwxr-xr-x 8 root root 4096 Jul 22 2023 library/
drwxr-xr-x 3 root root 4096 Oct 15 09:29 .local/
-rw-r--r-- 1 root root 161 Jul 9 2019 .profile
drwx------ 4 root root 4096 Jul 22 2023 snap/
drwx------ 2 root root 4096 Oct 11 19:41 .ssh/
drwxr-xr-x 9 root root 4096 Jul 22 2023 stackhub/
-rw-r--r-- 1 root root 173 Jul 22 2023 .wget-hsts
-rw------- 1 root root 177 Oct 15 11:03 .Xauthority
root@hcss-ecs-78b3:~#
root@hcss-ecs-78b3:~# man man
root@hcss-ecs-78b3:~#
root@hcss-ecs-78b3:~# cp .wget-hsts get-docker.sh
root@hcss-ecs-78b3:~# ll
total 96
drwx------ 12 root root 4096 Oct 15 11:27 ./
drwxr-xr-x 24 root root 4096 Oct 15 09:32 ../
drwxr-xr-x 3 root root 4096 Oct 15 11:05 a/
drwx------ 3 root root 4096 Jul 22 2023 .ansible/
drwxr-xr-x 2 root root 4096 Jul 22 2023 .ansible_async/
-rw-r--r-- 1 root root 298 Oct 15 10:15 .bash_history
-rw-r--r-- 1 root root 3144 Jul 22 2023 .bashrc
drwx------ 2 root root 4096 Feb 10 2023 .cache/
drwxr-xr-x 7 root root 4096 Jul 22 2023 docker-library/
-rw-r--r-- 1 root root 173 Oct 15 11:32 get-docker.sh
-rw-r--r-- 1 root root 1326 Jul 21 2023 githubclone.sh
-rw------- 1 root root 0 Feb 10 2023 .history
-rwxr-xr-x 1 root root 15353 Jul 22 2023 HSSInstall*
-rw------- 1 root root 20 Oct 15 11:27 .lesshst
drwxr-xr-x 8 root root 4096 Jul 22 2023 library/
drwxr-xr-x 3 root root 4096 Oct 15 09:29 .local/
-rw-r--r-- 1 root root 161 Jul 9 2019 .profile
drwx------ 4 root root 4096 Jul 22 2023 snap/
drwx------ 2 root root 4096 Oct 11 19:41 .ssh/
drwxr-xr-x 9 root root 4096 Jul 22 2023 stackhub/
-rw-r--r-- 1 root root 173 Jul 22 2023 .wget-hsts
-rw------- 1 root root 177 Oct 15 11:03 .Xauthority
root@hcss-ecs-78b3:~#
11. mv指令
理论杂谈
12. cat指令
重定向操作
13. more指令
[atong@LiWenTong ~]$ ls -l / | more
total 162
drwxr-xr-x 2 root root 4096 Apr 25 05:39 bin
drwxr-xr-x 4 root root 1024 Apr 25 04:11boot
drwxr-xr-x 9 root root 3820 May 4 23:20 dev
drwxr-xr-x 84 root root 4096 May 5 00:37 etc
14. less指令
15. head指令
16. tail指令
17. 时间相关的指令
17.1. date显示
18. Cal指令
19. find 查找指令
20. grep指令
21 .zip/unzip指令
22. tar指令:打包/解包,不打开它,直接看内容
23. uname指令
收尾杂谈
cnt=0; while [ $cnt -le 100 ]; do echo "hello $cnt"; let cnt++;done
cnt=0; while [ $cnt -le 100 ]; do touch code${cnt}.c; let cnt++;done
完结撒花~