Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] copy a bunch of files...
Date: Tue, 08 Feb 2011 19:04:24
Message-Id: AANLkTikXFK3GLNOfo6-iQaKq76fXJfi3kFW1dK0f38LA@mail.gmail.com
1 Hi,
2 Looking for a simple way to do a big copy at the command line. I
3 have a bunch of files (maybe 100 right now, but it will grow) that I
4 can find with locate and grep:
5
6 c2stable ~ # locate Correlation | grep Builder | grep csv
7 /home/mark/Builder/TF/TF.D-17M-2009_06-2010_11/Correlation/TF.D-17M-2009_06-2010_11-V1.csv
8 /home/mark/Builder/TF/TF.D-17M-2009_06-2010_11/Correlation/TF.D-17M-2009_06-2010_11-V2.csv
9 /home/mark/Builder/TF/TF.D-17M-2009_06-2010_11/Correlation/TF.D-17M-2009_06-2010_11-V3.csv
10 <SNIP>
11 /home/mark/Builder/TF/TF.D-31M-2009_06-2010_11/Correlation/TF.D-31M-2009_06-2010_11-V4.csv
12 /home/mark/Builder/TF/TF.D-31M-2009_06-2010_11/Correlation/TF.D-31M-2009_06-2010_11-V5.csv
13 c2stable ~ #
14
15 I need to copy these files to a new directory
16 (~mark/CorrelationTests) where I will modify what's in them before
17 running correlation tests on the contents.
18
19 How do I feed the output of the command above to cp at the command
20 line to get this done?
21
22 I've been playing with things like while & read but I can't get it right.
23
24 Thanks,
25 Mark

Replies

Subject Author
Re: [gentoo-user] copy a bunch of files... Florian Philipp <lists@×××××××××××.net>
Re: [gentoo-user] copy a bunch of files... Kfir Lavi <lavi.kfir@×××××.com>