File: apt-file.1.sgml

package info (click to toggle)
apt-file 2.5.4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 632 kB
  • ctags: 77
  • sloc: perl: 1,309; python: 132; makefile: 100; sh: 87
file content (506 lines) | stat: -rw-r--r-- 12,325 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<refentry>
  <refentryinfo>
    <address>
      <email>sjg@debian.org</email>
    </address>
    <author>
      <firstname>Sebastien</firstname>
      <surname>Gross</surname>
      <othername>J.</othername>
    </author>
    <date>May 2003</date>
  </refentryinfo>

  <refmeta>
    <refentrytitle>apt-file</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>apt-file</refname>
    <refpurpose>
      APT package searching utility -- command-line interface
    </refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>apt-file</command>
      <arg><option>options</option></arg>
      <arg>action</arg>
      <arg>pattern</arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>apt-file</command>
      <option> -f</option>
      <arg><option>options</option></arg>
      <option> search</option>
      <arg>file ...</arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>apt-file</command>
      <option> -D</option>
      <arg><option>options</option></arg>
      <option> search</option>
      <arg>binary-packet.deb ...</arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>DESCRIPTION</title>
    <para><command>apt-file</command> is a command line tool for
      searching files in packages for the APT package management system.</para>
    <para>Some actions are required to run the search:</para>
    <variablelist>

      <varlistentry>
	<term>find</term>
	<listitem>
	  <para>
	    Alias for <option>search</option>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>list</term>
	<listitem>
	  <para>
	    List the contents of a package matching the
	    <option>pattern</option> pattern. This action is very
	    close to the <command>dpkg -L</command> command except the
	    package does not need to be installed or fetched.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>purge</term>
	<listitem>
	  <para>
	    remove all <filename>Contents-*</filename>
	    files from the cache directory.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>search</term>
	<listitem>
	  <para>
	    Search in which package a file is included. A list of all
	    packages containing the <option>pattern</option> pattern
	    is returned.
	  </para>
	  <para>
	    apt-file will only search for filenames, not directory names.
	    This is due to the format of the Contents files it searches.
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>show</term>
	<listitem>
	  <para>
	    Alias for <option>list</option>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>update</term>
	<listitem>
	  <para>
	    Resynchronize the package contents from their sources. The
	    lists of the contents of packages are fetched from the location(s)
	    specified in
	    <filename>/etc/apt/sources.list</filename>. This command
	    attempts to fetch the
	    <filename>Contents-&lt;ARCH&gt;.gz</filename> files from
	    remote sources. For downloading these uses either the curl or
	    wget commands as specified in <filename>apt-file.conf</filename>.
	  </para>
	</listitem>
      </varlistentry>

    </variablelist>
  </refsect1>

  <refsect1>
    <title>OPTIONS</title>
    <variablelist>

      <varlistentry>
	<term>
	  <option>-a, --architecture</option>
	  architecture
	</term>
	<listitem>
	  <para>
	  Sets architecture to <literal>architecture</literal>. This
	  option is useful if you search a package for a different
	  architecture from the one installed on your system.
	  It determines how the <literal>$ARCH</literal> variable
	  in sources.list is expanded (but it does not influence
	  the search in any other way).
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-c, --cache</option> <literal>cache-directory</literal>
	</term>
	<listitem>
	  <para>
	    Sets the cache directory to <filename>cache-directory</filename>
	    instead of its default. If executed as non-root user, the default
	    is <filename>$HOME/.cache/apt-file</filename> with fall-back to
	    <filename>/var/cache/apt/apt-file</filename>. The latter is also
	    the default if apt-file is called as root.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-d, --cdrom-mount</option> <literal>cdrom-mount-point</literal>
	</term>
	<listitem>
	  <para>
