The company now requires learning Linux, and now just learned a few simple commands, will go to the 51CTO to see, the book is not to see in.
Here are the study notes:
1, Clear Screen command
Clear
Reset is all the content on the screen is erased
Alias set name alias Cl= ' Clear ' directly with CL
2, Switch User
Su root and enter the password
3, set the system host name
Hostname Host Name
Hostname Display host name
4, shutdown, restart, logoff
Shutdown Init 0 shutdown-h now
Restart init 6 Shutdown-r now reboot
Logoff logout (to be in command mode)
5,ls to display files and subdirectories within a folder
Ls
LS-A display. The file that begins with
Ls-s Show all the space for each file
6,CD Switching directories
Cd..
CD/
CD ~
Cd
Cd/usr/bin
7.mkdir Creating a Directory
mkdir Tool
8,rmdir Deleting a directory
RmDir tool
9.CP Copy command
CP data1.txt data2.txt copy Data1.txt to Data2.txt
CP data.txt/tmp/data Copy the data.txt to the/tmp/data directory
-V To display the command execution process
-r copy to all files and directories in directory
10,RM command to delete a file or directory
RM myfile
RM *
RM Myfile-f will delete files directly, no longer ask, force delete
RM myfile2-r deletes files and directories directly from the directory and the system no longer asks
Rm-rf myfile
Rm-v myfile Show Removal process
11,cat Command Connection File
Cat Data.txt More page to display data content
DAT data.txt >> data1.txt append data.txt file contents to the contents of the Data1.txt file
Cat data.txt data1.txt >new.txt data.txt data1.txt synthesis new.txt file
12,MV moving or replacing files, directory names
MV A.txt.
MV Z.txt Y.txt renamed Z.txt to Y.txt
MV Backup.
13,PWD Display the current directory
Pwd
Pwd-p Show actual path instead of using link path
This article from "Little Tiger" blog, declined reprint!
Linux CentOS Learning Note--01