一.常用快捷键:
1.erasing a character -----backspac
2.delete a word -----ctral + w
3.delete a line ---------------ctral + x或者ctral + u
4.move to line front or line end ----tral +x
4.terminate(终止) a running program ----ctral + c或者 ctral+ z 或者kill命令
二.命令:
1.apropos searches for a keyword------apropos 或者whatis
the whatis utility is similar to apropos but finds olny complete word matches for the name of the utility.
2.howtos finding out how things work -----/usr/share/doc或者/usr/src/linux/Documentation
三.basic utilities:
(1).
1.ls ---lists the names of files
2.cat ---displays a text file
3.rm ----delete a file
4.less ls more ----display a text file one screen at a time
5.hostname ----display the system name
6.cp -----copis a file
7.mv -----changes the name of a file or move to another place
8.lpr ---prints a file
9.grep ----searches for a string keyword
10.head ----display the beginning of a file
11.tail ----display the end of a file
12.sort ----display a file in order
13.uniq ----remove duplicate lines from a file
14.diff----compares two files
15.file----identifies the contents of a file
16.|-----communicates bettween processes
17.echo----display text
18.date----display the time and date
19.script-----records a shell session
(1).
******compresses or packagee files
20.bzip2/bunzip2/bzcat------compresses a file or decompress a file or display a file that has been compressed with bzip2
gzip/gunzip/zcat ----------compress a file or decompress a file or display a file that has been compressed with gzip
tar------to create a single file ( called a tar file,archive,ortarball ) form multiple files or directory hierarchies and to extract files from a tar file (打包软件)
打包以后用bzip2,compress,or gzip压缩tar软件包
用bzip2压缩后叫.tar.bz2 or .tbz or;用gzip压缩后叫.tar.gz or .tgz or .gz; 用compress压缩的叫.tar.Z
(2).
****location files---- 文件路径查找:
21.
which
locate utilities by displaying the full pathname of the file for the utility.
说明:就是找出命令的执行文件的目录路径。
which是通过 PATH环境变量到该路径内查找可执行文件,所以基本的功能是寻找可执行文件
24.
whereis
searches for files relate to a utility by looking in standard location instead of using your search path
找到程序的源、二进制文件或手册。(将所有相关的文件都查找出来)。
(3).
*****obtainning user and system information
To find out who is using the local system,you can employ one of several utilities that vary in the details they provide the option they support. The oldest utility
who ,produces a list of users who are logged in on the local system,the device each person is using ,and the time each person logged in.
The w and finger utilites show more details , such as users full name and the command line each user is running.you can use the finger utility to retrieve information
about users on remote systems if the local system is attached to a network.
(4).
*****communication with other users
25.
write
26.
mesg-------denies or acceptes messages
mesg y:if xx had not given this commmad before yy tried to send xx a message. yy might have seen the following message:
write xx
write : yy has messages disabled
mesg n:if you have messages blocked and you wirte to another user,write display the following messages.
write xx:
write:write: you have write permission turned off.
27.
email -----sent message to someone around the world.
四.man命令:
linux man的常用用法:
man section cmd :直接指定特定章节内搜索手册页,如man 5 passwd 直接进入文件格式版的帮助
man -a cmd :打开所有section内的同名帮助,例如 man –a passwd ,你首先会进入一个PASSWD(1)的命令版passwd帮助,你再按q键就会进入PASSWD(5),passwd配置文件格式的帮助
man -aw cmd :显示所有cmd的所有手册文件的路径,如 man -aw passwd 就是
/usr/share/man/man1/passwd.1.gz
/usr/share/man/man5/passwd.5.gz
man -M cmd :指定手册文件的搜索路径,如 man -M /home/mysql/man mysql 显示的就是你安装的mysql的帮助,而不是系统自带的旧版mysql的帮助
man cmd| col -b > cmd.txt :把man手册信息输出到文本文件
man简单介绍:
Linux的man很强大,该手册分成很多section,使用man时可以指定不同的section来浏览,各个section意义如下:
man命令格式:
man [option] name: name一般是帮助文档的名字,对应命令名、函数名或者配置文件名(带后缀!),如
man nsswitch.conf:查看/etc/nsswitch.conf文件的帮助文档
man networks:查看/etc/sysconfig/networks文件的帮助文档
查看特定语言版的帮助文档:先设定环境变量LANG=zh_CN,然后再执行man查询
man的配置文件/etc/man.config:
如果你不想每次man cmd都要用-M指定路径,那么可以通过修改配置文件,添加内容如
MANPATH /home/mysql/man
五.管道及重定向
这部分很简单,大家仔细看看就明白了。