first of misc questions....

Gary Kline kline at tao.thought.org
Wed Apr 25 22:19:34 UTC 2007


On Wed, Apr 25, 2007 at 10:31:45PM +0200, Irsla wrote:
> Hi,
> 
> On 4/25/07, Matthew Seaman <m.seaman at infracaninophile.co.uk> wrote:
> >
> >   find . -type f \( -mtime 6 -o -mtime 29 \) -print0 | xargs -0 vi
> >
> 
> what about the -exec option of find ? I always wonder why people don't use 
> it.
> 
> find . -type f \( -mtime 6 -o -mtime 29 \) -exec vi {} \;
> 
> '{}" <= is the filename find found
> you need a ';" to tell find that the command stops here (in case you
> want to add more options to find) and the '\" is mandatory eitherwise
> your SHELL will interfear.
> 
> btw don't forget the space between the '{}" and the '\;"
> 

	Thanks, but I've known this "-exec foo {} \;" for several 
	years.  I found it on this -questions list that is about as 
	savvy a list as exists!  Thw -mtime N -o -mtime M stuff is
	uncommon enough, tho, to not be in my bag of tricks.

	:-)

	gary


> 
> Regards,
> 
> -- 
> A: Maybe because some people are too annoyed by top-posting.
> Q: Why do I not get an answer to my question(s)?
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> 
> WAKIM Robert
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"

-- 
  Gary Kline  kline at thought.org   www.thought.org  Public Service Unix



More information about the freebsd-questions mailing list