Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Apr 2007 22:31:45 +0200
From:      Irsla <irsla42@gmail.com>
To:        "FreeBSD Mailing List" <freebsd-questions@freebsd.org>
Subject:   Re: first of misc questions....
Message-ID:  <ed5f4bce0704251331v735ccedet947318e8d2a6fbe1@mail.gmail.com>
In-Reply-To: <462F0824.5000107@infracaninophile.co.uk>
References:  <20070425072914.GA65634@thought.org> <462F0824.5000107@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On 4/25/07, Matthew Seaman <m.seaman@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 '\;"


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ed5f4bce0704251331v735ccedet947318e8d2a6fbe1>