Linux之温故知新1

Posted 非法关键字

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux之温故知新1相关的知识,希望对你有一定的参考价值。

1.touch命令的使用

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

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

 1 [email protected]:~/Desktop$ touch 123
 2 [email protected]:~/Desktop$ touch 223
 3 [email protected]:~/Desktop$ touch 323
 4 [email protected]:~/Desktop$ touch 423
 5 [email protected]:~/Desktop$ touch 523
 6 [email protected]:~/Desktop$ ls *3
 7 123  223  323  423  523
 8 [email protected]:~/Desktop$ ls ?3
 9 ls: cannot access ‘?3‘: No such file or directory
10 [email protected]:~/Desktop$ ls ?23
11 123  223  323  423  523
12 [email protected]:~/Desktop$ ls 2?3
13 223
14 [email protected]:~/Desktop$ ls [125]23
15 123  223  523
16 [email protected]:~/Desktop$ ls []23
17 ls: cannot access ‘[]23‘: No such file or directory
18 [email protected]:~/Desktop$ ls [1]3
19 ls: cannot access ‘[1]3‘: No such file or directory
20 [email protected]:~/Desktop$ ls [1-2]3
21 ls: cannot access ‘[1-2]3‘: No such file or directory
22 [email protected]:~/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 [email protected]:~$ 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的主要内容,如果未能解决你的问题,请参考以下文章

linux温故知新六

linux温故知新七

自己定义View时,用到Paint Canvas的一些温故,简单的帧动画(动画一 ,"掏粪男孩Gif"顺便再提提onWindowFocusChanged)(代码片段

Linux之账号管理

温故篇之素数

温故篇之素数