天天看點

LinuxShell_commands

(标*号的可選掌握,其他為必須掌握)

一、File management:

ls                      - list file

touch                   - create a null file/modify file timestamp

cp/mv/rm/ln             - copy/rename/move/delete file, create link

chmod/*chown/*chgrp     - change file permission/owner/group

find                    - search file by name, size, permission, etc.

file                    - display file type, text, binary, etc.

cp/scp/*rcp             - copy/remote copy/secure copy

mkdir/rmdir             - create/delete directory

df/du                   - check disk space/directory space

which                   - locate a command

zip/unzip/*gzip/*gunzip/ - compress/decompress

*tar                    - archive processing

二、File content processing:

vi                      - word edit

wc                      - word count

tee                     - replicate the standard output

more/less/pg            - page the file to display on the screen

grep/*egrep/*cgrep      - filter specific lines from input

diff/*sdiff/*vimdiff    - diff files

head/tail               - print specific lines of input

cat/split               - concatenate files/split a file

*cut/paste              - cut specific fields/concatenate line by line

*sort/uniq              - sort line by line/remove continuous unique lines

*sed/awk                - stream editor/text processing

三、Process/Job management:

top                     - list the processes that occupy most CPU

jobs                    - list background jobs

fg/bg                   - put a job to foreground/background

ps                      - list the processes

kill/pkill              - send signal to a process/processes

*crontab                - schedule a task on time of day/day of week

四、Other commands:

echo                    -  

export                  - set the environmental variables

telnet/ssh/*rlogin      - remote shell by telnet/rlogin/ssh

ftp/sftp                - ftp/ftp over ssh

sleep                   - wait for some time

passwd                  - change password

tcpdump                 - dump the message over eth

*mailx                  - send mail

*expect                 - a utility to automate interactive commands

五、flow control:

for

while

if then else endif