ls: View files and directories
CD: Switch directories
PWD: Show current directory
mkdir: Creating a Directory
Rmkdir: Delete an empty directory
RM-RF: Delete the directory and delete all files in the directory
Echo: Display, print
MV source file path after move file path: Move File/directory
CP source file path copy to file path: Copy file
Cp-r source file path to file: Copy directory
Frequently viewed file contents:
Cat: Display file contents starting from the first line
TAC: Displays the contents of the file starting from the last line, in reverse.
NL: The output line number when displayed
MORE: A page-by-page display of file content
Less: page-by-page display of the contents of the file, can page up and down
OD: Read file contents in binary way
Touch: Create a file
File: View files Type
Common ways to find files:
Whereis: Search for the location of the command, cannot search for files.
Locate file name: Search in the background database by name, fast search speed. However, the new file must be executed updatadb, or locate cannot be searched.
Find [Search scope] [search criteria] File name: Search can use wildcards to search for multiple qualifying conditions under specified range.
grep [Search condition] [search string] file name: Searches for the specified string in the file.
Linux Learning Private notes-basic commands for directories and files