Linux学习笔记之超详细基础linux命令

by:授客 QQ1033553122

---------------------------------接Part 1------------------------------

less命令

方法:less
文件

功能:分屏显示文本文件的内容

例子:分屏显示文本文件.bash_history的内容

[laiyu@localhost ~]$ less
.bash_history

yum install scim -lang
-chinese

cd /

ls

cd documents

cd /documents

cd /root

cd /desktop

cd desktop

mo laiyu's home

cd

//

//

exit

ls

cd /home

cd /laiyu

ls

cd laiyu

cd Documents

ls

rpm -ivh
fcitx-3.0.0-1.i386.rpm

cd 1

cd desktop

.bash_history

说明:less命令后,首先显示第一屏的内容,并在屏幕的底部出现文件名

按上下键,【Enter】键,【Space】键,【PgUp】,【PgDn】键,滚动鼠标滚轮可前后浏览文本内容,并在最下角出现提示符号“:”,提示符号下按【q】键可以退出less命令

tail命令

方法:tail
[选项]

文件

主要选项:-n(number)

制定显示行数

功能:显示文本文件的结尾部分,默认显示文件的最后10行

例子:显示.bash_history文件的最后5行内容

[laiyu@localhost ~]$ tail
-5 .bash_history

more .bashrc

more
.bash_profile

more
.bash_history

shutdown -r now

halt

head命令

方法:head
[选项]

文件

主要选项:-n(number)

定制显示的行数

功能:显示文本文件的开头部分,默认显示文件的开头10行

例子:显示/user/t.txt文件的最开头5行内容

[laiyu@localhost ~]$ head
-5 .bash_history

yum install scim -lang
-chinese

cd /

ls

cd documents

cd /documents

--与帮助信息相关的Shell命令

man命令

方法:man
命令名

功能:显示指定命令在手册页的帮助信息

例子:查看ls命令的手册页帮助信息

[laiyu@localhost ~]$ man
ls

LS(1)                           
User Commands                          
LS(1)

NAME

ls - list directory contents

SYNOPSIS

ls [OPTION]... [FILE]...

DESCRIPTION

List 
information 
about  the
FILEs (the current directory by default).

Sort entries alphabetically if none of -cftuvSUX nor
--sort.

Mandatory arguments to long options are  mandatory  for  short  options

too.

-a, --all

do not ignore entries starting with .

...

AUTHOR

Written by Richard M. Stallman and David MacKenzie.

REPORTING BUGS

Report ls bugs to bug-coreutils@gnu.org

GNU coreutils home page:

General help using GNU software:

Report ls translation bugs to

COPYRIGHT

Copyright 
漏  2010  Free Software
Foundation, Inc.  License GPLv3+:
GNU

GPL version 3 or later .

This is free software: you are free  to  change  and 
redistribute  it.

There is NO WARRANTY, to the extent permitted by law.

SEE ALSO

The 
full 
documentation  for ls is maintained
as a Texinfo manual.  If

the info and ls programs are properly installed at your site,
the 
com-

mand  info
coreutils 'ls invocation'

should give you access to the complete manual.

GNU coreutils
8.4                
April 2012                            
LS(1)

:

说明:屏幕显示出该命令在Shell手册页的第一屏帮助信息,用户可以使用上下方向键,【PgDn】、【PgUp】键,滚动鼠标滚轮,前后翻阅帮助信息,按【q】键退出man命令

man帮助文档一般包含命令名,命令的语法格式,各选项说明、帮助文档的作者信息、报告bugs到联系地址等

-help命令

方法:命令名 --help

功能:显示指定命令的帮助信息

说明:不是所有命令都有-help选项

例子:查看ls命令到帮助信息

[laiyu@localhost ~]$ 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.

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 octal escapes for nongraphic characters

--block-size=SIZE     
use SIZE-byte blocks.  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

-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,
--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               
print the index number of each file

-I,
--ignore=PATTERN      
do not list implied entries matching shell PATTERN

-k                        
like --block-size=1K

-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

-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

-R,
--recursive           
list subdirectories recursively

-s, --size                
print the allocated size of each file, in blocks

-S                        
sort by file size

--sort=WORD           
sort by WORD instead of name: none -U,

extension -X, size -S, time -t, version -v

--time=WORD   
        with
-l, show time as WORD instead of modification

time: atime -u, access -u, use -u, ctime -c,

or status -c; use specified time as sort key

if --sort=time

--time-style=STYLE    
with -l, show times using style STYLE:

full-iso, long-iso, iso, locale, +FORMAT.

FORMAT is interpreted like `date'; if FORMAT is

FORMAT1FORMAT2, FORMAT1 applies to

non-recent files and FORMAT2 to recent files;

if STYLE is prefixed with `posix-', STYLE

takes effect only outside the POSIX locale

-t     
                   sort
