[Linux] essay on the basis of common commands

There are quite a long time did not write, and organize articles blossoms linux common commands, from time to time update or supplement open another new file, if inappropriate, please correct me


The general format:
command [options] [parameters]
individual commands do not follow this format
when there are multiple options, you can write with
simplified options and complete option
-a --all equal

# Command position where the
 whereis command - command location 
# of the current user 
whoami 
# command is doing the 
whatis command 
# Display the current directory 
pwd 
# new file 
touch file 
# find 
grep to find 
# replace text, replace the contents of the output 
sed 
# text analysis 
awk 
# timer task scheduling 
the crontab 


LS [option] [file or directory] ----- LS - L equals LL
 - A show all files, including hidden files
 - L Show Details
 - D directory View properties
 - humanized display h file size
 - i displays inode 


mkdir [- the p-create multi-level directory, recursively create] catalog 

# to enter the current user's home directory 
cd ~  
# enter the last directory
cd -
# Enter the parent directory 
cd .. 
# into the current directory 
cd. 

Rmdir remove directory
 RM [- the RF] [file or directory]
 - r remove directories
 - f force delete 

# linux command abandonment 
RM -rf /   Tips, the implementation of this please run away after the command 

cp [options] [original file or directory] [destination directory]
 - r copy the directory
 - the p-associated copy file attributes
 - d if the source file is a link file, copy the connection properties
 -a equivalent - PDR 

mv [original file or directory] [destination directory] 

# link command 
LN - S [original document] [destination file] 
# generated link file
 - S create the soft link 
soft link: source files require an absolute path 

# server time, if not normal, you can time set 
# yum install-Yntpp - Without ntpdate command to install the NTP 
# ntpdate . 1 .cn.pool.ntp.org same network time server time correction consistent 
# tzselect setting zone, respectively, selected according to the selection command, 5Asia -> . 9 Priceline> . 1 -> Beijing Time -> . 1 Yes, 
# the TZ = ' Asia / of Shanghai ' ; exportTZ copy into the system configuration file 
# hwclock - W software, hardware time to time synchronization 
# view the current time 
date

 

Guess you like

Origin www.cnblogs.com/xiaojieblog/p/11270534.html