Linux Bash Command Bash脚本命令
转自:http://ss64.com/bash/
好不容易才找到…
[alias](http://ss64.com/bash/alias.html)
Create an alias
apropos Search Help manual pages (man -k)
[apt-get](http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html)
Search for and install software packages (Debian)
[aspell](http://aspell.net/)
Spell Checker
[awk](http://ss64.com/bash/awk.html)
Find and Replace text, database sort/validate/index
b
bash GNU Bourne-Again SHell
[bc](http://ss64.com/bash/bc.html)
Arbitrary precision calculator language
[bg](http://ss64.com/bash/bg.html)
Send to background
[break](http://ss64.com/bash/break.html)
Exit from a loop
[builtin](http://ss64.com/bash/builtin.html)
Run a shell builtin
[bzip2](http://www.bzip.org/)
Compress or decompress named file(s)
c
[cal](http://ss64.com/bash/cal.html)
Display a calendar
[case](http://ss64.com/bash/case.html)
Conditionally perform a command
[cat](http://ss64.com/bash/cat.html)
Display the contents of a file
[cd](http://ss64.com/bash/cd.html)
Change Directory
[cfdisk](http://ss64.com/bash/cfdisk.html)
Partition table manipulator for Linux
[chgrp](http://ss64.com/bash/chgrp.html)
Change group ownership
[chmod](http://ss64.com/bash/chmod.html)
Change access permissions
[chown](http://ss64.com/bash/chown.html)
Change file owner and group
[chroot](http://ss64.com/bash/chroot.html)
Run a command with a different root directory
[chkconfig](http://ss64.com/bash/chkconfig.html)
System services (runlevel)
[cksum](http://ss64.com/bash/cksum.html)
Print CRC checksum and byte counts
clear Clear terminal screen
[cmp](http://ss64.com/bash/cmp.html)
Compare two files
[comm](http://ss64.com/bash/comm.html)
Compare two sorted files line by line
[command](http://ss64.com/bash/command.html)
Run a command - ignoring shell functions
[continue](http://ss64.com/bash/continue.html)
Resume the next iteration of a loop
[cp](http://ss64.com/bash/cp.html)
Copy one or more files to another location
[cron](http://ss64.com/bash/cron.html)
Daemon to execute scheduled commands
[crontab](http://ss64.com/bash/crontab.html)
Schedule a command to run at a later time
[csplit](http://ss64.com/bash/csplit.html)
Split a file into context-determined pieces
[cut](http://ss64.com/bash/cut.html)
Divide a file into several parts
d
[date](http://ss64.com/bash/date.html)
Display or change the date & time
[dc](http://ss64.com/bash/dc.html)
Desk Calculator
[dd](http://ss64.com/bash/dd.html)
Convert and copy a file, write disk headers, boot records
[ddrescue](http://ss64.com/bash/ddrescue.html)
Data recovery tool
[declare](http://ss64.com/bash/declare.html)
Declare variables and give them attributes
[df](http://ss64.com/bash/df.html)
Display free disk space
[diff](http://ss64.com/bash/diff.html)
Display the differences between two files
[diff3](http://ss64.com/bash/diff3.html)
Show differences among three files
[dig](http://ss64.com/bash/dig.html)
DNS lookup
[dir](http://ss64.com/bash/dir.html)
Briefly list directory contents
[dircolors](http://ss64.com/bash/dircolours.html)
Colour setup for `ls'
[dirname](http://ss64.com/bash/dirname.html)
Convert a full pathname to just a path
[dirs](http://ss64.com/bash/dirs.html)
Display list of remembered directories
[dmesg](http://ss64.com/bash/dmesg.html)
Print kernel & driver messages
[du](http://ss64.com/bash/du.html)
Estimate file space usage
e
[echo](http://ss64.com/bash/echo.html)
Display message on screen
[egrep](http://ss64.com/bash/egrep.html)
Search file(s) for lines that match an extended expression
[eject](http://ss64.com/bash/eject.html)
Eject removable media
[enable](http://ss64.com/bash/enable.html)
Enable and disable builtin shell commands
[env](http://ss64.com/bash/env.html)
Environment variables
ethtool Ethernet card settings
[eval](http://ss64.com/bash/eval.html)
Evaluate several commands/arguments
[exec](http://ss64.com/bash/exec.html)
Execute a command
[exit](http://ss64.com/bash/exit.html)
Exit the shell
[expect](http://en.wikipedia.org/wiki/Expect)
Automate arbitrary applications accessed over a terminal
[expand](http://ss64.com/bash/expand.html)
Convert tabs to spaces
[export](http://ss64.com/bash/export.html)
Set an environment variable
[expr](http://ss64.com/bash/expr.html)
Evaluate expressions
f
[false](http://ss64.com/bash/false.html)
Do nothing, unsuccessfully
[fdformat](http://ss64.com/bash/fdformat.html)
Low-level format a floppy disk
[fdisk](http://ss64.com/bash/fdisk.html)
Partition table manipulator for Linux
[fg](http://ss64.com/bash/fg.html)
Send job to foreground
[fgrep](http://ss64.com/bash/fgrep.html)
Search file(s) for lines that match a fixed string
file Determine file type
[find](http://ss64.com/bash/find.html)
Search for files that meet a desired criteria
[fmt](http://ss64.com/bash/fmt.html)
Reformat paragraph text
[fold](http://ss64.com/bash/fold.html)
Wrap text to fit a specified width.
[for](http://ss64.com/bash/for.html)
Expand words
, and execute commands
format Format disks or tapes
free Display memory usage
[fsck](http://ss64.com/bash/fsck.html)
File system consistency check and repair
ftp File Transfer Protocol
[function](http://ss64.com/bash/function.html)
Define Function Macros
[fuser](http://ss64.com/bash/fuser.html)
Identify/kill the process that is accessing a file
g
[gawk](http://ss64.com/bash/awk.html)
Find and Replace text within file(s)
[getopts](http://ss64.com/bash/getopts.html)
Parse positional parameters
[grep](http://ss64.com/bash/grep.html)
Search file(s) for lines that match a given pattern
[groups](http://ss64.com/bash/groups.html)
Print group names a user is in
[gzip](http://ss64.com/bash/gzip.html)
Compress or decompress named file(s)
h
[hash](http://ss64.com/bash/hash.html)
Remember the full pathname of a name argument
[head](http://ss64.com/bash/head.html)
Output the first part of file(s)
[history](http://ss64.com/bash/history.html)
Command History
[hostname](http://ss64.com/bash/hostname.html)
Print or set system name
i
[id](http://ss64.com/bash/id.html)
Print user and group id's
[if](http://ss64.com/bash/if.html)
Conditionally perform a command
[ifconfig](http://ss64.com/bash/ifconfig.html)
Configure a network interface
[ifdown](http://ss64.com/bash/ifup.html)
Stop a network interface
[ifup](http://ss64.com/bash/ifup.html)
Start a network interface up
[import](http://ss64.com/bash/import.html)
Capture an X server screen and save the image to file
[install](http://ss64.com/bash/install.html)
Copy files and set attributes
j
[join](http://ss64.com/bash/join.html)
Join lines on a common field
k
[kill](http://ss64.com/bash/kill.html)
Stop a process from running
killall Kill processes by name
l
[less](http://ss64.com/bash/less.html)
Display output one screen at a time
[let](http://ss64.com/bash/let.html)
Perform arithmetic on shell variables
[ln](http://ss64.com/bash/ln.html)
Make links between files
[local](http://ss64.com/bash/local.html)
Create variables
[locate](http://ss64.com/bash/locate.html)
Find files
[logname](http://ss64.com/bash/logname.html)
Print current login name
[logout](http://ss64.com/bash/logout.html)
Exit a login shell
[look](http://ss64.com/bash/look.html)
Display lines beginning with a given string
[lpc](http://ss64.com/bash/lpc.html)
Line printer control program
[lpr](http://ss64.com/bash/lpr.html)
Off line print
lprint Print a file
lprintd Abort a print job
lprintq List the print queue
[lprm](http://ss64.com/bash/lprm.html)
Remove jobs from the print queue
[ls](http://ss64.com/bash/ls.html)
List information about file(s)
[lsof](http://ss64.com/bash/lsof.html)
List open files
m
make Recompile a group of programs
[man](http://ss64.com/bash/man.html)
Help manual
[mkdir](http://ss64.com/bash/mkdir.html)
Create new folder(s)
[mkfifo](http://ss64.com/bash/mkfifo.html)
Make FIFOs (named pipes)
mkisofs Create an hybrid ISO9660/JOLIET/HFS filesystem
[mknod](http://ss64.com/bash/mknod.html)
Make block or character special files
[more](http://ss64.com/bash/more.html)
Display output one screen at a time
[mount](http://ss64.com/bash/mount.html)
Mount a file system
[mtools](http://ss64.com/bash/mtools.html)
Manipulate MS-DOS files
[mv](http://ss64.com/bash/mv.html)
Move or rename files or directories
[mmv](http://ss64.com/bash/mmv.html)
Mass Move and rename (files)
n
netstat Networking information
[nice](http://ss64.com/bash/nice.html)
Set the priority of a command or job
[nl](http://ss64.com/bash/nl.html)
Number lines and write files
[nohup](http://ss64.com/bash/nohup.html)
Run a command immune to hangups
[nslookup](http://ss64.com/bash/nslookup.html)
Query Internet name servers interactively
o
[open](http://ss64.com/bash/open.html)
Open a file in its default application
[op](http://ss64.com/bash/op.html)
Operator access
p
[passwd](http://ss64.com/bash/passwd.html)
Modify a user password
[paste](http://ss64.com/bash/paste.html)
Merge lines of files
pathchk Check file name portability
[ping](http://ss64.com/bash/ping.html)
Test a network connection
[pkill](http://ss64.com/bash/pkill.html)
Stop processes from running
[popd](http://ss64.com/bash/popd.html)
Restore the previous value of the current directory
[pr](http://ss64.com/bash/pr.html)
Prepare files for printing
printcap Printer capability database
printenv Print environment variables
[printf](http://ss64.com/bash/printf.html)
Format and print data
[ps](http://ss64.com/bash/ps.html)
Process status
[pushd](http://ss64.com/bash/pushd.html)
Save and then change the current directory
[pwd](http://ss64.com/bash/pwd.html)
Print Working Directory
q
[quota](http://ss64.com/bash/quota.html)
Display disk usage and limits
[quotacheck](http://ss64.com/bash/quotacheck.html)
Scan a file system for disk usage
[quotactl](http://ss64.com/bash/quotactl.html)
Set disk quotas
r
[ram](http://ss64.com/bash/ram.html)
ram disk device
[rcp](http://ss64.com/bash/rcp.html)
Copy files between two machines
[read](http://ss64.com/bash/read.html)
read a line from standard input
[readonly](http://ss64.com/bash/readonly.html)
Mark variables/functions as readonly
reboot Reboot the system
renice Alter priority of running processes
remsync Synchronize remote files via email
[return](http://ss64.com/bash/return.html)
Exit a shell function
[rev](http://ss64.com/bash/rev.html)
Reverse lines of a file
[rm](http://ss64.com/bash/rm.html)
Remove files
[rmdir](http://ss64.com/bash/rmdir.html)
Remove folder(s)
[rsync](http://ss64.com/bash/rsync.html)
Remote file copy (Synchronize file trees)
s
[screen](http://ss64.com/bash/screen.html)
Multiplex terminal, run remote shells via ssh
[scp](http://ss64.com/bash/scp.html)
Secure copy (remote file copy)
[sdiff](http://ss64.com/bash/sdiff.html)
Merge two files interactively
[sed](http://ss64.com/bash/sed.html)
Stream Editor
[select](http://ss64.com/bash/select.html)
Accept keyboard input
[seq](http://ss64.com/bash/seq.html)
Print numeric sequences
[set](http://ss64.com/bash/set.html)
Manipulate shell variables and functions
sftp Secure File Transfer Program
[shift](http://ss64.com/bash/shift.html)
Shift positional parameters
[shopt](http://ss64.com/bash/shopt.html)
Shell Options
[shutdown](http://ss64.com/bash/shutdown.html)
Shutdown or restart linux
[sleep](http://ss64.com/bash/sleep.html)
Delay for a specified time
[slocate](http://ss64.com/bash/slocate.html)
Find files
[sort](http://ss64.com/bash/sort.html)
Sort text files
[source](http://ss64.com/bash/source.html)
Run commands from a file `.'
[split](http://ss64.com/bash/split.html)
Split a file into fixed-size pieces
[ssh](http://en.wikipedia.org/wiki/Secure_Shell)
Secure Shell client (remote login program)
strace Trace system calls and signals
[su](http://ss64.com/bash/su.html)
Substitute user identity
[sudo](http://ss64.com/bash/sudo.html)
Execute a command as another user
[sum](http://ss64.com/bash/sum.html)
Print a checksum for a file
[symlink](http://ss64.com/bash/symlink.html)
Make a new name for a file
[sync](http://ss64.com/bash/sync.html)
Synchronize data on disk with memory
t
[tail](http://ss64.com/bash/tail.html)
Output the last part of files
[tar](http://ss64.com/bash/tar.html)
Tape ARchiver
[tee](http://ss64.com/bash/tee.html)
Redirect output to multiple files
[test](http://ss64.com/bash/test.html)
Evaluate a conditional expression
[time](http://ss64.com/bash/time.html)
Measure Program running time
[times](http://ss64.com/bash/times.html)
User and system times
[touch](http://ss64.com/bash/touch.html)
Change file timestamps
[top](http://ss64.com/bash/top.html)
List processes running on the system
[traceroute](http://ss64.com/bash/traceroute.html)
Trace Route to Host
trap Run a command when a signal is set(bourne)
[tr](http://ss64.com/bash/tr.html)
Translate, squeeze, and/or delete characters
[true](http://ss64.com/bash/true.html)
Do nothing, successfully
[tsort](http://ss64.com/bash/tsort.html)
Topological sort
[tty](http://ss64.com/bash/tty.html)
Print filename of terminal on stdin
[type](http://ss64.com/bash/type.html)
Describe a command
u
[ulimit](http://ss64.com/bash/ulimit.html)
Limit user resources
[umask](http://ss64.com/bash/umask.html)
Users file creation mask
umount Unmount a device
[unalias](http://ss64.com/bash/alias.html)
Remove an alias
[uname](http://ss64.com/bash/uname.html)
Print system information
[unexpand](http://ss64.com/bash/unexpand.html)
Convert spaces to tabs
[uniq](http://ss64.com/bash/uniq.html)
Uniquify files
[units](http://ss64.com/bash/units.html)
Convert units from one scale to another
[unset](http://ss64.com/bash/unset.html)
Remove variable or function names
[unshar](http://ss64.com/bash/unshar.html)
Unpack shell archive scripts
[until](http://ss64.com/bash/until.html)
Execute commands (until error)
[useradd](http://ss64.com/bash/useradd.html)
Create new user account
[usermod](http://ss64.com/bash/usermod.html)
Modify user account
[users](http://ss64.com/bash/users.html)
List users currently logged in
[uuencode](http://ss64.com/bash/uuencode.html)
Encode a binary file
[uudecode](http://ss64.com/bash/uuencode.html)
Decode a file created by uuencode
v
v Verbosely list directory contents (`ls -l -b')
vdir Verbosely list directory contents (`ls -l -b')
[vi](http://ss64.com/bash/vi.html)
Text Editor
[vmstat](http://ss64.com/bash/vmstat.html)
Report virtual memory statistics
w
[watch](http://ss64.com/bash/watch.html)
Execute/display a program periodically
[wc](http://ss64.com/bash/wc.html)
Print byte, word, and line counts
[whereis](http://ss64.com/bash/whereis.html)
Report all known instances of a command
[which](http://ss64.com/bash/which.html)
Locate a program file in the user's path.
[while](http://ss64.com/bash/while.html)
Execute commands
[who](http://ss64.com/bash/who.html)
Print all usernames currently logged in
[whoami](http://ss64.com/bash/whoami.html)
Print the current user id and name (`id -un')
Wget Retrieve web pages or files via HTTP, HTTPS or FTP
[write](http://ss64.com/bash/write.html)
Send a message to another user
x
[xargs](http://ss64.com/bash/xargs.html)
Execute utility, passing constructed argument list(s)
[yes](http://ss64.com/bash/yes.html)
Print a string until interrupted
[.](http://ss64.com/bash/source.html)
Run a command script in the current shell
[###](http://ss64.com/bash/rem.html)
Comment / Remark