用户工具

站点工具


c.实践与心得:03.tryhackme:module2:4.linux_fundamentals:2.part2

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
c.实践与心得:03.tryhackme:module2:4.linux_fundamentals:2.part2 [2024/05/27 13:24] jackie67c.实践与心得:03.tryhackme:module2:4.linux_fundamentals:2.part2 [2024/05/27 13:33] (当前版本) jackie67
行 62: 行 62:
  
 #### Task3 Introduction to Flags and Switches #### Task3 Introduction to Flags and Switches
 +
 +每条命令都带有一些参数,比如ls命令,它用于列表所有当前目录的文件和文件夹.
 +
 +如果后面加-a(是-all的缩写),会增加隐藏文件的显示.对任意命令后面加--help可以获取关于该命令的帮助.提供所有相关参数和解释说明.
 +
 +<konsole>
 +tryhackme@linux2:~$ 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      with -l, scale sizes by SIZE when printing them;
 +                               e.g., '--block-size=M'; 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 can be 'always' (default
 +                               if omitted), 'auto', or 'never'; more info below
 +  -d, --directory            list directories themselves, not their contents
 +  -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
 +
 +</konsole>
 +
 +查询命令还可以使用Man(ual)页面,除了Linux设备自带,网上也可以查.https://linux.die.net/man/
 +
 +比如man ls表示显示ls的命令说明.
 +
 +命令说明可能会很长,可以使用方向键进行上下滚动,在命令后添加-h可以得到人类易读的版本.
 +
 +:question: What directional arrow key would we use to navigate down the manual page?
 +<WRAP spoiler>down</WRAP>
 +
 +:question: What flag would we use to display the output in a "human-readable" way?
 +<WRAP spoiler>-h</WRAP>
  
 #### Task4 Filesystem Interaction Continued #### Task4 Filesystem Interaction Continued
c.实践与心得/03.tryhackme/module2/4.linux_fundamentals/2.part2.1716816267.txt.gz · 最后更改: jackie67