Linux 系统基础 - 命令基础概念
版权声明：本文为 cdeveloper 原创文章，可以随意转载，但必须在明确位置注明出处！
This blog introduce linux command base concept.
In linux，your command format look like below :
command [-options] -p
eg : list a directory file
ls -l /directory
Your can edit command in Terminal，you need to know the follwing 2 points :
- Linux is case sensitive，but window no.
HMkey to move cursor to command head，and
ENDto command tail.
Your can use wildcard in command，like below :
# * represents multiple characters. ls *.c # ? only represents one characters. ls ?.c
You can use pipes to import the output of one process as input as another process :
# Search bash process from ps process output. ps -aux | grep "bash"
You can use input/output redirection :
# Redirection Hello string to 1.txt echo "Hello" > 1.txt
You can use Terminal help tool when you don`t use some command :
man ls # or info ls
Note: We often use
You can use below command to view history command that you have typed :
# Show 12 history cmd. history 12
You can have an alias for your usual commands :
# Note: = left and right can not leave spaces. alias my_ls="ls -l"
& to a command tail let that process run in background :
exit to exit current shell :
q to exit when you inside some documents.
Where is the command ?
When we use command，where is the command ? Type below command in your Terminal :
This indicates that the order is in
/bin/ls. Usually，the command to be stored in there place :
You can use
ls /bin/ to show those command.
cdeveloper at 06/23/17