On Wed, Nov 21, 2007 at 07:43:17PM +0100, arno renevier wrote:
> at first, thanks for -lsbin option: it's really useful. But I noticed a little
> glitch: when one or more files of the package do not exist anymore, dlocate
> outputs error message. For example, I have removed
> /etc/iceweasel/profile/chrome/userChrome-example.css because I don't want that
> file in my default profile. So now I have:
>
> dlocate -lsbin iceweasel
> ls: /etc/iceweasel/profile/chrome/userChrome-example.css: No such file or
> directory
> -rwxr-xr-x 1 root root 11884896 Nov 14 19:46 /usr/lib/iceweasel/firefox-bin
> -rwxr-xr-x 1 root root 8383 Nov 14 19:45 /usr/lib/iceweasel/iceweasel
> -rwxr-xr-x 1 root root 469 Nov 14 19:10
> /usr/lib/iceweasel/iceweasel-xremote-client
>
> Is it possible to remove that line ?
ok, done. that was an easy fix. will be in the next version i upload
(probably tonight when i get home form work).
if you want to fix it yourself in the meantime:
$ diff -u /usr/bin/dlocate ./dlocate
--- /usr/bin/dlocate 2007-11-22 06:42:01.279578385 +1100
+++ ./dlocate 2007-11-22 06:47:05.347956130 +1100
@@ -188,9 +188,11 @@
"-lsbin")
if [ -e $DPKG_INFO/$PKG.list ] ; then
dlocate -L $PKG | \
- xargs ls -ld | \
+ xargs ls -ld 2> /dev/null | \
grep -v "^d" | \
- egrep '^-.{2,8}[xs]'
+ egrep '^-.{2,8}[xs]' | \
+ sed -e 's/.* \//\//' | \
+ xargs ls -1
else
echo Package \"$PKG\" not installed. >/dev/stderr
fi
i also made it consistent with the other -ls* options, so it produces
short (ls -1) output.
you can easily get the long output by:
dlocate -lsbin iceweasel | xargs ls -l
craig
--
craig sanders <[EMAIL PROTECTED]>
Religion is what keeps the poor from murdering the rich.
-- Napoleon
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]