Linux 常用命令

Linux man page

Linux man page 5.3

tree命令

[test problems]$ tree . --charset ASCII
.
`-- guangda
    |-- core-loadserver-1645979-1686441112
    `-- loadserver

1 directory, 2 files
[test problems]$

使用uname获取UNIX版本

[root@localhost ~]# uname -a
Linux localhost.localdomain 4.18.0-348.el8.ppc64le #1 SMP Tue Oct 19 15:33:39 UTC 2021 ppc64le ppc64le ppc64le GNU/Linux
[root@localhost ~]# uname -s
Linux
[root@localhost ~]# uname -n
localhost.localdomain
[root@localhost ~]# uname -r
4.18.0-348.el8.ppc64le
[root@localhost ~]# uname -v
#1 SMP Tue Oct 19 15:33:39 UTC 2021
[root@localhost ~]# uname -m
ppc64le
[root@localhost ~]# uname -p
ppc64le
[root@localhost ~]# uname -i
ppc64le
[root@localhost ~]# uname -o
GNU/Linux
[root@localhost ~]# uname --help
Usage: uname [OPTION]...
Print certain system information.  With no OPTION, same as -s.

  -a, --all                print all information, in the following order,
                             except omit -p and -i if unknown:
  -s, --kernel-name        print the kernel name
  -n, --nodename           print the network node hostname
  -r, --kernel-release     print the kernel release
  -v, --kernel-version     print the kernel version
  -m, --machine            print the machine hardware name
  -p, --processor          print the processor type (non-portable)
  -i, --hardware-platform  print the hardware platform (non-portable)
  -o, --operating-system   print the operating system
      --help     display this help and exit
      --version  output version information and exit

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Report uname translation bugs to <https://translationproject.org/team/>
Full documentation at: <https://www.gnu.org/software/coreutils/uname>
or available locally via: info '(coreutils) uname invocation'

echo

echo - display a line of text
       Echo the STRING(s) to standard output.

       -n     do not output the trailing newline
       -e     enable interpretation of backslash escapes
       -E     disable interpretation of backslash escapes (default)
       --help display this help and exit
       --version
              output version information and exit
       If -e is in effect, the following sequences are recognized:
       \\     backslash
       \a     alert (BEL)
       \b     backspace
       \c     produce no further output
       \e     escape
       \f     form feed
       \n     new line
       \r     carriage return
       \t     horizontal tab
       \v     vertical tab
       \0NNN  byte with octal value NNN (1 to 3 digits)
       \xHH   byte with hexadecimal value HH (1 to 2 digits)
       NOTE: your shell may have its own version of echo, which usually
       supersedes the version described here.  Please refer to your
       shell's documentation for details about the options it supports.

       NOTE: printf(1) is a preferred alternative, which does not have
       issues outputting option-like strings.

-n 不输出行尾的换行符

[test]$ echo "123" > a
[test]$ hexdump  -C a
00000000  31 32 33 0a                                       |123.|
00000004
[test]$ echo -n "123" > b
[test]$ hexdump  -C b
00000000  31 32 33                                          |123|
00000003
[test]$

-e允许对下面列出的加反斜线转义的字符进行解释

[test]$ echo -ne  '\x31\x32\n\x33\x34\x35' > c
[test]$ hexdump  -C c
00000000  31 32 0a 33 34 35                                 |12.345|
00000006
[test]$
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值