From: Fco.J.Ballesteros <nemo@plan9.escet.urjc.es>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] find(1) revisited.
Date: Mon, 4 Nov 2002 09:54:58 +0100 [thread overview]
Message-ID: <a355be96ce414620c2e6041bf21e6df1@plan9.escet.urjc.es> (raw)
This happen before, but just to help, this is what i use.
It's just du, wrapped to operate on your files.
For example, to walk /usr/nemo to find files with execute permission:
; walk /usr/nemo 'test -x $f && echo $f'
you can pass any command and use $f where you want the file name.
#!/bin/rc
rfork e
if (~ $#* 0) {
echo 'usage: walk file [cmd...]' >[1=2]
exit usage
}
file=$1
shift
if (~ $#* 0)
cmd='echo $f'
if not
cmd=$*
cd `{basename -d $file}
exec du -a $file | awk '{print $2}' | while (f=`{read}) { eval $cmd }
next reply other threads:[~2002-11-04 8:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-04 8:54 Fco.J.Ballesteros [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-01 17:37 Russ Cox
2002-11-01 17:31 a
2002-11-01 0:47 Geoff Collyer
2002-11-01 2:09 ` Dan Cross
2002-11-01 11:53 ` Boyd Roberts
2002-10-31 21:20 Dan Cross
2002-10-31 21:58 ` Dan Cross
2002-11-01 12:01 ` Boyd Roberts
2002-11-01 19:14 ` Dan Cross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a355be96ce414620c2e6041bf21e6df1@plan9.escet.urjc.es \
--to=nemo@plan9.escet.urjc.es \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).