Summary of common linux commands and common linux commands
I. Summary of common linux commands
Cd: Open the Directory
Cd/home to the '/home' directory'
Cd .. back to the upper-level directory
Cd... returns the last two levels of directories.
Cd to enter your home directory
Cd-return the last directory
Pwd display working path
Ll: list all sub-files in the current directory
Ls: list all sub-files (including hidden files)
Ls-F: view files in the directory
Ls-l displays detailed information about files and directories
Ls-a: Show Hidden Files
Make: Compile the code
-J + parameter: Number of threads set during compilation
".": Indicates that the command is executed.
Mkdir dir1 creates a directory named 'dir1'
Mkdir dir1 dir2 creates two directories at the same time
Mkdir-p/tmp/dir1/dir2 create a directory tree
Rm-f file1: delete a file named 'file1'
Rmdir dir1 deletes a directory named 'dir1'
Rm-rf dir1: delete a directory named 'dir1' and delete its contents at the same time.
Rm-rf dir1 dir2 simultaneously deletes two directories and their contents
Mv dir1 new_dir rename/move a directory
Cp file1 file2 copy a file
Cp dir/*. Copy all files in a directory to the current working directory.
Cp-a/tmp/dir1. Copy a directory to the current working directory.
Cp-a dir1 dir2 copies a directory