aboutsummaryrefslogtreecommitdiff
blob: 39b1e038a7941c3d5f36dc0c774b8d64c65d2cb5 (plain)
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
.SH "FINDING FILE OWNERS"
.PP
This is the default behavior of \fBqfile\fP.  It will list the packages
which own the files (or directories, or symlinks, or anything else
Portage can install) you are querying.  Query items may be file paths or
simple file names.  By default, output includes packages names and the
complete paths to the matching files.  If using \fB\-\-verbose\fP,
versions of the packages will also be shown.  In contrast, when using
\fB\-\-quiet\fP, only package names are listed, without files paths.
The return status of \fBqfile\fP will be \fI0\fP as soon as an owning
package has been found for one of the query items.
.PP
Find names of package(s) owning "/bin/bash":
.nf\fI
	$ qfile -q /bin/bash
	app-shells/bash
.fi
.PP
Find package(s) owning any file named "bash", and show paths of this files:
.nf\fI
	$ qfile -d bash
	app-shells/bash: /bin/bash
	app-shells/bash: /etc/bash
.fi
.PP
Find packages(s) owning the file named "bash" in the current directory. Also 
display their exact version:
.nf\fI
	$ cd /bin
	$ qfile -v ./bash
	app-shells/bash-3.1_p17: /bin/bash
.fi
.PP
Find the package(s) owning the libraries needed by the Bash binary:
.nf\fI
	$ qfile $(scanelf -nq -F%n#F /bin/bash | tr , '\\n')
	sys-libs/ncurses (/lib/libncurses.so.5)
	sys-libs/glibc (/lib/libdl.so.2)
	sys-libs/glibc (/lib/libc.so.6)
.fi