UbuntuHelp:Configuration
来自Ubuntu中文
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
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.