
和你一起终身学习,这里是程序员Android
本篇文章主要介绍 Android 开发中的部分知识点,通过阅读本篇文章,您将收获以下内容:
一、cd 命令
二、--help 命令
三、 ls 命令
四、touch 命令
五、mkdir命令
六、pwd 命令
七、echo 命令
八、cat 命令
九、Tab 键
十、vi 或者vim 命令
十一、rm 命令
十二、mv 命令
十三、cp 命令
十四、find 命令
十五、grep 命令
十六、chmod 命令
十七、压缩与解压命令
十八、Top命令
十九、在某一类文件中(比如:*.xml)查找字符串
二十、 字符串替换命令
二十一、Tree 命令
二十二、显示目录下的所有文件
二十三、统计目录下文件个数
一、cd 命令
cd 命令是 Linux常用命令之一,主要用于进入目录(相当于windows的文件夹)。
比如我想进入TestLinuxCommond这个目录。
可以使用cd TestLinuxCommond/
programAndroid@ubuntu:~$ cd TestLinuxCommond/
programAndroid@ubuntu:~/TestLinuxCommond$
比如我想退出TestLinuxCommond这个目录。
可以使用cd ..
programAndroid@ubuntu:~/TestLinuxCommond$ cd ..
programAndroid@ubuntu:~$
如果想退两层目录,可以使用cd ../..
programAndroid@ubuntu:~/TestLinuxCommond/testmv/test$ ls
programAndroid@ubuntu:~/TestLinuxCommond/testmv/test$ cd ../..
programAndroid@ubuntu:~/TestLinuxCommond$
二、--help 命令
当我们不知道一个命令如何使用时候,可以使用 --help 查看这个命令是干嘛的。--help相当于用户命令帮忙的手册。
比如 我想看看 cd命令是如何使用的,可以使用cd ---help
programAndroid@ubuntu:~/TestLinuxCommond$ cd ---help
-bash: cd: --: invalid option
cd: usage: cd [-L|[-P [-e]] [-@]] [dir]
programAndroid@ubuntu:~/TestLinuxCommond$
比如 我想看看 ls命令是如何使用的,使用参数如何,可以使用ls ---help
programAndroid@ubuntu:~/TestLinuxCommond$ ls --help
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.
Mandatory arguments to long options are mandatory for short options too.
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
--author with -l, print the author of each file
-b, --escape print C-style escapes for nongraphic characters
--block-size=SIZE scale sizes by SIZE before printing them. E.g.,
'--block-size=M' prints sizes in units of
1,048,576 bytes. See SIZE format below.
-B, --ignore-backups do not list implied entries ending with ~
-c with -lt: sort by, and show, ctime (time of last
modification of file status information)
with -l: show ctime and sort by name
otherwise: sort by ctime, newest first
-C list entries by columns
--color[=WHEN] colorize the output. WHEN defaults to 'always'
or can be 'never' or 'auto'. More info below
-d, --directory list directory entries instead of contents,
and do not dereference symbolic links
-D, --dired generate output designed for Emacs' dired mode
-f do not sort, enable -aU, disable -ls --color
-F, --classify append indicator (one of */=>@|) to entries
--file-type likewise, except do not append '*'
--format=WORD across -x, commas -m, horizontal -x, long -l,
single-column -1, verbose -l, vertical -C
--full-time like -l --time-style=full-iso
-g like -l, but do not list owner
--group-directories-first
group directories before files.
augment with a --sort option, but any
use of --sort=none (-U) disables grouping
-G, --no-group in a long listing, don't print group names
-h, --human-readable with -l, print sizes in human readable format
(e.g., 1K 234M 2G)
--si likewise, but use powers of 1000 not 1024
-H, --d

最低0.47元/天 解锁文章
601

被折叠的 条评论
为什么被折叠?



