个人工具

UbuntuHelp:Configuration

来自Ubuntu中文

Wikibot讨论 | 贡献2008年5月9日 (五) 18:52的版本 (新页面: {{From|https://help.ubuntu.com/community/Configuration}} {{Languages|UbuntuHelp:Configuration}} A way to detect new and old configuration files related to a new installation is to use <...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索

A way to detect new and old configuration files related to a new installation is to use

locate dpkg-new
locate dpkg-old

This should suffice after the locate database was updated. Otherwise, use

sudo find / -name "*.dpkg-old"
sudo find / -name "*.dpkg-new"

Note: if you navigate to menu "Places" > "Search for files ...", you can use a graphical search tool that has equivalent functionality to the aforementioned command lines. "locate" is the traditional unix file lookup tool. It does not actually search the file system when you issue the command, but checks a database that is updated in intervals. Therefore, it won't find newly created files. To learn more about it, read the man page (either "man locate" in a terminal, or System -> Help). dpkg-old and dpkg-new are filename extensions that are created when a package is upgraded and a conffile overwritten. <conffilename>.dpkg-old is created when the user has chosen to use the newly installed one. <conffilename>.dpkg-new is created when the user opted to keep the old one; it is the version from the newer package. Some more information on dpkg's configuration file handling can be found at the Debian Policy Manual, Appendix E - Configuration file handling. E.g., this is what appears in one example computer

 
locate dpkg-old
/etc/bash.bashrc.dpkg-old
/etc/ntp.conf.dpkg-old
/etc/apt/apt.conf.d/10periodic.dpkg-old
/etc/ati/control.dpkg-old
/etc/ati/signature.dpkg-old
/ec/event.d/rcS-sulogin.dpkg-old

"locate dpkg-old" simply finds files of this name pattern. Note that for each of those there exists the currently-used valid conffile without the extension.