On 8/31/07, primm <[EMAIL PROTECTED]> wrote:
> I've 800 or so files and folders in a folder called nonmembers. I mkdir
> another folder in the folder nonmembers called members. I want to copy all
> the 800 files in nonmembers to members. I'm in the nonmembers folder at the
> command line. What do I type? Sounds easy doesn't it. I tried cp -a * members
> but that of course includes members. I suppose I want to say 'copy everything
> in the nonmembers folder that was there before I made the members folder to
> the members folder'. If I had a gui I would simply drag and drop.
>
> Thanks. Lynn.

A simple way that may work:

cd nonmembers
ls | grep -v members > /tmp/filelist
cp -a `cat /tmp/filelist` members

But I would expect the cp command line to be too long.

try
     echo cp -a `cat /tmp/filelist` members
and see if it ends with members.

If not, you could replace it with a while loop the reads from
/tmp/filelist one filename at a time.

I don't remember the syntax offhand for that.

Greg
-- 
Greg Freemyer
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to