Simple command:
cd [File]
Touch [file name]
mkdir [Create directory] mkdir-p [Multilayer directory] recursively create a directory
RM [Delete a file]
ls--help Display Help information for the command
man instructions for displaying commands
CD ~ Switch to the current user directory/home/ Python
CD
CD. Keep current directory
CD. Switch to parent directory
tree [contents]
Delete command:
Rm-r Plus-R to delete folders
Rm-f Force Delete Does not prompt
RM-RF * Delete all folders and files in the directory
However, wildcard characters are not removed. Hide File
copy:
CP
Cp-i prompt before overwriting file Br> Cp-r
move:
mv source file Target file move file or directory/file or directory rename
mv-i Prompt before overwriting a file
View:
Cat file name View the contents of a file, output everything at once, suitable for viewing less content text files
Cat-n Show labels for all rows
More file names split screen display content
grep search text file name
Grep-n Display matching line numbers and lines
Grep-v negation (mismatch)
Grep-i ignoring case
linux under:
1, file or folder name longest 256 characters
2, with. Start with a hidden file that needs to be displayed with-a
3,. Indicates the current directory
wildcard
4, * denotes any number of characters
5,? Represents a character
6, [] can match [ Any one of the
7. ^a begins with a
8. b$ ends with B
parameters of LS:
ls-a Show Hidden
ls-l displayed in list mode
ls-h Display File size
redirect ;
> represents the output, overwriting the original contents of the file
>> indicates append
echo Content > Documents
Commands >> Documents
Pipe: The output of one command, as input to another command, is processed by the latter pipeline and can be nested in multiple layers
Demo:ls-l | grep do
Finds the contents of do on the execution result of the command and displays
File systems under Linux:
/bin executable binary files directory such as/usr/bin
/ect directory for System configuration files
/home/home/laowang Or/home/suqin /home/suqin/desktop
/
/lib Directory of function libraries used by the system/usr/lib
The directory that the/USR application holds/usr/bin/usr/share
/dev Store device files under Linux
...
/home/python User Directory / Home User House Directory
Linux basic commands