要做一个升级的东东,需要知道某个软件安装到了哪里去,比如我在centos下安装了Sublime_Text这个软件,我现在不知道这个软件安装到哪了,我想用编程的方式找出他来. linux下没有windows下的注册表没办法把安装程序的信息记录下来,有木有做过这种linux软件升级的大大? 求给点思路~~
高洛峰2017-04-17 14:28:03
rpm -ql software name View the directory where the software is installed
迷茫2017-04-17 14:28:03
If it is a Linux system such as ubuntu/debian that uses dpkg package management software, use:
dpkg -l software name
If it is a Linux system such as centos/redhat that uses rpm package management software, use:
rpm -ql software name
The above command can list all the files (installation path) of a software package, but if you want to upgrade the software, you should use other commands provided by the package management software to upgrade instead of replacing any files yourself!