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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Copying multiple folders to local machine (don't know folder names) leenyburger UNIX for Dummies Questions & Answers 5 06-12-2008 07:38 AM
Copying specific folders from one server to another chris1234 Shell Programming and Scripting 4 12-18-2007 07:44 PM
find only folders melanie_pfefer UNIX for Advanced & Expert Users 1 11-20-2006 06:47 AM
Backing up Folders without some folders...;) chimpu Shell Programming and Scripting 1 04-26-2004 10:02 AM
downloading folders in ftp eloquent99 UNIX for Dummies Questions & Answers 6 04-23-2003 03:06 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-26-2004
chimpu chimpu is offline
Registered User
  
 

Join Date: Apr 2004
Posts: 9
Unhappy Copying Folders without some folders...

I am in a fix.......

I have to write a backup script to backup say Folder A.

Folder A contains n folders 1,2 ,3 .....n.

my script should copy A without folder 2 & 3.

Is there anyway I can do it without writing individual copy commands????


Please help....

Last edited by chimpu; 04-26-2004 at 10:20 AM..
  #2 (permalink)  
Old 04-26-2004
google's Avatar
google google is offline Forum Advisor  
Moderator
  
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
So what you are really asking for is to copy all files within Folder A and only the first folder (folder 1 in your example). You need to know which folder under Folder A to copy. Why not just make to copy commands?
  #3 (permalink)  
Old 04-26-2004
chimpu chimpu is offline
Registered User
  
 

Join Date: Apr 2004
Posts: 9
No,

What I am asking is to copy all files and folders in folder A other than folders 2 & 3

so the copied folder ACopy will have 1,4,5 .....n
  #4 (permalink)  
Old 04-26-2004
google's Avatar
google google is offline Forum Advisor  
Moderator
  
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
Look into using the find command to exclude the directories that you do not want to back up. You cna create a temp dir structure containing all files and directories from the output of your find command. Backup the temp directory structure then remove it. find is by default recursive, but it supports expressions which allows quite a bit of flexibility.
  #5 (permalink)  
Old 04-26-2004
butterfm butterfm is offline
Registered User
  
 

Join Date: Sep 2003
Posts: 25
The easiest soltion would be to copy the lot then remove folders 2 & 3.
  #6 (permalink)  
Old 04-26-2004
chimpu chimpu is offline
Registered User
  
 

Join Date: Apr 2004
Posts: 9
Thumbs up

Thanks All,
I am copying across and deleting!!!
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 06:46 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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