by modification time

-T,
--tabsize=COLS        
assume tab stops at each COLS instead of 8

-u                        
with -lt: sort by, and show, access time

with -l: show access time and sort by name

otherwise: sort by access time

-U                        
do not sort; list entries in directory order

-v                        
natural sort of (version) numbers within text

-w,
--width=COLS          
assume screen width instead of current value

-x                        
list entries by lines instead of by columns

-X                        
sort alphabetically by entry extension

-1                        
list one file per line

SELinux options:

--lcontext                
Display security context.  
Enable -l. Lines

will probably be too wide for most displays.

-Z,
--context             
Display security context so it fits on most

displays. 
Displays only mode, user, group,

security context and file name.

--scontext                
Display only security context and file name.

--help    
display this help and exit

--version 
output version information and exit

SIZE may be (or may be an
integer optionally followed by) one of following:

KB 1000, K 1024, MB
1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.

Using color to distinguish
file types is disabled both by default and

with
--color=never.  With --color=auto, ls
emits color codes only when

standard output is
connected to a terminal.  The LS_COLORS
environment

variable can change the
settings. 
Use the dircolors command to set it.

Exit status:

0  if OK,

1  if minor problems
(e.g., cannot access subdirectory),

2  if serious trouble
(e.g., cannot access command-line argument).

Report ls bugs to
bug-coreutils@gnu.org

GNU coreutils home
page:

General help using GNU
software:

For complete documentation,
run: info coreutils 'ls invocation'

说明:

Usage: ls [OPTION]...
[FILE]...

List information about the
FILEs (the current directory by default).

Sort entries alphabetically
if none of -cftuvSUX nor --sort.

Mandatory arguments to long
options are mandatory for short options too.

-a, --all                 
do not ignore entries starting with .

Usage部分是命令的格式,接着是解释,而-a,--all,这表示等价的选项,即ls
-a和ls
-all命令是一样的,二选一,do
not……是对选项解释,该选项有何作用

例子:查看ethtool的帮助文档[Debian下测试]

builder:/etc/sysconfig#
ethtool --help

ethtool
version 6

Usage:

ethtool DEVNAME Display
standard information about device

ethtool -s|--change DEVNAME  Change generic
options

[ speed 10|100|1000|2500|10000 ]

[ duplex half|full ]

[ port tp|aui|bnc|mii|fibre ]

[ autoneg on|off ]

[ advertise %%x ]

[ phyad %%d ]

[ xcvr internal|external ]

[ wol p|u|m|b|a|g|s|d... ]

[ sopass %%x:%%x:%%x:%%x:%%x:%%x ]

[ msglvl %%d ]

ethtool -a|--show-pause DEVNAME  Show pause
options

ethtool -A|--pause DEVNAME   Set
pause options

[ autoneg on|off ]

[ rx on|off ]

[ tx on|off ]

ethtool -c|--show-coalesce DEVNAME   Show
coalesce options

ethtool -C|--coalesce DEVNAME   
Set coalesce options

[adaptive-rx on|off]

[adaptive-tx on|off]

[rx-usecs N]

[rx-frames N]

[rx-usecs-irq N]

[rx-frames-irq N]

[tx-usecs N]

[tx-frames N]

[tx-usecs-irq N]

[tx-frames-irq N]

[stats-block-usecs N]

[pkt-rate-low N]

[rx-usecs-low N]

[rx-frames-low N]

[tx-usecs-low N]

[tx-frames-low N]

[pkt-rate-high N]

[rx-usecs-high N]

[rx-frames-high N]

[tx-usecs-high N]

[tx-frames-high N]

[sample-interval N]

ethtool -g|--show-ring DEVNAME   Query
RX/TX ring parameters

ethtool -G|--set-ring DEVNAME   
Set RX/TX ring parameters

..............

说明:

ethtool version 6
#命令版本

Usage: #用法

ethtool DEVNAME Display
standard information about device #ethtoo
设备名
显示关于这个设备的标准信息

ethtool -s|--change DEVNAME
Change generic options #ethtool -s|--change
设备名 change通用选项

[ speed 10|100|1000|2500|10000 ]

[ duplex half|full ]

[ port tp|aui|bnc|mii|fibre ]

[ autoneg on|off ]

[ advertise %%x ]

[ phyad %%d ]

[ xcvr internal|external ]

[ wol p|u|m|b|a|g|s|d... ]

[ sopass %%x:%%x:%%x:%%x:%%x:%%x ]

[ msglvl %%d ]

ethtool -a|--show-pause DEVNAME  Show pause
options

ethtool -A|--pause DEVNAME   Set
pause options

[ autoneg on|off ]

[ rx on|off ]

[ tx on|off ]

......

