有时候通过yum方式安装软件后我们需要在它安装文件夹修改东西,这时候需要知道它默认安装的路径。
这里通过rsync同步软件和centos系统来演示:
首先通过:rpm -qa |grep rsync查找安装包名称
[root@localhost ~]# rpm -qa |grep rsync
rsync-3.0.6-4.el5_7.1
再用rpm -ql rsync-3.0.6-4.el5_7.1就可以获取安装路径了 站长教学网 eduyo.com
[root@localhost ~]# rpm -ql rsync-3.0.6-4.el5_7.1
/etc/xinetd.d/rsync
/usr/bin/rsync
/usr/share/doc/rsync-3.0.6
/usr/share/doc/rsync-3.0.6/COPYING
/usr/share/doc/rsync-3.0.6/NEWS
/usr/share/doc/rsync-3.0.6/OLDNEWS
/usr/share/doc/rsync-3.0.6/README
/usr/share/doc/rsync-3.0.6/support
/usr/share/doc/rsync-3.0.6/support/Makefile
/usr/share/doc/rsync-3.0.6/support/atomic-rsync
/usr/share/doc/rsync-3.0.6/support/cvs2includes
/usr/share/doc/rsync-3.0.6/support/deny-rsync
/usr/share/doc/rsync-3.0.6/support/file-attr-restore
/usr/share/doc/rsync-3.0.6/support/files-to-excludes
/usr/share/doc/rsync-3.0.6/support/git-set-file-times
/usr/share/doc/rsync-3.0.6/support/logfilter
/usr/share/doc/rsync-3.0.6/support/lsh
/usr/share/doc/rsync-3.0.6/support/mnt-excl
/usr/share/doc/rsync-3.0.6/support/munge-symlinks
/usr/share/doc/rsync-3.0.6/support/rrsync
/usr/share/doc/rsync-3.0.6/support/rsyncstats
/usr/share/doc/rsync-3.0.6/support/savetransfer.c
/usr/share/doc/rsync-3.0.6/tech_report.tex
/usr/share/man/man1/rsync.1.gz
/usr/share/man/man5/rsyncd.conf.5.gz