The UNIX and Linux Forums

The UNIX and Linux Forums (http://www.unix.com/index.php)
-   Programming (http://www.unix.com/programming/)
-   -   recursive copy of the directory (http://www.unix.com/programming/78180-recursive-copy-directory.html)

deepthi.s 08-22-2008 12:58 AM

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.

palsevlohit_123 08-22-2008 02:14 AM

cp -r source_DIR dest_DIR

replytoshishir 08-22-2008 03:39 AM

ever you can use
cp -var <SRC_DIR> <DEST_DIR>
this is a verbose option with archive also

replytoshishir 08-22-2008 03:39 AM

do you need a C program, i wonder as posted this in this forum..

deepthi.s 08-22-2008 08:49 AM

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.

replytoshishir 08-23-2008 01:03 PM

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..

replytoshishir 08-23-2008 01:03 PM

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..


All times are GMT -4. The time now is 12:37 AM.

Linux and Unix Supported by: vBulletin
Search Engine Optimisation provided by DragonByte SEO v1.1.4 (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
The UNIX and Linux Forums Content Copyright ©1993-2013. All Rights Reserved.
Forum Operations by The UNIX and Linux Forums