Date: Mon, 8 Apr 2002 17:24:20 +0200 From: Roman Neuhauser <neuhauser@mail.cz> To: Radhika Sambamurti <radhika_narendran@yahoo.com> Cc: freebsd-questions@freebsd.org Subject: Re: -exec script question Message-ID: <20020408152420.GA12083@roman.mobil.cz> In-Reply-To: <20020408135739.74130.qmail@web9307.mail.yahoo.com> References: <20020408135739.74130.qmail@web9307.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Mon, 8 Apr 2002 06:57:39 -0700 (PDT) > From: Radhika Sambamurti <radhika_narendran@yahoo.com> > Subject: -exec script question > To: freebsd-questions@freebsd.org > > hi, > I am trying to create a script to move files over 7 days > old. my quesions is how can i use the -exec command with > mv? > > so far i have; > > find / -name \*inc -mtime +7 -exec mv /usr/tmp {}; > > would this be correct? if you want find(1) to move /usr/tmp to the first file it finds according to the criteria then, almost, yes. :) find / -name '*inc' -mtime +7 -exec mv {} /usr/tmp \; note the backslash before the semicolon, and the space before the backslash. -- FreeBSD 4.4-STABLE 5:21PM up 15 days, 7 mins, 5 users, load averages: 0.09, 0.10, 0.08 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020408152420.GA12083>