recursive copy of the directory | Unix Linux Forums | Programming

  Go Back    


Programming Post questions about C, C++, Java, SQL, and other programming languages here.

recursive copy of the directory

Programming


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 08-22-2008
deepthi.s deepthi.s is offline
Registered User
 
Join Date: Jul 2008
Last Activity: 12 May 2009, 2:47 AM EDT
Posts: 11
Thanks: 0
Thanked 1 Time in 1 Post
recursive copy of the directory

I want to copy a directory recursively ( it again has directories) and the directory is on windows and is nfsmounted in vxWorks, i am using unix to develop the code for this, can any one suggest me how to copy the directories recursively.
Sponsored Links
    #2  
Old 08-22-2008
palsevlohit_123's Avatar
palsevlohit_123 palsevlohit_123 is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 2 May 2013, 8:00 AM EDT
Location: India-Chennai
Posts: 132
Thanks: 0
Thanked 7 Times in 7 Posts
cp -r source_DIR dest_DIR
Sponsored Links
    #3  
Old 08-22-2008
replytoshishir replytoshishir is offline
Registered User
 
Join Date: May 2006
Last Activity: 23 November 2012, 1:20 AM EST
Location: Bangalore
Posts: 28
Thanks: 1
Thanked 2 Times in 2 Posts
ever you can use
cp -var <SRC_DIR> <DEST_DIR>
this is a verbose option with archive also
    #4  
Old 08-22-2008
replytoshishir replytoshishir is offline
Registered User
 
Join Date: May 2006
Last Activity: 23 November 2012, 1:20 AM EST
Location: Bangalore
Posts: 28
Thanks: 1
Thanked 2 Times in 2 Posts
do you need a C program, i wonder as posted this in this forum..
Sponsored Links
    #5  
Old 08-22-2008
deepthi.s deepthi.s is offline
Registered User
 
Join Date: Jul 2008
Last Activity: 12 May 2009, 2:47 AM EDT
Posts: 11
Thanks: 0
Thanked 1 Time in 1 Post
I am using vxworks as an operating system, and "cp" here only will be able to copy a file.
vxWorks has function xcopy which does recursive copy, but when i use same function to copy the NFS Mounted directory(it is a directory on windows) it is not working properly.

So as an alternative i want a code which can do the same operation on vxworks based machines.
Sponsored Links
    #6  
Old 08-23-2008
replytoshishir replytoshishir is offline
Registered User
 
Join Date: May 2006
Last Activity: 23 November 2012, 1:20 AM EST
Location: Bangalore
Posts: 28
Thanks: 1
Thanked 2 Times in 2 Posts
Well i think it should work fine unless you are breaching the limitations..... the maximum depth of subdirectories is 20, and at least 16 Kbytes of stack space should be available to avoid stack overflow.
Try to check it for small no of sample sub directories.. and see if it works..
Sponsored Links
    #7  
Old 08-23-2008
replytoshishir replytoshishir is offline
Registered User
 
Join Date: May 2006
Last Activity: 23 November 2012, 1:20 AM EST
Location: Bangalore
Posts: 28
Thanks: 1
Thanked 2 Times in 2 Posts
Well i think it should work fine unless you are breaching the limitations..... the maximum depth of subdirectories is 20, and at least 16 Kbytes of stack space should be available to avoid stack overflow.
Try to check it for small no of sample sub directories.. and see if it works..
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
recursive copy into a directory and all its subdirectories... EinsteinMcfly UNIX for Dummies Questions & Answers 3 03-09-2012 01:37 PM
recursive search and copy cabaciucia Shell Programming and Scripting 1 02-02-2012 06:53 AM
help with recursive copy command Knowledge_Xfer UNIX for Dummies Questions & Answers 2 06-26-2009 07:56 AM
Recursive copy to a RANDOM name xerexes UNIX for Dummies Questions & Answers 10 10-23-2008 07:19 AM
recursive copy of hidden files usfrog UNIX for Advanced & Expert Users 2 02-19-2002 02:16 PM



All times are GMT -4. The time now is 05:29 AM.