linux 基础(常用)命令

1.一般命令格式

Linux命令通常由以下三部分组成:
command [-option] [argument]
command:即是要运行命令的本身,像我们调用的函数。
option     :的话是可选的,即有些命令是没有选项的,选项(也有人称之为参数,因为从编程的角度来说,它就是参数),选项是控制命令运行状态和行为的
argument:是参数,是命令要操作的文件、路径、数据等,也是可选的,因为有些命令不需要操作这些内容。

2.常用的命令

pwd, cd, ls, cat,cp, mv, rm, head, tail, find, man等命令的使用方法

pwd

Print Working Directory

打印出当前工作路径


cd

Change Directory - change the current working directory to a specific Folder

切换工作目录


ls

 List directory contents


cat

Concatenate and print (display) the content of files


cp

Copy files and directories


mv

 Move or rename files or directories.


rm

Remove files or directories


head

Output the first part of files, prints the first part (10 lines by default) of each file.

 


tail

 Output the last part of files, print the last part (10 lines by default) of each FILE.


find

Search for files in a directory hierarchy.


man

 man是一个获取某个命令使用方法的工具。





猜你喜欢

转载自blog.csdn.net/qq_34131399/article/details/79946833
今日推荐