[X4U] command line cp question

Stroller macmonster at myrealbox.com
Thu Dec 1 19:38:52 PST 2005


On Dec 1, 2005, at 9:28 pm, Kansas Territory wrote:
> Could someone give me a hint or a clue as to how I could on a server, 
> via the command line..
> COPY all files that end in .pl   into a directory.
>
> I know if I'm in one directory.. I could do something like
>
> cp *.pl  backupdirectory
>
> But I want to start up on the root level  /      and copy ALL files on 
> the server than end in .pl

    find / -name "*.pl" -exec cp \{} backupdir \;

If you have multiple files with the same_name.pl but in different 
directories then you'll need to use something different.

Stroller. 



More information about the X4U mailing list