Sponsored Content
Top Forums Programming recursive copy of the directory Post 302227798 by replytoshishir on Friday 22nd of August 2008 03:39:16 AM
Old 08-22-2008
ever you can use
cp -var <SRC_DIR> <DEST_DIR>
this is a verbose option with archive also
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

recursive copy of hidden files

I need to know how to copy hidden files recursively? cp -r sourceDir/* targetDir/. ignores the hidden files. Thank you!! (2 Replies)
Discussion started by: usfrog
2 Replies

2. UNIX for Dummies Questions & Answers

Recursive copy to a RANDOM name

Dear Group, after trying numerous suggestions and racking my brain I cannot manage something which seems so simple. Essentiallly, I would like to perform a recursive copy to a destination but give it a random name. I assumed (incorrectly) that the following would work: cp -r... (10 Replies)
Discussion started by: xerexes
10 Replies

3. Programming

Recursive remove directory.

What is the best way to completely remove dir with it's content ??? rmdir deletes only EMPTY dirs as i know. The man page of remove function says "remove() deletes a name from the file system." Can it remove any dir recursively ??? :rolleyes: (7 Replies)
Discussion started by: Trump
7 Replies

4. UNIX for Dummies Questions & Answers

recursive wc on a directory?

Hi all, I need to count the number of lines in all the files under a directory (several levels deep). I am feeling extremely dumb, but I don't know how to do that. Needless to say, I am not a shell script wiz... Any advice? thanks in advance! (13 Replies)
Discussion started by: bimba17
13 Replies

5. UNIX for Dummies Questions & Answers

help with recursive copy command

Hi Guys, I am experiencing a problem right now while copying a directory as well as its subdirectories to my target directory. I know this is a very simple UNIX command using cp -R source directory target directory. but unfortunatley while doing this an error comes up on the command line saying... (2 Replies)
Discussion started by: Knowledge_Xfer
2 Replies

6. Shell Programming and Scripting

scp : recursive copy doesn't work

Hi I have a problem with scp command : I try to copy a list of files from source to destination, it works fine but if there is a directory not existing on destination, it doesn't automatic create. Syntax : scp -rp /<PATH>/<NEW_DIR>/<FILE> <USER_DEST>@<HOST_DEST>:<PATH>/<NEW_DIR>/<FILE>... (5 Replies)
Discussion started by: madmat
5 Replies

7. Shell Programming and Scripting

recursive search and copy

Hello again. Well, I need help again sooner as I thought. Now I want to search for files with a known name within all subdirs, and copy the to differently named files in the same directory. For example if I had only one file to copy, I would just usecp fileName newFileNamebut to do this... (1 Reply)
Discussion started by: cabaciucia
1 Replies

8. UNIX for Dummies Questions & Answers

recursive copy into a directory and all its subdirectories...

I want to copy a file from the top directory into all the sub-folders and all of the sub-folders of those sub-folder etc. Does anyone have any idea how to do this? Thanks in advance of any help you can give. (3 Replies)
Discussion started by: EinsteinMcfly
3 Replies

9. Shell Programming and Scripting

Recursive search for files and copy to new directories

So I have extremely limited experience with shell scripting and I was hoping someone could point out a few commands I need to use in order to pull this off with a shell script like BASH or whatnot (this is on OS X). I need to search out for filenames with account numbers in the name itself... (3 Replies)
Discussion started by: flyawaymike
3 Replies

10. HP-UX

Recursive copy of Folders with files

Dear All, I will appreciate any help received. Our system is running on hpux v1 My problem is as follows: We have many customer folders with name fd000100, fd000101 and so on e.g. (Testrun)(testsqa):/>ll /TESTrun/fd000100 total 48 drwxrwx--- 2 fq000100 test 96 Jun 27 2004... (17 Replies)
Discussion started by: mhbd
17 Replies
ARCHIVE(8)						      System Manager's Manual							ARCHIVE(8)

NAME
archive - Usenet article archiver SYNOPSIS
archive [ -a archive ] [ -f ] [ -i index ] [ -m ] [ -r ] [ input ] DESCRIPTION
Archive makes copies of files specified on its standard input. It is normally run either as a channel feed under innd(8), or by a script before expire(8) is run. Archive reads the named input file, or standard input if no file is given. The input is taken as a set of lines. Blank lines and lines starting with a number sign (``#'') are ignored. All other lines should specify the name of a file to archive. If a filename is not an absolute pathname, it is taken to be relative to /var/spool/news. Files are copied to a directory within the archive directory, /var/spool/news/news.archive. The default is to create a hierarchy that mim- ics the input files; intermediate directories will be created as needed. For example, the input file comp/sources/unix/2211 (article 2211 in the newsgroup comp.sources.unix) will be copied to /var/spool/news/news.archive/comp/sources/unix/2211. OPTIONS
-a archive If the ``-a'' flag is used then its argument specifies the directory to archive in instead of the default. -f If the ``-f'' flag is used, then all directory names will be flattened out, replacing the slashes with periods. In this case, the file would be copied to /var/spool/news/news.archive/comp.sources.unix/2211. -i If the ``-i'' flag is used, then archive will append one line to the specified index file for each article that it copies. This line will contain the destination name and the Message-ID and Subject headers. -m Files are copied by making a link. If that fails a new file is created. If the ``-m'' flag is used, then the file will be copied to the destination, and the input file will be replaced with a symbolic link pointing to the new file. -r By default, archive sets its standard error to /var/log/news/errlog. To suppress this redirection, use the ``-r'' flag. EXIT STATUS
If the input is exhausted, archive will exit with a zero status. If an I/O error occures, it will try to spool its input, copying it to a file. If there was no input filename, the standard input will be copied to /var/spool/news/out.going/archive and the program will exit. If an input filename was given, a temporary file named input.bch (if input is an absolute pathname) or /var/spool/news/out.going/input.bch (if the filename does not begin with a slash) is created. Once the input is copied, archive will try to rename this temporary file to be the name of the input file, and then exit. EXAMPLES
A typical newsfeeds(5) entry to archive most source newsgroups is as follows: source-archive :!*,*sources*,!*wanted*,!*.d :Tc,Wn :/usr/lib/news/bin/archive -f -i /usr/spool/news/news.archive/INDEX HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.14, dated 1996/10/29. SEE ALSO
newsfeeds(5). ARCHIVE(8)
All times are GMT -4. The time now is 01:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy