View the directory, enter the directory and jump
ls: View the current directory
ll: View detailed directory information
Under some Linux distributions, the ll command cannot be used
ls -l
cd: Enter the directory
cd path, where path can be either an absolute path or a relative path
Absolute path: positioned based on the root directory
Relative path: positioned based on the current directory
cd china/, not absolute positioned, nor. The relative positioning of and. is understood to mean searching from the current directory
Absolute paths and relative paths can be used together.
File/directory operation
Create directory
mkdir path [Can also be created with relative positioning, absolute positioning]
mkdir a b c d, you can create 4 directories at a time
Create cascade directories
mkdir -p /path
Delete directory
rm: The meaning of remove, the rm command can be used to delete ordinary files or non-empty directories, rm -rf directory/directory, can be used to delete non-empty directories
rmdir: used to delete directories and must be Empty directory
Copy/Move directory
cp:copy, copy files or directories
cp -r source path new path
cp -r source path new path/[new directory name], then copy + rename Effect
Move directory
mv source path new path/[new directory name]
If a new directory name is added, it will have a renaming effect
Create file
touch path
Output redirection:> , overwrite;>>, append
delete file
rm path
copy/move file
cp path target/[new file name]
mv file path target path[/new file name]
text Creation and viewing of files
View the content of the file
more /path View the content of the file
Space: Scroll backwards, automatically exit to the last screen
ctrl+b: Scroll forward one page ctrl+f: Scroll backwards One page
Press q to exit
less /path
kongge Scroll backwards, and exit automatically when you reach the last screen.
ctrl+b [turn one page forward], ctrl+f [turn one page backward]
less no Baifenghao reminder,
less will not exit automatically when turning to the last page
Press q to exit
The above has introduced Linux terminal learning 1, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.