From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A93861382BE for ; Mon, 20 Jun 2016 03:22:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ECB52141B8; Mon, 20 Jun 2016 03:22:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 55292141B2 for ; Mon, 20 Jun 2016 03:22:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 606253408D4 for ; Mon, 20 Jun 2016 03:22:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2CCC32418 for ; Mon, 20 Jun 2016 03:22:19 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1466392238.3040132ef330e83c1a04f05eda333c79ae4868a8.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: man/ X-VCS-Repository: proj/portage-utils X-VCS-Files: man/qfile.1 X-VCS-Directories: man/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 3040132ef330e83c1a04f05eda333c79ae4868a8 X-VCS-Branch: master Date: Mon, 20 Jun 2016 03:22:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ff0e6b3f-e973-4220-839c-324354ce8a43 X-Archives-Hash: d419f4c542bb898cd7f00e48310f3385 commit: 3040132ef330e83c1a04f05eda333c79ae4868a8 Author: Mike Frysinger gentoo org> AuthorDate: Mon Jun 20 03:10:38 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Jun 20 03:10:38 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=3040132e man: drop qfile --from docs (part 2) Have to regen the man page after updating its fragment. man/qfile.1 | 63 +------------------------------------------------------------ 1 file changed, 1 insertion(+), 62 deletions(-) diff --git a/man/qfile.1 b/man/qfile.1 index e57e8e3..5bd58c7 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -1,4 +1,4 @@ -.TH qfile "1" "Mar 2016" "Gentoo Foundation" "qfile" +.TH qfile "1" "Jun 2016" "Gentoo Foundation" "qfile" .SH NAME qfile \- list all pkgs owning files .SH SYNOPSIS @@ -148,67 +148,6 @@ Sure, the same differences hold when querying for orphan files: $ ROOT=/mnt qfile -Ro /mnt/bin/* /mnt/bin/dostuff.sh .fi -.SH "READING ARGUMENTS FROM A FILE/STDIN" -.PP -When you try to launch \fBqfile\fP with a large number of arguments, you may -hit the following shell error: -.nf\fI - $ qfile -o $(find /usr/lib) - bash: ./qfile: Argument list too long -.fi -.PP -To avoid that, you must use the \fB\-\-from\fP (\fB\-f\fP) option, which -allows reading your arguments list in a file: -.nf\fI - $ find /usr/lib > ~/usr-lib.list - $ qfile -o -f ~/usr-lib.list - /usr/lib/libMagick-5.5.7-Q16.so.0.0.0 - /usr/lib/libGL.so - ... -.fi -.PP -Your arguments list must be formatted with one file per line, and without any -kind of garbage (no leading or trailing space, no empty line, etc.). The -default \fBfind\fP output format is just fine in general. -.PP -You can also read the arguments list from standard input with the "\fB\-\fP" -pseudo filename, which is useful with shell pipes: -.nf\fI - $ find /usr/lib | qfile -o -f - - /usr/lib/libMagick-5.5.7-Q16.so.0.0.0 - /usr/lib/libGL.so - ... -.fi -.PP -Here is an other example of use. This script lists some files which may be -orphan config files left behind by Portage after uninstallation or upgrade of -some packages: -.nf\fI - #!/bin/bash - SEARCH_PATHS="$(portageq envvar CONFIG_PROTECT)" - SEARCH_MASK="$(portageq envvar CONFIG_PROTECT_MASK) \\ - /etc/runlevels /etc/portage \\ - /etc/ssl/certs /etc/ssh \\ - /etc/bash_completion.d /etc/cups" - for path in ${SEARCH_MASK} ; do - EXCLUDE="${EXCLUDE} -not -path ${path}/*" - done - set -f - find ${SEARCH_PATHS} ${EXCLUDE} | qfile -o -f - -.fi -.PP -\fBIMPORTANT:\fP this script is just a quick example. Do not blindly delete the -files it will list! -.PP -When reading arguments from a file or from stdin, \fBqfile\fP will, for -performances reasons, treat then by groups of 5000 (search owners of the -5000 first files, then of the 5000 following ones, etc.). This magic value -should be fine in most cases, but you can change it if you really want, using -the \fB\-\-max\-args\fP option (\fB\-m\fP). Using a greater value will eat a -bit more memory, but may be a bit faster for really big queries. Be careful -though, using some stupidly high or low value can completly kill the -performances. In short, you probably don't want to touch this option. -.PP .SH "SEARCHING FOR FILE COLLISIONS" .PP A last option of \fBqfile\fP is \fB\-\-exclude\fP (\fB\-x\fP), which will makes