rpm

下面列出rpm的一般用法,这里也有一篇非常全面的介绍:rpm 详解

安装一个软件包:

$ rpm -ivh example.rpm

在已安装基础上升级软件包:

$ rpm -Uvh upgrade.rpm

删除软件包:

$ rpm -e nouse.rpm

查询一个软件包是否已经安装(忽略大小写):

$ rpm -qa |grep -i example

如果要安装的软件包依赖于其它尚未安装的软件包,要忽略依赖关系,强制安装:

$ rpm -ivh --nodeps example.rpm

查看一个软件包中包含哪些文件:

$ rpm -qlp example.rpm

eject

弹出光驱:

$ eject

关闭光驱(直接使用mount 命令,光驱也会自动关闭):

$ eject -t

有关eject 命令这里还有更有趣的讨论

locale

列出当前系统安装的所有locales:

$ locale -a

find

对查找到的文件集合进行命令操作,{}代表文件集合,反斜杠以及前面的空格与后面的分号都不能少。

find . -name "*.dat" -exec cp {} /tmp \;

google code search

 

Google 有一个未公开的code search引擎 http://www.google.com/codesearch。专门搜索源代码时非常有用。比如搜索以下字符串:

lang:shell find {} exec cp

注意,不能输入 -exec,虽然你的目的是搜索字符串"-exec",  但搜索引擎认为你不想在结果中包括 "exec"。

(未完)

Post a comment

mail.png


相似文章|Related Entries

最近更新|Recent Entries

不定期更新|Handy Entries

相似标签|Related Tags

Linux
Apache (3)
awstats (4)
Cluster (1)
eMule (1)
ext3 (1)
gcc (0)
Gentoo (1)
hdd (7)
mount (1)
NAT (1)
Redhat (1)
Samba (2)
Study notes (9)
T43 (0)
Thinkpad (9)
Ultra Slim (4)
WAS (1)
Websphere (1)
乱码 (1)
学习笔记 (14)
虚拟主机 (1)
部署 (1)
集群 (1)
Study notes
Database (12)
DB2 (13)
Linux (15)
MySQL (3)
学习笔记 (14)
数据库 (15)
学习笔记
Database (12)
DB2 (13)
J2ME (1)
Linux (15)
Oracle (2)
Python (1)
Shell (8)
Study notes (9)
保险 (2)
数据库 (15)

分类栏目|Categories

按月归档|By Month

2008
01
2007
12
10
07
06
05
04
03
02
01
2006
12
11
10
09
08
07
06
05
04
03
02
01
2005
11
10
09
08
07
04
03
2004
12
11
10
09
08
07
06
05
04
03
02
01
2003
12
10
09
08
06
2002
09
08
04
03
02
2001
12
09
07
06
05

站内链接|Site Links

Powered by
Movable Type 3.34