Unix 有用命令 - Unix
这里列出的命令,包括语法和简要说明。如需详细资料,请使用:
$man command
文件和目录:
这些命令允许你创建的目录和处理文件。
命令 | 描述 |
---|---|
cat | Display File Contents |
cd | Changes Directory to dirname |
chgrp | change file group |
chmod | Changing Permissions |
cp | Copy source file into destination |
file | Determine file type |
find | Find files |
grep | Search files for regular expressions. |
head | Display first few lines of a file |
ln | Create softlink on oldname |
ls | Display information about file type. |
mkdir | Create a new directory dirname |
more | Display data in paginated form. |
mv | Move (Rename) a oldname to newname. |
pwd | Print current working directory. |
rm | Remove (Delete) filename |
rmdir | Delete an existing directory provided it is empty. |
tail | Prints last few lines in a file. |
touch | Update access and modification time of a file. |
操作数据:
可以比较改变文件的内容,并用下面的命令。
命令 | 描述 |
---|---|
awk | Pattern scanning and processing language |
cmp | Compare the contents of two files |
comm | Compare sorted data |
cut | Cut out selected fields of each line of a file |
diff | Differential file comparator |
expand | Expand tabs to spaces |
join | Join files on some common field |
perl | Data manipulation language |
sed | Stream text editor |
sort | Sort file data |
split | Split file into smaller files |
tr | Translate characters |
uniq | Report repeated lines in a file |
wc | Count words, lines, and characters |
vi | Opens vi text editor |
vim | Opens vim text editor |
fmt | Simple text formatter |
spell | Check text for spelling error |
ispell | Check text for spelling error |
ispell | Check text for spelling error |
emacs | GNU project Emacs |
ex, edit | Line editor |
emacs | GNU project Emacs |
emacs | GNU project Emacs |
压缩文件:
文件可能被压缩以节省空间。压缩文件,可以创建和检查:
命令 | 描述 |
---|---|
compress | Compress files |
gunzip | Uncompress gzipped files |
gzip | GNU alternative compression method |
uncompress | Uncompress files |
unzip | List, test and extract compressed files in a ZIP archive |
zcat | Cat a compressed file |
zcmp | Compare compressed files |
zdiff | Compare compressed files |
zmore | File perusal filter for crt viewing of compressed text |
获取信息:
各种UNIX手册和文档上线。下面的 Shell 命令给出的信息:
命令 | 描述 |
---|---|
apropos | Locate commands by keyword lookup |
info | Displays command information pages online |
man | Displays manual pages online |
whatis | Search the whatis database for complete words. |
yelp | GNOME help viewer |
网络通信:
这些命令是用来发送和接收文件从全球各地远程主机到本地UNIX主机。
命令 | 描述 |
---|---|
ftp | File transfer program |
rcp | Remote file copy |
rlogin | Remote login to a UNIX host |
rsh | Remote shell |
tftp | Trivial file transfer program |
telnet | Make terminal connection to another host |
ssh | Secure shell terminal or command connection |
scp | Secure shell remote file copy |
sftp | secure shell file transfer program |
出于安全原因,有些命令在您的计算机可能会受到限制。
用户之间的消息:
UNIX 系统支持的屏幕上的消息给其他用户和世界各地的电子邮箱:
命令 | 描述 |
---|---|
evolution | GUI mail handling tool on Linux |
Simple send or read mail program | |
mesg | Permit or deny messages |
parcel | Send files to another user |
pine | Vdu-based mail utility |
talk | Talk to another user |
write | Write message to another user |
编程工具:
下面的编程语言和工具都是基于你已经安装到你的Unix。
命令 | 描述 |
---|---|
dbx | Sun debugger |
gdb | GNU debugger |
make | Maintain program groups and compile programs. |
nm | Print program's name list |
size | Print program's sizes |
strip | Remove symbol table and relocation bits |
cb | C program beautifier |
cc | ANSI C compiler for Suns SPARC systems |
ctrace | C program debugger |
gcc | GNU ANSI C Compiler |
indent | Indent and format C program source |
bc | Interactive arithmetic language processor |
gcl | GNU Common Lisp |
perl | General purpose language |
php | Web page embedded language |
py | Python language interpreter |
asp | Web page embedded language |
CC | C++ compiler for Suns SPARC systems |
g++ | GNU C++ Compiler |
javac | JAVA compiler |
appletvieweir | JAVA applet viewer |
netbeans | Java integrated development environment on Linux |
sqlplus | Run the Oracle SQL interpreter |
sqlldr | Run the Oracle SQL data loader |
mysql | Run the mysql SQL interpreter |
其他命令:
这些命令列出或改变有关系统的信息:
命令 | 描述 |
---|---|
chfn | Change your finger information |
chgrp | Change the group ownership of a file |
chown | Change owner |
date | Print the date |
determin | Automatically find terminal type |
du | Print amount of disk usage |
echo | Echo arguments to the standard options |
exit | Quit the system |
finger | Print information about logged-in users |
groupadd | Create a user group |
groups | Show group memberships |
homequota | Show quota and file usage |
iostat | Report I/O statistics |
kill | Send a signal to a process |
last | Show last logins of users |
logout | log off UNIX |
lun | List user names or login ID |
netstat | Show network status |
passwd | Change user password |
passwd | Change your login password |
printenv | Display value of a shell variable |
ps | Display the status of current processes |
ps | Print process status statistics |
quota -v | Display disk usage and limits |
reset | Reset terminal mode |
script | Keep script of terminal session |
script | Save the output of a command or process |
setenv | Set environment variables |
stty | Set terminal options |
time | Time a command |
top | Display all system processes |
tset | Set terminal mode |
tty | Print current terminal name |
umask | Show the permissions that are given to view files by default |
uname | Display name of the current system |
uptime | Get the system up time |
useradd | Create a user account |
users | Print names of logged in users |
vmstat | Report virtual memory statistics |
w | Show what logged in users are doing |
who | List logged in users |