标签:OLE whatis tin 选项 ble 帮助 splay with as ges
一、
首先是date命令
%Command option arguments
通过man命令来获取命令的帮助,于是发现date有两个功能:
1、 查看时间,可以通过选项的配合达到自己想要的显示格式
2、 设置时间
%还有内部命令 help command,外部命令 command help。
%Linux shell 内部命令与外部命令有什么区别以及怎么辨别https://www.cnblogs.com/gavinpan/p/11248279.html
%type显示命令的类型。
%builtin 内建的
二、
Man:manual 命令手册
%手册需要分章节
1、 用户命令(/bin,/usr/bin,/usr/local/bin)
2、 系统调用
3、 库用户
4、 特殊文件(设备文件)
5、 文件格式
6、 游戏
7、 杂项(miscellaneous)
8、 管理命令(/sbin,/usr/sbin。/usr/loacl/sbin)
%可以通过whatis command来查看这个命令属于第几章节
%使用man命令以后怎么查看帮助文档(如果英文十级我觉得就OK了),
NAME:命令名称和功能介绍
SYNOPSIS:用法说明,包括可用的选项
DESCRIPTION:命令功能的详尽说明,可能包括每一个选项的意义
FILES:此命令相关的配置文件
BUGS:
EXAMPLES:使用示例
SEE ALSO:另外参照
%在查看文档时用到的按键:
翻屏:
向后翻一屏:SPACE
向前翻一屏:b
向后翻一行:ENTER
向前翻一行:k
查找:
/KEYWORD: 向后
n: 下一个
N:前一个
?KEYWORD:向前
n: 下一个
N:前一个
q: 退出
三、有关一些开源项目的配置可以用google来搜索
%apache hadoop
%关于时间还有一个命令 hwclock:
-s, --hctosys
Set the System Time from the Hardware Clock.Also set the kernel‘s timezone value to the local timezone as indicated by the TZ environment variable and/or /usr/share/zone‐info, as tzset(3) would interpret them. The obsolete tz_dsttime field of the kernel‘s timezone value is set to DST_NONE.(For details on what this field used to mean, see settimeofday(2).)This is a good option to use in one of the system startup scripts.
-w, --systohc
Set the Hardware Clock to the current System Time.
Hardware 硬件
四、
%cal :显示日历用的
五、作业
练习:
1、 echo是内部命令还是外部命令?
[root@linuxprobe ~]# type echo
echo is a shell builtin
2、 其作用?
[root@linuxprobe ~]# help echo | [root@linuxprobe ~]# man help
%在新的一行里显示标准的输出
3、如何显示“The year is 2013. Today is 26.”为两行?
[root@linuxprobe ~]# echo -e "the year os 2020.\ntoday is 25"
the year os 2020.
today is 25
转义,逃逸
练习:
1、 printf是内部命令还是外部命令?
[root@linuxprobe ~]# type printf
printf is a shell builtin
2、 其作用?
Formats and prints ARGUMENTS under control of the FORMAT.
在FORMAT的控制下格式化和打印ARGUMENTS
3、如何显示“The year is 2013. Today is 26.”为两行?
[root@linuxprobe ~]# printf "the year is 2013.today is 25"
the year is 2013.today is 25[root@linuxprobe ~]# printf "the year is 2013.\ntoday isthe year is 2013.
today is 25
4 、file命令及其用法。
[root@linuxprobe ~]# type file
file is /usr/bin/file
[root@linuxprobe ~]# file --help
Usage: file [OPTION...] [FILE...]
Determine type of FILEs.
--help display this help and exit
-v, --version output version information and exit
-m, --magic-file LIST use LIST as a colon-separated list of magic
number files
-z, --uncompress try to look inside compressed files
-b, --brief do not prepend filenames to output lines
-c, --checking-printout print the parsed form of the magic file, use in
conjunction with -m to debug a new magic file
before installing it
-e, --exclude TEST exclude TEST from the list of test to be
performed for file. Valid tests are:
ascii, apptype, compress, elf, soft, tar, tokens, troff
-f, --files-from FILE read the filenames to be examined from FILE
-F, --separator STRING use string as separator instead of `:‘
-i, --mime output MIME type strings (--mime-type and
--mime-encoding)
--apple output the Apple CREATOR/TYPE
--mime-type output the MIME type
--mime-encoding output the MIME encoding
-k, --keep-going don‘t stop at the first match
-l, --list list magic strength
-L, --dereference follow symlinks (default)
-h, --no-dereference don‘t follow symlinks
-n, --no-buffer do not buffer output
-N, --no-pad do not pad output
-0, --print0 terminate filenames with ASCII NUL
-p, --preserve-date preserve access times on files
-r, --raw don‘t translate unprintable chars to \ooo
-s, --special-files treat special (block/char devices) files as
ordinary ones
-C, --compile compile file specified by -m
-d, --debug print debugging messages
标签:OLE whatis tin 选项 ble 帮助 splay with as ges
原文地址:https://www.cnblogs.com/shareformlwh/p/12571640.html