Date: Fri, 08 Mar 2002 05:56:02 +0000 From: "Jon Larssen" <jonlarssen@hotmail.com> To: freebsd-questions@freebsd.org Subject: find(1) usage Message-ID: <F169kAvjUqMUrYawLLe00013a42@hotmail.com>
next in thread | raw e-mail | index | archive | help
Hi,
I have a backup directory of some important system files, for instance,
backup/etc/master.passwd, backup/etc/groups, etc. Now, if I'm standing just
on backup's parent, I can find the files I need to backup, like:
find backup/ -name "*" ! -type d -print
and the result would be
backup/etc/master.passwd
backup/etc/groups
etc.
Now, I'd like to use the -exec expression of find(1) to obtain the following
(sample) command:
cp -p /etc/master.passwd backup/etc/master.passwd
I know there's a thingy, {}, that would give the whole path
(backup/etc/master.passwd, for instance). Now, how can I erase the backup
part? Is this doable just with clever use of find(1)?
Best regards,
Jon.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
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?F169kAvjUqMUrYawLLe00013a42>
