rick@comspec.UUCP (Rick McCalla) (02/26/90)
I am trying to get a script working that will copy all the files in a usenet
news directory into an archive directory which I can work on at a later time.
I only want to copy the files there once as I will be de-sharing them etc. as
I get time and them removing them.
I am using the find utility and it works fine except that it also picks up all
files that are in recursive directories. Is there any way to tell find not to
look at recursive directories?
the command I am using is:
find /usr/spool/news/comp/binaries/ibm/pc -type f -mtime 0 \
-exec copy {} /u/archive/cmp.bin.ibm.pc \;
--
Comspec Communications Inc. | Rick McCalla ----- rick@comspec
Toronto, Ontario Canada |----------------------------------
Voice : (416) 785 - 3553 | Path: uunet!mnetor!becker!
Fax : (416) 785 - 3668 | comspec!rickcpcahil@virtech.uucp (Conor P. Cahill) (02/28/90)
In article <115@comspec.UUCP> rick@comspec.UUCP (Rick McCalla) writes: >the command I am using is: > find /usr/spool/news/comp/binaries/ibm/pc -type f -mtime 0 \ > -exec copy {} /u/archive/cmp.bin.ibm.pc \; 1st, your expire stuff should allow you to archive stuff to another directory instead of throwing it away. If you can't change the expire stuff, the following should do what you want: cd /usr/spool/news/comp/binaries/ibm/pc ls | cpio -p /u/archive/cmp.bin.ibm.pc 2>/dev/null and it will run lots faster. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+