Use <literal>cdrom-mount-point</literal> instead of
<command>apt</command>'s.
</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-D, --from-deb</option>
	</term>
	<listitem>
	  <para>
	    Use contents of the given .deb archives(s) as patterns.
	    Useful for searching for file conflicts with other packages.
	    Implies <option>-F</option>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-f, --from-file</option>
	</term>
	<listitem>
	  <para>
	    Read patterns from the given file(s), one per line.
	    Use <literal>-</literal> as filename for stdin.
	    If no files are given, then the list will be read from stdin.
	    This is much faster than invoking apt-file many times.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-F, --fixed-string</option>
	</term>
	<listitem>
	  <para>
	    Do not expand search pattern with generic characters at
	    pattern's start and end.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-i, --ignore-case</option>
	</term>
	<listitem>
	  <para>Ignore case when searching for <literal>pattern</literal>.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-l, --package-only</option>
	</term>
	<listitem>
	  <para>
	    Only display package name; do not display file names.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-N, --non-interactive</option>
	</term>
	<listitem>
	  <para>
	  Skip schemes that are listed in the <literal>interactive</literal> line in
	  <filename>apt-file.conf</filename>.
	  This is useful if you want to call 'apt-file update' in cron jobs and skip all
	  schemes that may require user input.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-s, --sources-list</option>
	  sources.list
	</term>
	<listitem>
	  <para>
	    Sets the <filename>sources.list</filename> file to a
	    different value from its default
	    <filename>/etc/apt/sources.list</filename>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-v, --verbose</option>
	</term>
	<listitem>
	  <para>
	    Run <command>apt-file</command> in verbose mode.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-x, --regexp</option>
	</term>
	<listitem>
	  <para>
	    Treat <literal>pattern</literal> as a (perl) regular expression. See
	    <command>perlreref</command>(1) for details. Without this option,
	    <literal>pattern</literal> is treated as a literal string to search
	    for.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-y, --dummy</option>
	</term>
	<listitem>
	  <para>
	    Run in dummy mode (no action).
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>-h, --help</option>
	</term>
	<listitem>
	  <para>Display a short help screen.</para>
	</listitem>
      </varlistentry>

    </variablelist>
  </refsect1>

  <refsect1>
    <title>CONFIGURATION FILE</title>
    <para>
      The <command>apt-file</command> configuration file can
      be found in <filename>/etc/apt/apt-file.conf</filename>.
    </para>
    <para>
      A string expansion is done on several values. See the <literal>string
	expansion</literal> section.
    </para>
    <variablelist>

      <varlistentry>
	<term>destination</term>
	<listitem>
	  <para>
	    This variable describes how cached files will be named.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>http | ftp | ssh | rsh | file | cdrom</term>
	<listitem>
	  <para>
	    Defines the commands used to fetch files.
	  </para>
	</listitem>
      </varlistentry>

    </variablelist>
    <refsect2>
      <title>String expansion</title>

      <para>
	A <filename>sources.list</filename> entry is defined as:
	<screen>
	  deb uri dist component1 component2 ...
	</screen>
	A <literal>uri</literal> is defined as:
	<screen>
	  proto:/[/][user[:password]@]host[:port][/path]
	</screen>
      </para>

      <variablelist>
	<varlistentry>
	  <term>&lt;host&gt;</term>
	  <listitem>
	    <para>replace with the hostname</para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>&lt;port&gt;</term>
	  <listitem>
	    <para>replace with the port number</para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>&lt;uri&gt;</term>
	  <listitem>
	    <para>replace with full uri</para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>&lt;path&gt;</term>
	  <listitem>
	    <para>
	      replace with full path (relative to / on the host)
	    </para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>&lt;dist&gt;</term>
	  <listitem>
	    <para>replace with distribution name</para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>&lt;comp&gt;</term>
	  <listitem>
	    <para>replace with component name</para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>&lt;cache&gt;</term>
	  <listitem><para>replace with cache directory</para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>&lt;dest&gt;</term>
	  <listitem>
	    <para>
	      replace with <literal>destination</literal> expanded
	      value.
	    </para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>&lt;cdrom&gt;</term>
	  <listitem>
	    <para>
	      replace with <literal>cdrom-mount-point</literal>.
	    </para>
	  </listitem>
	</varlistentry>

      </variablelist>
    </refsect2>
  </refsect1>

  <refsect1>
    <title>BUGS</title>
    <para>The cdrom backend has not been tested.</para>
    <para>
      Non-release lines in sources.list are not handled by apt-file.
    </para>
    <para>
     There is only one Contents file per distribution that contains all
     components (i.e. main, contrib, and non-free). Threrefore, apt-file will
     display search results from all components, even if not all components
     are included in the sources.list file.
    </para>
    <para>
     When a new line has been added to the sources.list and apt-file update has
     not been run, apt-file does not print a warning message.
    </para>
    <para>
     Complex regular expressions that match the leading slash may not work
     correctly. As a workaround, try to pull the leading slash to the beginning
     of the regular expression. For example, use "/(usr/bin/vim|sbin/lvm)"
     instead of "/usr/bin/vim|/sbin/lvm".
    </para>
  </refsect1>

  <refsect1>
    <title>FILES</title>
    <variablelist>
      <varlistentry>
	<term><filename>/etc/apt/sources.list</filename></term>
	<listitem>
	  <para>Locations to fetch package contents from.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><filename>/etc/apt/sources.list.d/</filename></term>
	<listitem>
	  <para>Directory with additional sources.list snippets</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><filename>/etc/apt/apt-file.conf</filename></term>
	<listitem>
	  <para>
	    Configuration file for <command>apt-file</command>.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>SEE ALSO</title>
    <para>
      <command>auto-apt</command>(1), <command>apt-cache</command>(8),
      <command>apt-cdrom</command>(8), <command>dpkg</command>(8),
      <command>dselect</command>(8),
      <filename>sources.list</filename>(5),
      <filename>apt.conf</filename>(5),
      <command>apt_preferences</command>(5).
    </para>
    <para>
      The APT users guide in
      <filename>/usr/share/doc/apt/</filename>
    </para>
  </refsect1>

  <refsect1>
    <title>AUTHOR</title>
    <para>
      <command>apt-file</command> was written by Sebastien J. Gross
      <email>sjg@debian.org</email>.
    </para>
  </refsect1>

</refentry>