Tips for Linux Ubuntu Fedora Centos RHEL Unix etc

Tips for Linux Ubuntu Fedora Centos RHEL Unix etc Some special Tips for Open source OS

Sunday, December 14, 2008

How to copy Specific file from a Dir recursively?

How to copy Specific file from a Dir recursively?

You can also use rsync to grab those files, for example, to get all the text files (ending in ".txt"):

Code:

#rsync -r -f "+ */" -f "+ *.txt" -f "- *" tmp/ temp/

Where "tmp" is the source directory, and "temp" is the destination (it will copy from the source dir, not the source dir itself)
Posted by jack at 2:47 PM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2009 (42)
    • ►  August (2)
    • ►  June (2)
    • ►  May (2)
    • ►  April (3)
    • ►  March (7)
    • ►  February (20)
    • ►  January (6)
  • ▼  2008 (15)
    • ▼  December (12)
      • 10 Things You Should Do Immediately After Installi...
      • How do I start chrooted httpd with Centos OR Redhat
      • How to configure Citycell Zoom USB Modem for Linux...
      • How to Install Software using Gentoo Emerge
      • Installing slackware packages
      • Installing with fedora / yum
      • Installing software on Mandrake with urpm
      • Installing software with Apt-get
      • Installing RPM's using the Redhat Package Manager
      • Compiling and Installing software from source
      • How to copy Specific file from a Dir recursively?
      • How to copy Specific file from a Dir recursively?
    • ►  November (2)
    • ►  October (1)
Simple theme. Powered by Blogger.