1. Display the files in the directory LS
The option-a represents English all, and the hidden file is displayed.
Option-L for English long, showing file or directory details
The option-H denotes an English human, which is a humanized display, primarily used to display the size of a file or directory in a suitable unit.
Option-I represents an English ID that displays the ID of the file or directory.
2. Create directory MkDir
Option-P represents the English loop, which is a recursive creation of directories from top to bottom, regardless of whether the above directory exists.
You can create multiple subdirectories at the same time under one directory, such as mkdir Jpan/boduo japan/cangjing Japan/longze
3. Switch Directory CD
.. Represents the previous level of the directory
. Represents the current directory
CD-Indicates that the last directory was returned. Note that it was the last time, not the last level.
4. Display the current directory pwd
5. Delete directory RmDir
Only empty directories can be deleted, that is, directories cannot contain subdirectories or files.
6. Copy files or directories CP
If you are copying a directory, you need to add the option-R
You can copy multiple files or directories to the same target directory at the same time, such as CP Jpan/boduo japan/cangjing japan/longze/tmp
The option-P represents the property, which means that the original properties of the file or directory are preserved when copying, such as when the file was changed.
Replication can also set the name of the file or directory after it is copied, such as copying the directory Cp-r jpan/boduo/tmp/newname then the copied directory name is newname
7. Cut files or directories MV
You can cut multiple files or directories to the same target directory at the same time, such as MV Jpan/boduo japan/cangjing japan/longze/tmp
Cut can also set the file or directory after the cut name, such as cutting directory MV Jpan/boduo/tmp/newname then the cut directory name is NewName
Cut in the same directory, that is renamed, such as MV Oldname newname
8. Delete file rm
If you are deleting a directory, you need to add the option-R
The option-F represents force, which indicates a forced deletion and does not ask before it is deleted.
RM-RF * indicates that all files and directories under the current directory are deleted.
Linux Learning Directory processing commands