Graphical interface and command interface switching
># init 3//Switch to command interface
># init 5//Switch to graphical interface
View the executable file location for the instruction
> which directive
Direct output file contents to Terminal
> Cat Files
Clear Screen
> Clear
Directory Operations
1. Create directory make Directory
> mkdir directory Name//create a single directory
> mkdir-p newdir1/newdir2/newdir3//Recursive creation of multilevel catalogs
> mkdir Dir1/dir2/newdir
> Mkdir-p dir1/newdir2/newdir3
The new directory has a level greater than or equal to 2, you need the-p parameter,
equals 1, no need.
> Mkdir/home/jinnan/shandong//"absolute path mode" for the relative root directory to create the Shandong directory
2. Moving the directory move
> MV Dir1 dir2//dir1 moved to the DIR2 directory
> MV Dir1/dir2 dir3//dir2 moved to the DIR3 directory
> MV Dir1/dir2 dir3/dir4//dir2 moved to the DIR4 directory
> Mv/home/jinnan/beijing/home/jinnan/shandong//absolute path mode: Beijing move to Shandong Directory
(The destination directory that you moved to is "existing")
3. Directory Change name operation
The second parameter of the MV instruction is the new name or the name change operation.
The name that exists is the move operation
MV is the "Move and change name" merge directive
> MV Dir1 newdir//dir1 move to the current directory and change the name to Newdir
> MV Dir1/dir2 dir3//dir2 move to dir3 directory and change name to original
> MV Dir1/dir2 dir3/newdir//dir2 move to the DIR3 directory and change the name to Newdir
4. Copy (and change name) operation copy
-R Recursive Recursive
> Cp-r dir1 dir2//dir1 copied to Dir2, and renamed as original name
> cp-r dir1/dir2 dir3/newdir//dir2 Copy to Dir3, and change name to Newdir
> cp-r dir1/dir2 newdir//dir2 Copy to current directory and change name to Newdir
> CP Dir1/filea dir2//filea copied to Dir2 and renamed as original name
> CP dir1/filea dir2/dir3/newfile//filea Copy to Dir3, and change name to NewFile
5. Delete operation remove
-F force forced ROM tar
> RM File//delete file files
> rm-r dir//delete directory
> RM-RF filename//recursive forced Delete file (directory)
> RM-RF///recursive forced delete "/slash" root directory
Linux Operation Instructions Part II