關於「/etc/networks」

測試環境

  • Xubuntu 16.04 amd64 英文界面

探索步驟

執行

$ dpkg -S /etc/networks

顯示

dpkg-query: no path found matching pattern /etc/networks

執行

$ grep '/etc/networks' /var/lib/dpkg/info/* -R -n

顯示

/var/lib/dpkg/info/base-files.postinst:54:  install_from_default networks      /etc/networks
/var/lib/dpkg/info/netbase.postinst:16:  if [ -e /etc/networks ]; then return 0; fi
/var/lib/dpkg/info/netbase.postinst:18:  cat > /etc/networks <<-EOF
/var/lib/dpkg/info/netbase.postrm:13:  if [ -e /etc/networks ]; then
/var/lib/dpkg/info/netbase.postrm:14:  md5="$(md5sum /etc/networks | sed -e 's/ .*//')"
/var/lib/dpkg/info/netbase.postrm:16:    d013c6de91b961753d4ba901347aa6c8) rm /etc/networks ;;
/var/lib/dpkg/info/resolvconf.templates:286: Até /etc/networks/interfaces ter sido editado e as interfaces afectadas re-iniciadas, os endereços dos servidores de nomes não serão incluídos no ficheiro de configuração do resolver gerado dinamicamente.

執行

$ less /var/lib/dpkg/info/base-files.postinst

執行

$ grep 'networks' /var/lib/dpkg/info/base-files.postinst -n

顯示

54:  install_from_default networks      /etc/networks

執行

$ apt-cache showsrc base-files | grep '^Binary:' -B 1

顯示

Package: base-files
Binary: base-files, lsb-release-udeb

執行

$ dpkg -L base-files | grep networks

顯示

/usr/share/base-files/networks

觀看「/usr/share/base-files/networks」

$ cat /usr/share/base-files/networks

執行

$ whatis networks

顯示

networks (5)         - network name information

執行

$ whereis networks

顯示

networks: /etc/networks /usr/share/man/man5/networks.5.gz

Manpage

Package

Debian Wiki

相關討論