什么是 apt 文件更新?

15 apt software-sources apt-file

我正在按照这些说明进行操作,并且已apt-file使用以下方法与其他一些软件包一起安装:

sudo apt-get install gnupg pbuilder ubuntu-dev-tools bzr-builddeb apt-file
Run Code Online (Sandbox Code Playgroud)

现在每次我启动我的电脑时,我都会收到这样的通知:

apt-file 更新需要通知

所以我终于进入终端并输入命令:

apt-file update
Run Code Online (Sandbox Code Playgroud)

我得到了这个输出:

apt-file is now using the user's cache directory.
If you want to switch back to the system-wide cache directory,
 run 'apt-file purge'
Downloading complete file http://gb.archive.ubuntu.com/ubuntu/dists/utopic/Contents-amd64.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 94 29.6M   94 27.8M    0     0   667k      0  0:00:45  0:00:42  0:00:03 97 29.6M   97 28.8M    0     0   677k      0  0:00:44  0:00:43  0:00:01 99 29.6M   99 29.5M    0     0   678k      0  0:00:44  0:00:44 --:--:--100 29.6M  100 29.6M    0     0   678k      0  0:00:44  0:00:44 --:--:--  738k
Downloading complete file http://gb.archive.ubuntu.com/ubuntu/dists/utopic-updates/Contents-amd64.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:-- 11 3134k   11  367k    0     0   480k      0  0:00:06 --:--:--  0:00:06 35 3134k   35 1101k    0     0   623k      0  0:00:05  0:00:01  0:00:04 53 3134k   53 1685k    0     0   609k      0  0:00:05  0:00:02  0:00:03 75 3134k   75 2373k    0     0   630k      0  0:00:04  0:00:03  0:00:01 99 3134k   99 3105k    0     0   651k      0  0:00:04  0:00:04 --:--:--100 3134k  100 3134k    0     0   652k      0  0:00:04  0:00:04 --:--:--  684k
Downloading Index http://gb.archive.ubuntu.com/ubuntu/dists/utopic/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://gb.archive.ubuntu.com/ubuntu/dists/utopic/Contents-amd64.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
File is up-to-date.
Downloading Index http://gb.archive.ubuntu.com/ubuntu/dists/utopic-updates/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://gb.archive.ubuntu.com/ubuntu/dists/utopic-updates/Contents-amd64.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
File is up-to-date.
Downloading complete file http://gb.archive.ubuntu.com/ubuntu/dists/utopic-backports/Contents-amd64.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--100  121k  100  121k    0     0   189k      0 --:--:-- --:--:-- --:--:--  189k
Downloading complete file http://security.ubuntu.com/ubuntu/dists/utopic-security/Contents-amd64.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:-- 17 2546k   17  452k    0     0   454k      0  0:00:05 --:--:--  0:00:05 46 2546k   46 1185k    0     0   593k      0  0:00:04  0:00:01  0:00:03 75 2546k   75 1918k    0     0   640k      0  0:00:03  0:00:02  0:00:01100 2546k  100 2546k    0     0   660k      0  0:00:03  0:00:03 --:--:--  660k
Downloading Index http://security.ubuntu.com/ubuntu/dists/utopic-security/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://security.ubuntu.com/ubuntu/dists/utopic-security/Contents-amd64.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
File is up-to-date.
Ignoring source without Contents File:
  http://extras.ubuntu.com/ubuntu/dists/utopic/Contents-amd64.gz
Ignoring source without Contents File:
  http://dl.google.com/linux/chrome/deb/dists/stable/Contents-amd64.gz
Run Code Online (Sandbox Code Playgroud)

所以我看到它说:

apt-file is now using the user's cache directory.
If you want to switch back to the system-wide cache directory,
 run 'apt-file purge'
Run Code Online (Sandbox Code Playgroud)

那么究竟是apt-file什么呢?它现在正在使用用户的缓存目录是什么意思?这是一件好事吗?这里用户的缓存目录和系统范围的缓存目录有什么区别,我应该使用哪个?这是否以任何方式影响我的apt-get来源?


操作系统信息:

Description:    Ubuntu 14.10
Release:    14.10
Run Code Online (Sandbox Code Playgroud)

包装信息:

apt-file:
  Installed: 2.5.2.3ubuntu1
  Candidate: 2.5.2.3ubuntu1
  Version table:
 *** 2.5.2.3ubuntu1 0
        500 http://gb.archive.ubuntu.com/ubuntu/ utopic/universe amd64 Packages
        100 /var/lib/dpkg/status
Run Code Online (Sandbox Code Playgroud)

mur*_*uru 21

  • apt-file用于搜索哪​​个包提供了文件。将其视为http://packages.ubuntu.com的离线且有些受限的版本。
  • 由于您使用了apt-file updatewithout sudo,它不能使用系统范围的目录(通常是/var/cache/apt/apt-file),而是使用您家中的目录 ( ~/.cache/apt-file)。
  • 其他用户的搜索无法使用您用户的缓存。
  • 如果您是唯一的用户,那么apt-file使用哪个缓存并不重要,只要您对使用sudo(或不使用)保持一致。
  • apt-getapt-file共享资源,但两者都不影响另一个。

  • @ParanoidPanda 目录。它的存在是为了提供有关软件包的信息,而不是安装它们。 (2认同)