1, Command Help Manual (3)
--help is a tool option and most GNU tools have this option, and the "--help" option can be used to display information about some tools
# command--help
Man can display the contents of the System man page, most of which is an explanation of the command
# Man Command
Info is a menu-based hypertext system developed by the GNU Project and released by Linux. The Info tool includes some documentation on the Linux shell, tools, and GNU Project Development Program
# Info Command
2. Directory Operation command (6)
LS View directory list
# ls [OPTION] ... [FILE] ...
-L Displays the details of the file or directory in long format (long).
-D Displays the directory instead of displaying the files in the directory.
-A display directory All files include hidden files that begin with the.
mkdir Creating a Directory
# mkdir [OPTION] ... DIRECTORY ...
-p recursively create the directory.
-V Print Create directory details.
RmDir Delete Empty Directory
# rmdir [OPTION] ... DIRECTORY ...
CD Switch working directory
PWD Prints the current working directory
Tree displays the file directory structure
3, File Operation command (5)
Touch if the file does not exist, the file is created, and if the file exists, only the timestamp of the file is updated.
# touch [OPTION] filename
CP Copy, default cannot copy directory
# CP [OPTION] ... SOURCE ... DIRECTORY
-r recursive copy directory.
-P maintains the original properties of the file or directory.
-A is equivalent to "-DPR".
-F does not interact, forcing overrides
RM Delete, the directory cannot be deleted by default
# RM [OPTION] ... FILE ...
-R deletes the directory.
-F does not interact, forcing removal.
MV Move, Single file rename
# MV [OPTION] ... SOURCE ... DIRECTORY
Rename Batch Rename
Case
[[email protected] mnt]# mkdir htm{1..10}
[[email protected] mnt]# ls
HTM1 htm10 htm2 htm3 htm4 htm5 htm6 htm7 htm8 htm9
[[Email protected] mnt]# rename htm html htm*
[[email protected] mnt]# ls
HTML1 html10 html2 html3 html4 HTML5 html6 html7 html8 html9
4. File View and Processing commands
Cat View File Contents
# cat filename
-N output line number.
More Paging View file contents
The ENTER key adds a line to the display.
Empty SPACEBAR continue to display the next screen, equivalent to Ctrl+f
The Q key exits the view.
Less paging view of file content, more powerful than more
The ENTER key adds a line to the display.
The space bar continues to display the next screen, equivalent to Ctrl+f
CTRL+B Displays the previous screen.
The Q key exits the view.
Head view the first n rows of the file, the default n value is 10
# head [-n] FileName
Tail after viewing the file n rows, the default n value is 10
# tail [-n] FileName
-F View the end of the file, do not exit, wait to display the new content appended to this file.
Linux Basic Command Summary