On Wed, Feb 9, 2011 at 4:09 AM, Helmut Jarausch
<jarau...@igpm.rwth-aachen.de> wrote:
> On 02/09/2011 12:56:09 PM, Neil Bothwick wrote:
>> On Wed, 9 Feb 2011 13:38:37 +0200, Kfir Lavi wrote:
>>
>> > Another way to do it is with find:
>> > find /home/mark/Builder -type f -iname '*csv' -exec cp {}
>> > ~mark/CorrelationTests \;
>>
>> Replace \; with + for a faster process, as Mark said there are
>> hundreds
>> of these files.
>>
>> Or, if you use zsh instead of bash, it can be as simple as
>>
>> cp Builder/**/*.csv CorrelationTests
>>
> There is a problem with this approach, though.
> It can easily give "command line too long".
>
> Helmut.

Lots of interesting ideas. I use apps so often I've never become very
strong at the command line and yet people built this whole Linux
empire using it. It's very powerful.

One thing I didn't make clear in my original post - it didn't seem
important to confuse my real question which was the copy itself and
not locating the files - but which likely changes how well some of
these commands would work in my specific case was that the Builder
directory actually has _many_ CSV files ut specifically I needed only
the ones in the Correlation directories. Additionally, being that this
is stock & futures trading data, generally at a given time I need the
CSV files for a specific symbol, for instance in the original post:

c2stable ~ # locate Correlation | grep Builder | grep csv
/home/mark/Builder/TF/TF.D-17M-2009_06-2010_11/Correlation/TF.D-17M-2009_06-2010_11-V1.csv
/home/mark/Builder/TF/TF.D-17M-2009_06-2010_11/Correlation/TF.D-17M-2009_06-2010_11-V2.csv
/home/mark/Builder/TF/TF.D-17M-2009_06-2010_11/Correlation/TF.D-17M-2009_06-2010_11-V3.csv
<SNIP>
/home/mark/Builder/TF/TF.D-31M-2009_06-2010_11/Correlation/TF.D-31M-2009_06-2010_11-V4.csv
/home/mark/Builder/TF/TF.D-31M-2009_06-2010_11/Correlation/TF.D-31M-2009_06-2010_11-V5.csv
c2stable ~ #

I knew I wanted the Correlation directory but it turned out I had
other directories with that name on the system, so I added the grep
Builder to get me into the right tree and CSV to find only the CSV
files. However at that point I only had Russell futures data (TF.D) so
I didn't have to go further. Now, however, as I bring in Dow futures
(YM, YM.D) , S&P 500 futures (ES, ES.D), and NASDAQ futures (NQ, ND.D)
I just an an extra grep in and I'm there in terms of finding the files
I need for a certain test.

Additionally I have test results for other date ranges that will show
up soon, (2001-2005, or 2003-2011, etc. Additional greps are an easy
way to just winnow it down to a point where I'm finding what I need to
find.

This thread has given me a lot of new commands to go look at.

Thanks,
Mark

Reply via email to