我只是編碼這個腳本,與之相比,還包版本:
https://github.com/lepe/scripts/blob/master/compare_ubuntu_apt.pl
用法:
1)生成在兩臺計算機軟件包列表,像:
apt --installed list | tail -n+2 > that_server.lst
2)執行perl腳本:
./compare_ubuntu_apt.pl this_server.lst that_server.lst
結果:(例子)
----------------------------------
DIFFERENCES
----------------------------------
@ apparmor : 2.8.95~2430-0ubuntu5.2 -> 2.8.95~2430-0ubuntu5.3
@ apt : 1.0.1ubuntu2.8 -> 1.0.1ubuntu2.10
@ apt-transport-https : 1.0.1ubuntu2.8 -> 1.0.1ubuntu2.10
@ apt-utils : 1.0.1ubuntu2.8 -> 1.0.1ubuntu2.10
@ base-files : 7.2ubuntu5.2 -> 7.2ubuntu5.3
@ bash-completion : 1:2.1-4 -> 1:2.1-4ubuntu0.1
----------------------------------
MISSING IN this_server.lst
----------------------------------
+ acl : 2.2.52-1
+ acpid : 1:2.0.21-1ubuntu2
+ apport : 2.14.1-0ubuntu3.11
+ apport-symptoms : 0.20
+ at : 3.1.14-1ubuntu1
+ at-spi2-core : 2.10.2.is.2.10.1-0ubuntu1
+ attr : 1:2.4.47-1ubuntu1
+ autotools-dev : 20130810.1
----------------------------------
MISSING IN that_server.lst
----------------------------------
- apcupsd : 3.14.10-2build1
- apcupsd-doc : 3.14.10-2build1
- beep : 1.3-3
- btrfs-tools : 3.12-1
- discover : 2.1.2-5.2ubuntu1
非常感謝您Lepe的。有趣的方法。非常有用:) – Jeepster 2015-09-15 15:11:05
@Jeepster:不客氣。我很高興它的用處。 – lepe 2015-09-16 00:41:03