Linux 学习笔记之超详细基础linux命令 Part 2的更多相关文章

  1. Linux 学习笔记之超详细基础linux命令(the end)

    Linux学习笔记之超详细基础linux命令 by:授客 QQ:1033553122 ---------------------------------接Part 14---------------- ...

  2. Linux 学习笔记之超详细基础linux命令 Part 14

    Linux学习笔记之超详细基础linux命令 by:授客 QQ:1033553122 ---------------------------------接Part 13---------------- ...

  3. Linux 学习笔记之超详细基础linux命令 Part 13

    Linux学习笔记之超详细基础linux命令 by:授客 QQ:1033553122 ---------------------------------接Part 12---------------- ...

  4. Linux 学习笔记之超详细基础linux命令 Part 12

    Linux学习笔记之超详细基础linux命令 by:授客 QQ:1033553122 ---------------------------------接Part 11---------------- ...

  5. Linux 学习笔记之超详细基础linux命令 Part 11

    Linux学习笔记之超详细基础linux命令 by:授客 QQ:1033553122 ---------------------------------接Part 10---------------- ...

  6. Linux 学习笔记之超详细基础linux命令 Part 10

    Linux学习笔记之超详细基础linux命令 by:授客 QQ:1033553122 ---------------------------------接Part 9----------------- ...

  7. Linux 学习笔记之超详细基础linux命令 Part 9

    Linux学习笔记之超详细基础linux命令 by:授客 QQ:1033553122 ---------------------------------接Part 8----------------- ...

  8. Linux 学习笔记之超详细基础linux命令 Part 8

    Linux学习笔记之超详细基础linux命令 by:授客 QQ:1033553122 ---------------------------------接Part 7----------------- ...

  9. Linux 学习笔记之超详细基础linux命令 Part 7

    Linux学习笔记之超详细基础linux命令 by:授客 QQ:1033553122 ---------------------------------接Part 6----------------- ...

  10. Linux 学习笔记之超详细基础linux命令 Part 6

    Linux学习笔记之超详细基础linux命令 by:授客 QQ:1033553122 ---------------------------------接Part 5----------------- ...

随机推荐

  1. HTML+JS实现网站公告信息滚动显示

    一.可以直接使用marquee标签来实现 注意: 这个标签首先在早期的IE版本中加进来,后来逐渐被其他浏览器支持,W3C的不建议使用它. <marquee>在HTML和HTML5中都属于废 ...

  2. 第二十五节:Java语言基础-面向对象基础

    面向对象 面向过程的代表主要是C语言,面向对象是相对面向过程而言,Java是面向对象的编程语言,面向过程是通过函数体现,面向过程主要是功能行为. 而对于面向对象而言,将功能封装到对象,所以面向对象是基 ...

  3. Testing - 软件测试知识梳理 - 测试用例

    测试用例 是指对一项特定的软件产品进行测试任务的描述,体现测试方案.方法.技术和策略. 内容包括测试目标.测试环境.输入数据.测试步骤.预期结果.测试脚本等,并形成文档. 每个具体测试用例都将包括下列 ...

  4. lable标签的用途

    lable标签的用途:为iput输入框元素定义标注: label 元素不会向用户呈现任何特殊效果.不过,它为鼠标用户改进了可用性.如果您在 label 元素内点击文本,就会触发此控件.就是说,当用户选 ...

  5. 07-部署Flanneld网络

    部署Flanneld网络 Flanneld:用于解决容器之间网络互通,这里我们要配置TLS认证. Docker1.12.5:docker的安装很简单,这里也不说了. 配置Flanneld 这里我们使用 ...

  6. Unity 处理预设中的中文

    Unity 处理预设中的中文 需求由来 项目接入越南版本 需要解决的文本问题 获取UI预设Label里面的中文(没被代码控制)提供给越南 Label里面的中文替换成越南文 解决流程 迭代获取Asset ...

  7. FastDFS单节点安装

    百度百科:https://baike.baidu.com/item/fastdfs/5609710?fr=aladdin 相关软件包: 链接:https://pan.baidu.com/s/11nO2 ...

  8. SpringBoot之oauth2.0学习之服务端配置快速上手

    现在第三方登录的例子数见不鲜.其实在这种示例当中,oauth2.0是使用比较多的一种授权登录的标准.oauth2.0也是从oauth1.0升级过来的.那么关于oauth2.0相关的概念及其原理,大家可 ...

  9. 高手速成android开源项目【View篇】

    主要介绍那些不错个性化的View,包括ListView.ActionBar.Menu.ViewPager.Gallery.GridView.ImageView.ProgressBar及其他如Dialo ...

  10. 高可用Hadoop平台-Ganglia安装部署

    1.概述 最近,有朋友私密我,Hadoop有什么好的监控工具,其实,Hadoop的监控工具还是蛮多的.今天给大家分享一个老牌监控工具Ganglia,这个在企业用的也算是比较多的,Hadoop对它的兼容 ...