LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] A new copying files problem

[ILUG] A new copying files problem

Padraig Brady Padraig at AnteFacto.com
Fri Apr 6 14:50:30 IST 2001


Yes that is confusing. I think from what you're saying all that's
different from the previous e.g. is that you only want to copy
specific filenames. If they can be specified by shell wildcards
it's trivial, i.e.:

find /dir -type f -name "basename*" -print0 |
xargs -r0 cp -pi --target-directory=/target/dir

note it things are more complex you can do:

find /dir -type f \( -name "basename*" -or -name "another*" \) -print0 |
xargs -r0 cp -pi --target-directory=/target/dir

Padraig.

Paul McCourt wrote:

> Seeing as you guys are on this topic, what about the following problem.
> 
> I want to copy a specfic file which is located in every directory in a dir
> structure.  See below, the file has notes in the filename and theres a
> different one located in each directory, I want something to go into each
> dir, and copy the file to another target directory along with the others
> 
> Paul
>   |
>   - home
>   |
>   - office
>   |
>   - work
> 
> 
> Confused? I'm sorry I couldn't make it any more murky.
> 
> thanks
> 
> Paul





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell