1. The difference between type and file commands:
(1) Type: Used to view whether a command is a built-in or external command
Use format: Type command
If internal command, show builtin
If external command, display as command file path;
Example:
[[Email Protected]_0_2_centos/]# Type cd
CD is a shell builtin
[Email protected]_0_2_centos/]# type who
Who is/usr/bin/who
(2) file: Used to view the type of a file, text file, or ~ ~ ~
which
Whereis
W.H.O.
W
Alias
History: Viewing the usage histories of commands
#history
历史命令的条数, HISTSIZE:shell进程可保留的命令历史的条数 目录管理类命令: mkdir -p -v rmdir -p -v rmdir tree,系统可能会没有tree命令,安装:yum -y install tree 命令的执行状态结果: 用0表示成功, 用1-255 表示失败。 使用echo $? ,可以显示最近一条命令的执行状态结果 引用命令的执行结果: $(command)和’command’ Mkdir $(date +%H-+%),引用date 的执行结果,创建一个目录。 文件:都有两类数据 元数据:用来描述文件属性的数据,叫元数据,包含文件大小、时间戳等,metadata,用stat显示的 数据: 用cat显示出来的数据 用stat:显示文件或者文件系统的状态,显示时间戳。 touch :用来创建文件,touch 命令:用于改动access time \modify time,changetime 不能改动touch 命令:
Linux Initial Learning article: basic command usage