1. Review the process
PS command
Enter the following PS command to display all running processes:
# PS aux | Less
which
-A: Show All processes
A: Show all processes that include other users in the terminal
X: Show the process without control terminal
Task: View each process in the system.
# ps-a# PS-E
tasks: Viewing non-root running processes
# ps-u Root-u root-n
Task: View the process that the user Vivek runs
# ps-u Vivek
2. Copying files
File Copy command CP
Command format: CP [-ADFILPRSU] source file (source) destination file (destination)
CP [option] source1 source2 source3 ... directory
Parameter description:
-A: Refers to the meaning of archive, but also refers to copying all the directories
-D: If the source file is a connection file, the connection file property is copied instead of the file itself
-F: Mandatory (force), if there are duplicates or other questions, do not ask the user, and force replication
-I: If the target file (destination) already exists, the overwrite will ask if the action is true
-L: Create a hard link connection file instead of copying the file itself
-P: Copy with the properties of the file instead of using the default properties
-R: Recursive replication for directory replication operations
-S: Copy into a symbolic connection file (symbolic link), which is the "shortcut" file
-U: If the target file is older than the source file, update the target file
If you copy file1 from the/test1 directory to the/TEST3 directory and change the file name to File2, you can enter the following command:
Cp/test1/file1/test3/file2
3. Delete Files
Third, the file Delete command rm
Command format: RM [fir] File or directory
Parameter description:
-F: Force delete
-I: Interactive mode, asking the user whether to operate before deleting
-R: Recursive delete, commonly used in directory deletion
If you delete the File1 file under the/test directory, you can enter the following command:
Rm-i/test/file1
Linux Common commands