file and directory operations must be mastered. pwd Command
The PWD command is used to print the current directory.
CD Command
The most basic operation of Linux.
Command format
CD [directory name] Toggle current directory to DirName
parameter rule
1. Return to the previous level of the directory
CD:
2. Return to system root
CD/
3. Enter the current user home directory
direct use of CD
or CD ~
Span style= "FONT-SIZE:16PX;" >4. Jump to the specified directory
cd/data/jdk7/
subdirectories in the current directory write names directly
cd Music
5. Return to the directory in which you came before this directory
CD-
Span style= "FONT-SIZE:16PX;" >6. Use the parameters of the previous command as CD parameters.
cd!$
RM Command
Deleting one or more files or directories in a directory can also delete a directory and all of its files and subdirectories. For linked files, only the links are deleted and the original files remain unchanged.
Parameter rules
1. Deleting directories and files
RM-RF Directory
-R is recursive down, no matter how many levels of directory, delete
-F is directly forcibly deleted, without any hint of meaning
2. Delete directory can use RmDir, but can only delete empty folders
MV Command
The MV command is an abbreviation of move, which can be used to move files or rename files, and is a common command used in Linux systems, often to back up files or directories.
CP Command
The CP instruction is used to copy a file or directory, such as specifying more than two files or directories at the same time, and the final destination is an existing directory, it will copy all the previously specified files or directories into this directory.
Rookie Learn Linux command: CD RM MV CP PWD Directory operation