码迷,mamicode.com
首页 > 系统相关 > 详细

Linux之温故知新1

时间:2018-10-21 20:36:37      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:music   linx   read   dir   file   int   oct   load   ble   

1.touch命令的使用

2.使用(cd -)可以在上次使用的目录来回切换

3.ls通配符的使用*代表任意字符和任意个字符, ?代表任意一个字符, [12345]中的任意一个字符, [1-5]中的任意一个字符.

 1 linxmouse@ubuntu:~/Desktop$ touch 123
 2 linxmouse@ubuntu:~/Desktop$ touch 223
 3 linxmouse@ubuntu:~/Desktop$ touch 323
 4 linxmouse@ubuntu:~/Desktop$ touch 423
 5 linxmouse@ubuntu:~/Desktop$ touch 523
 6 linxmouse@ubuntu:~/Desktop$ ls *3
 7 123  223  323  423  523
 8 linxmouse@ubuntu:~/Desktop$ ls ?3
 9 ls: cannot access ‘?3‘: No such file or directory
10 linxmouse@ubuntu:~/Desktop$ ls ?23
11 123  223  323  423  523
12 linxmouse@ubuntu:~/Desktop$ ls 2?3
13 223
14 linxmouse@ubuntu:~/Desktop$ ls [125]23
15 123  223  523
16 linxmouse@ubuntu:~/Desktop$ ls []23
17 ls: cannot access ‘[]23‘: No such file or directory
18 linxmouse@ubuntu:~/Desktop$ ls [1]3
19 ls: cannot access ‘[1]3‘: No such file or directory
20 linxmouse@ubuntu:~/Desktop$ ls [1-2]3
21 ls: cannot access ‘[1-2]3‘: No such file or directory
22 linxmouse@ubuntu:~/Desktop$ ls [1-2]23
23 123  223

 4.ls的-h, 

-h, --human-readable
with -l and/or -s, print human readable sizes (e.g., 1K 234M 2G)

 1 linxmouse@ubuntu:~$ ls -lh
 2 total 36K
 3 drwxr-xr-x 2 linxmouse linxmouse 4.0K Oct 15 09:53 Desktop
 4 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep  3 06:51 Documents
 5 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep  3 06:51 Downloads
 6 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep  3 06:51 Music
 7 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep  3 06:51 Pictures
 8 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep  3 06:51 Public
 9 drwxrwxr-x 3 linxmouse linxmouse 4.0K Oct 15 06:47 temp
10 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep 21 19:20 Templates
11 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep  3 06:51 Videos

 

Linux之温故知新1

标签:music   linx   read   dir   file   int   oct   load   ble   

原文地址:https://www.cnblogs.com/linxmouse/p/9826561.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!