To answer my own question, unless someone has a better answer, I could use: # ls |grep -v ???????G.DAT |grep -v ???????Z.DAT |xargs cp /backup Would this be the correct way? Is it suggested that I would tar then move, is this quicker & safer?
Regards, Scott -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Scott Ragen Sent: Wednesday, 20 March 2002 5:21 PM To: [EMAIL PROTECTED] Subject: [SLUG] Copying with exclusions Hi guys, Just have a question about copying files from one directory to another with some soft of exclusion string. What my goal is, I want to backup all data from one directory in a filesystem to another file system except ???????G.DAT and ???????Z.DAT (the ??????? can be replaced with a * if necessary but not preferred) I can do it with the "for i in" command, but is there an easier less stressful way? There is about 7-8 gig of data in total, (4 gig needed to be copied), and approx 6000 files (4000 of which would need to be copied). Thanks, Scott -- Scott Ragen Roadtech Systems Ltd. Technical Support Ph: +61 2 9807 3516 Fax: +61 2 9008 5294 www.roadtechsystems.com.au -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
