[H-GEN] Fun One-Liner
Fri Nov 16 03:29:56 EST 2001
Folks,
Jason wrote:
> I wrote this short one-liner to find files holding references to
> upgraded libraries, since these processes keep the deleted file's link
> count above zero, stopping its blocks from being freed (eg libc is
> upgraded, and sshd, which is linked against it, keeps a reference to a
> temporary file created during the upgrade, which continues to use disk
> space on a starved root filesystem)[1].
You call that monster a one-liner!? Try the following on for
size. I've opted for bug-for-bug compatibility.
grep -l 'deleted)$' /proc/*/maps |
perl -F/ -ane'++$P{$F[2]}}{print grep{$P{(split)[1]}}`ps awwux`'
Yours sincerely,
-- Mark John Suter | I know that you believe you understand
suter at humbug.org.au | what you think I said, but I am not sure
gpg key id F2FEBB36 | you realise that what you heard is not
mobile 0411 262 316 | what I meant. Robert J. McCloskey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 269 bytes
Desc: not available
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20011116/be4d1521/attachment.sig>
More information about the General
mailing list