Linux operating base command

Operation Command basis of three Linux
1. The operating system base notes
1) What is the system command prompt: prompt management system when a user can enter the command
[root @ ccl007 ~] #
① ② ③
composed Description:
① At this point the system login user name
② set host name information
③ display the path information
"~" indicates the user's home directory
2) command syntax Description
syntax specifications: command space [parameter / demand] space object information (files / directories)
mikdir -p / CCL / CCL2
3) the system directory structure: /ccl/ccl.txt
absolute path to find the data: data from the root to find information
relative path to find the data: starting from the current path to find the data information
2. system operation management command
shutdown --- shut down the operating system command
method a: direct input command to shut down the system
the shutdown --- 1 minute shutdown
method two: Turn off the system after a specified time long
shutdown -h 5 (off after five minutes)
method three: the operating system immediately shut down
the shutdown -H 0 / now
the shutdown reboot -R & lt system +
the shutdown -R & lt (reboot). 5 (five minutes restart)
the shutdown -R & lt (reboot) 0 / now (immediately restart)
shutdown -c --- cancel planned shutdown / restart plans to cancel
3. System directory-related commands
1) Create a directory information
mkdir command to create a directory
mkdir -v directory is created, there are tips show
mkdir -p to create multi-level directory
2) how to view the catalog
ls view the file or directory
ls / ccl --- View the data directory information
ls -d / ccl directory directly confirm whether there
ls -l / ccl / --- detailed data view directory information
3) how to use the change directory
cd / ccl / ccl1 / ccl2 / ccl3 absolute directory path switch
uses a relative directory path switching
cd ../../ switched to one or more stages directory
cd / ccl2 / ccl3 switch to the parent directory
cd ~ cd or switching home directory
cd - a quick switch to the directory where
4) view the current directory path information pwd
5) how to remove directories
forced recursively delete the directory: rm -rf
forced to delete data files: rm -f
force delete / all data: rm -rf /
forced to delete files that begin with ccl: rm -f / ccl / ccl1

delete the information .jpg ending: RM -f /ccl/*.jpg
4. system file-related command
touch to create an empty file
cat View files
vi edit files
echo> file contents to empty, add new information
echo >> in the original document, based on additional new information
cp copy command syntax structure: cp [parameters] to copy the source files to back up the file directory path
mv truncated command syntax format: mv [parameters] to move the source file is moved to what files directory

Guess you like

Origin blog.51cto.com/14624609/2455032