美文网首页
linux 基础入门

linux 基础入门

作者: 小小机器人 | 来源:发表于2016-12-04 19:55 被阅读9次

首先推荐一个linux学习的网站
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. []匹配括号内的任意字符(- 表示范围)
[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)字符设备文件
(b)块设备文件
(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 显示文本内容
more 分页显示文本内容 空格翻页 Q停止浏览
less 同more,但是less还可以上下键移动浏览
head 从首显示文本内容 -n 可以显示指定行数
tail 同head从尾显示文本内容

相关文章

网友评论

      本文标题:linux 基础入门

      本文链接:https://www.haomeiwen.com/subject/ufuapttx.html