The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find a specific files in a many directory selamba_warrior Shell Programming and Scripting 7 05-28-2008 03:41 PM
Read from fileList.txt, copy files from directory tree fxvisions Shell Programming and Scripting 1 10-30-2007 05:17 PM
To copy the files newer than specific date RAJESHKANNA SUN Solaris 3 08-07-2007 03:44 AM
List all files that contain a specific directory Sat510 SUN Solaris 7 04-17-2007 10:57 AM
delete files in specific directory legato Shell Programming and Scripting 2 03-29-2006 09:46 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-07-2008
sharpsharkrocks sharpsharkrocks is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 2
Recursively copy only specific files from a directory tree

Hi
I am a shell-script newbie and am looking to synchronize certain files in two directory structures.

Both these directory-trees are in CVS and so I dont want the CVS directory to be copied over.

I want only .sh and .pl files in each subdirectory under these directory trees to be synchronized.

How do I achieve this?

Thanks
SharpShark
  #2 (permalink)  
Old 01-07-2008
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
"cvs export .." should read out of a CVS repository without the CVS directory entries.
  #3 (permalink)  
Old 01-07-2008
sharpsharkrocks sharpsharkrocks is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 2
Hi porter
The problem is that I dont want to copy all files from the directory tree.
I want to have complete control over the directories from which the files are copied and also the files themselves.
Only part of the directory trees are identical (nomenclature wise, etc)
hence cvs export and reimport would fail.

Sharpshark
  #4 (permalink)  
Old 01-07-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,100
There is a command called rsync that can do what you want. I would try to use that.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0