首先推薦一個linux學(xué)習(xí)的網(wǎng)站
http://man.linuxde.net/
通配符
1. * 匹配任意多個字符(0~n)
[root@localhost tmp]# touch test.conf test01.conf test02.conf
[root@localhost tmp]# ls *.conf
test01.conf test02.conf test.conf
[root@localhost tmp]# ls t*.conf
test01.conf test02.conf test.conf
2. ?匹配任意一個字符(1)
[root@localhost tmp]# touch test.conf test01.conf test02.conf
[root@localhost tmp]# ls test0?.conf
test01.conf test02.conf
[root@localhost tmp]# ls tes?.conf
test.conf
3. []匹配括號內(nèi)的任意字符(- 表示范圍)
[root@localhost mytmp]# touch 11.txt 12.txt 13.txt
[root@localhost mytmp]# ll
total 0
-rw-r--r--. 1 root root 0 Nov 29 03:41 11.txt
-rw-r--r--. 1 root root 0 Nov 29 03:41 12.txt
-rw-r--r--. 1 root root 0 Nov 29 03:41 13.txt
[root@localhost mytmp]# rm -f 1[123]* #也可以rm -f 1[1-3]*
[root@localhost mytmp]# ls
獲得命令幫助
- command --help
- man command
- info command
linux文件類型
(-)普通文件
(d)目錄
(l)符號鏈接
(c)字符設(shè)備文件
(b)塊設(shè)備文件
(s)套接字
(p)命名管道
[root@localhost tmp]# ll
total 144
drwxr-xr-x. 2 root root 4096 Nov 29 03:31 dir
drwx------. 2 xxjqr xxjqr 4096 Nov 23 09:14 keyring-13s0ML
drwx------. 2 xxjqr xxjqr 4096 Nov 29 02:41 keyring-R7Ie47
drwxr-xr-x. 2 root root 4096 Nov 29 03:43 mytmp
文本文件查看命令
命令 | 功能 |
---|---|
cat | 顯示文本內(nèi)容 |
more | 分頁顯示文本內(nèi)容 空格翻頁 Q停止瀏覽 |
less | 同more,但是less還可以上下鍵移動瀏覽 |
head | 從首顯示文本內(nèi)容 -n 可以顯示指定行數(shù) |
tail | 同head從尾顯示文本內(nèi)容 |