用镜头记录,用心灵体验 | 订阅本站 | 所有笔记 | 亲和力设计 | 流量

DB2 学习笔记

博客话题:DB2,Linux,Web,业余无线电,户外,摄影,截拳道,Thankpad,其他

Linux

Linux 系统管理学习笔记(四)

目录

  1. rpm
  2. eject
  3. locale
  4. find
  5. google code search

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"。

(未完)

Alex's picture

my email address in picture

搜索|Search

评论|Recent Comments

按月归档|By Month

2009
07
2008
11
10
07
05
04
03
02
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

我读|My Books

我的链接|My Links

我的朋友|My Friends

Creative Commons License
This blog is licensed under a Creative Commons License.
Movable Type 4 Logo