1. 添加终端右键支持命令
install nautilus-open-terminal
# 查看命令帮助 help [commond],如查看export命令
help export
# 输出
export: export [-fn] [name[=value] ...] or export -p
Set export attribute for shell variables.
Marks each NAME for automatic export to the environment of subsequently
executed commands. If VALUE is supplied, assign VALUE before exporting.
Options:
-f refer to shell functions
-n remove the export property from each NAME
-p display a list of all exported variables and functions
An argument of '--' disables further option processing.
Exit Status:
Returns success unless an invalid option is given or NAME is invalid.
2. 管道 |
管道命令操作符是:”|”,它仅能处理经由前面一个指令传出的正确输出信息,也就是 standard output 的信息,对于 stdandard
error 信息没有直接处理能力。然后,传递给下一个命令,作为标准的输入 standard input.
3. tee 命令详解
功能说明:读取标准输入的数据,并将其内容输出成文件。
语 法:tee [-ai][–help][–version][文件…]
补充说明:tee指令会从标准输入设备读取数据,将其内容输出到标准输出设备,同时保存成文件。
参 数:
-a或–append 附加到既有文件的后面,而非覆盖它.
-i-i或–ignore-interrupts 忽略中断信号。
–help 在线帮助。
–version 显示版本信息。
4. grep
grep, its name comes from the ed commond g/ep/p (gloabally search a reqular expression and print), which has the ame effect: doing a global search with the regular expression and printing all matching lines.
# set 列出系统预设的环境变量和用户自定义的变量,输出结果作为 grep $HOME 的输入,最后输出变量 HOME 的值
set | grep $HOME
5. 创建软链接
$ # sudo ln -s 源文件 目标文件 如
$ sudo ln -s /home/leon/g++-4.8 /usr/bin/g++
6. 解压命令
tar -xvf file.tar //解压 tar包
tar -xzvf file.tar.gz //解压tar.gz
tar -xjvf file.tar.bz2 //解压 tar.bz2
tar -xZvf file.tar.Z //解压tar.Z
unrar e file.rar //解压rar
unzip file.zip //解压zip