史上最全的Linux命令大全

  • 格式:docx
  • 大小:37.44 KB
  • 文档页数:12

下载文档原格式

  / 12
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Linux 命令摘要

1,man命令:

这是一个很重要的命令,学会它就可以自学了,man是manual的简写,用于帮助查看信息,类似于一个帮助文档。使用格式为:man 命令eg:man ls man man

其中屏幕中会出现NAME ****是所查内容的全写和解说

SYSNOPSIS*****是使用的概要

DESCRIPTION***是命令的说明

注:按q键或者ctrl+c退出,在linux下可以使用ctrl+c终止当前程序运行。man中也一样。

外:还有个相似的命令和man作用类同help

使用格式命令–help eg:ls –help man –help

在help中还会出现一些使用的简写方式及其具体含义

2, cd命令:

cd是切换当前目录位置的命令。Linux系统有严格的访问权限控制,所以一般用户只能切换到自己拥有权限的目录中。也就是说cd指令可让用户在不同的目录间切换,但该用户必须拥有足够的权限进入目的目录。

使用格式:

cd 当前目录;

cd /子路径名为进入一个子目录,eg:cd /home

cd 空格,两个点,为进入当前目录的上一级目录,eg:cd ..

cd,空格,路径名,为进入一个特定的目录,eg:cd /usr/local/lib)

外:cd \无反应,还在当前目录。使用时可以用pwd随时检验路径所在。

3,ls命令

ls命令用于列出目录中的文件和子目录内容,或者查看文件或者目录的属性。例如,要查看列出当前目录下的内容

在Linux中介入ls –help你会看到下面内容,就是ls -*的简写不全和具体含义

-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 octal escapes for nongraphic characters --block-size=SIZE use SIZE-byte blocks(把文件名中不可输出的字符用反斜杠加字符编号(就象在C语言里一样)的形式列出)

-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(输出文件的i 节点的修改时间,并以此排序)

-C list entries by columns --color[=WHEN] control whether color is used to distinguish file types. WHEN may be `never', `always', or `auto'(按列输出,纵向排序)

-d, --directory list directory entries instead of contents, and do not dereference symbolic links(将目录象文件一样显示,而不是显示其下的文件)

-D, --dired generate output designed for Emacs' dired mode

-e 输出时间的全部信息,而不是输出简略信息

-f do not sort, enable -aU, disable –lst(-U 对输出的文件不排序)

-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 - --full-time like –l –time-style=full-iso

-g like –l, but do not list owner

-G, --no-group like –l, but do not list group(输出文件的组的信息)

-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, --dereference-command-line follow symbolic links listed on the command

line--dereference-command-line-symlink-to-dir follow each command line symbolic link that points to a directory --hide=PATTERN do not list implied entries matching shell PATTERN

(overridden by –a or –A) --indicator-style=WORD append indicator with style WORD to entry names: none (default), slash (-p), file-type (--file-type), classify (-F)

-I, --inode with –l, print the index number of each file(列出文件的详细信息)

-I, --ignore=PATTERN do not list implied entries matching shell PATTERN(列出文件的详细信息)

-k like --block-size=1K(以k 字节的形式表示文件的大小)

-l use a long listing format

-L, --dereference when showing file information for a symbolic link, show information for the file the link references rather than for the link itself(列出链接文件名而不是链接到的文件)

-m fill width with a comma separated list of entries(横向输出文件名,并以“,”作分格符)

-n, --numeric-uid-gid like -l, but list numeric user and group IDs

-N, --literal print raw entry names (don't treat e.g. control characters specially)(不限制文件长度)

-o like -l, but do not list group information(显示文件的除组信息外的详细信息)

-p, --indicator-style=slash append / indicator to directories(-F 在每个文件名后附上一个字符以说明该文件的类型,“*”表示可执行的普通文件;“/”表示目录;“@”表示符号链接;“|”表示FIFOs;“=”表示套接字(sockets)。)

-q, --hide-control-chars print ? instead of non graphic characters --show-control-chars show non graphic characters as-is (default unless program is `ls' and output is a terminal)(用?代替不可输出的字符)

-Q, --quote-name enclose entry names in double quotes--quoting-style=WORD use quoting style WORD for entry names: literal, locale, shell, shell-always, c, escape(把输出的文件名用双引号括起来)

-r, --reverse reverse order while sorting(对目录反向排序)