Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Copying multiple directories at the same time using Unix Post 60342 by JPigford on Saturday 15th of January 2005 12:32:06 AM
Old 01-15-2005
So your third option is the same thing as me doing:

cp -r -f /directory1/ ../backup/directory1/
cp -r -f /directory2/ ../backup/directory2/
cp -r -f /directory3/ ../backup/directory3/

just in one big sweep?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

copying to multiple directories using wildcard

Can we copy a file to multiple directories using a single command line , i tried with * didnt work for me cp /tmp/a.kool /tmp/folder/*/keys/ I am tryn to copy a.kool file to all keys folder in /tmp folder. is something i am missing ? (4 Replies)
Discussion started by: logic0
4 Replies

2. UNIX for Dummies Questions & Answers

copying directories from NT server to Unix server (solaris 5.8)

I need to copy around 30 directories (each directory include one or more text file(s)) from NT server to Unix server at one go. For doing this what are the privillages i should have in both NT and Unix server. Please let me know which command i can use in shell prompt. TIA. (4 Replies)
Discussion started by: jhmr7
4 Replies

3. Shell Programming and Scripting

check if multiple directories exist else create missing directories

Hi , I 'm trying to check if multiple directories exist on a server, if not create the missing ones and print " creating missing directory. how to write this in a simple script, I have made my code complex if ; then taskStatus="Schema extract directory exists, checking if SQL,Count and... (7 Replies)
Discussion started by: ramky79
7 Replies

4. UNIX for Dummies Questions & Answers

Deleting multiple directories inside multiple directories

Hi, Very unfamiliar with unix/linux stuff. Our admin is on vacation so, need help very quickly. I have directories (eg 40001, 40002, etc) that each have one subdirectory (01). Each subdir 01 has multiple subdirs (001, 002, 003, etc). They are same in each dir. I need to keep the top and... (7 Replies)
Discussion started by: kkouraus1
7 Replies

5. Shell Programming and Scripting

listing directories and sub directories with time and name options

Hello all! I'm looking to list directories and sub-directories of a path, on this forum I found this command: find $path -type d -exec ls -ld {} \; The issue I have is that with a simple ls, the list is listed by name, and using -t I get it by time. How could I list directories and sub... (5 Replies)
Discussion started by: nomadvisuals
5 Replies

6. UNIX for Advanced & Expert Users

Help with Calculating time difference between many directories in UNIX

A report needs to come some what similar to this No of elements Stream Batch No Load time A B C D A,B,C im able to get quite easily wc -l /usr/local/intranet/areas/prod/output/SRGW_0?/*/MESSAGE_T.dat O/P of above command. A B C ... (1 Reply)
Discussion started by: peckenson
1 Replies

7. UNIX for Dummies Questions & Answers

copy file using unix in multiple directories

Hi All Genious, I want to copy a file name XYZ .In a directory /HOME/dir/IXOS1/dir1 which contain multiple directories named not in pattern want to copy the XYZ in all of the directories available on path /HOME/dir/IXOS1/dir1 . Thanks in advance . (2 Replies)
Discussion started by: mumakhij
2 Replies

8. UNIX for Dummies Questions & Answers

Copying Directories from one server to another

Hi, I have a requirement where I have to connect to another server and copy directories from one server to another Directories on the Source server look like below (YYYY-MM-DD- 1 to 23) drwxr-xr-x 2 test_user dmfmart 422 Sep 1 23:45 2014-09-01-18 drwxr-xr-x 2 test_user dmfmart ... (3 Replies)
Discussion started by: arunkesi
3 Replies

9. Shell Programming and Scripting

Copying multiple files and appending time stamp before file extension

Hi, I have multiple files that read: Asa.txt Bad.txt Gnu.txt And I want to rename them using awk to Asa_ddmmyytt.txt and so on ... If there is a single command or more efficient executable please share! Thanks! (4 Replies)
Discussion started by: Jesshelle David
4 Replies

10. UNIX for Beginners Questions & Answers

How to read multiple files at same time through UNIX scripting?

How to read multiple files at simultaneously? (1 Reply)
Discussion started by: Priyanka_M
1 Replies
dircmp(1)						      General Commands Manual							 dircmp(1)

NAME
dircmp - Compares two directories SYNOPSIS
dircmp [-d] [-s] directory1 directory2 The dircmp command reads directory1 and directory2, compares their contents, and writes the results to standard output. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: dircmp: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Displays for each common file name the differing contents of the two files, if any. The display format is the same as that of the diff command. Does not list the names of identical files. OPERANDS
The path name of a directory to be compared. DESCRIPTION
First, dircmp compares the file names in each directory. When the same file name appears in both, dircmp compares the contents of the two files. In the output, dircmp lists the files unique to each directory. It then lists the files with identical names but different contents. If entered without a option, dircmp also lists files that have both identical names and identical contents. NOTES
[Tru64 UNIX] In many cases, diff -r, rather than dircmp, is preferred. The dircmp command is marked LEGACY. The diff -r command should be used instead. EXAMPLES
To summarize the differences between the files in two directories, enter: dircmp proj.ver1 proj.ver2 This displays a summary of the differences between the directories proj.ver1 and proj.ver2. The summary lists separately the files found only in one directory or the other, and those found in both. If the file is found in both directories, the file is listed. If the files are identical, dircmp displays identical; otherwise, dircmp displays different. To show the details of the differences between files, enter: dircmp -d -s proj.ver1 proj.ver2 The -s option suppresses information about identical files. The -d option displays a diff listing for each of the differing files found in both directories. SEE ALSO
Commands: cmp(1), diff(1) Standards: standards(5) dircmp(1)
All times are GMT -4. The time now is 08:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy