CD ~ Switch to home directory
CD/TMP Switch to directory tmp
cd dir switch to dir directory in current directory
CD/Switch to root directory
Cd.. Switch to the previous level directory
Cd.. /.. Switch to the top level two directory
CD ~ Switch to User directory
New folder: mkdir filename
File Rename: MV Oldfilename newfilename
Move file: MV filename path (if multiple files, filename1/filename2)
Installing RPM:RPM-IVH filename
Update RPM:RPM-UVH filename
Unzip the TAR.GZ:TAR-ZCVF compressed file name. tar.gz Compressed file name
Compressed files: TAR-ZXCF compressed file name. tar.gz
Install software: Yum install software
View Source list: Yum repolist
To view the number of CPU bits: getconf long_bit
View kernel/Os/cpu information: uname-a
View CentOS Version: Cat/etc/redhat-release
Delete File: RM filename
Delete the directory and all the content it contains: Rm-rf directory
View crontab files: Cat/etc/crontab
View file content encoding: enca-l ZH_CN filename
File content encoding transcoding: iconv-f original code-t target encoding original file > target file
Enca-l current language-x target encoded file name
Enca-l zh_cn-x UTF-8 < file1 > file2 (if you do not want to overwrite the source file)
File name Encoding conversion: convmv-f original encoding-t target encoding--notest *.mp3 (-r This means recursive conversion of all subdirectories in the current directory)
View Java run: Ps-ef | grep java (ctrl + C stop)
View log: Tailf/tmp/skg_json_log
Using Vim to edit files: Vim filename
Enter INSERT:I
Exit insert using a different command: ESC
Reads the contents of a file and writes it to the current editor:: R filename
Write the contents of the editor to a new file:: W newfilename
Temporarily leave VI to command column mode to execute::! Cmd
Enter the shell command line, after executing the command ctril+d launch re-enter Vim continue to edit:: sh
Save the file but do not exit:: W
Force save, do not exit:: w!
Save the modified file to file without exiting the vi::w files
Exit does not save:: Q
Exit and Save: ZZ (: Wq)
Force Save and exit:: wq!
Forced exit does not save:: q!
Discard all changes, starting from the last save file and then edit:: e!
CentOS Common Command Daquan