Linux man page
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]$