Linux Initial Learning article: basic command usage

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.