Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Using cp -r command to selectively omit *.dat files while copying a directory. Post 89309 by reborg on Friday 11th of November 2005 05:54:06 PM
Old 11-11-2005
-p pass trough (copy in and out)
-d make dirs
-m preserve modification time
-v verbose

from the man page:
Code:
       ....cpio copies files
       into or out of a cpio or tar archive, which is a  file  that  contains
       other  files  plus  information  about  them, such as their file name,
       owner, timestamps, and access permissions.  The archive can be another
       file  on the disk, a magnetic tape, or a pipe.

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying DAT tapes

I am looking for a way of making a backup of a system DAT tape onto another DAT tape for security reasons. (0 Replies)
Discussion started by: johnrussell
0 Replies

2. Solaris

Copying DAT tapes

I am trying to find a way of copying a system DAT tape onto another DAT tape for security reasons. I have tried searching the net for commands but so far I have been unsuccessful. (2 Replies)
Discussion started by: johnrussell
2 Replies

3. UNIX for Dummies Questions & Answers

Copying files from one directory to Other

Hi UNIX Gurus, Could please help me out regarding following situation. I am copying some files from one directory to other directotry using following command. cp /var/tmp/*date*.gz /var/tmp/user/ Problem: Once the copy has completed, I need to check whether all the files (including... (3 Replies)
Discussion started by: satishkeshetty
3 Replies

4. Shell Programming and Scripting

Copying files from one directory into another.

Could someone please tell me if there is a command similar to head or tail that can be used on directories. I want to select a given number of files from a directory and copy them into another directory. But I found out I can't use head as it doesn't (or I don't know how yet!) work on directories.... (4 Replies)
Discussion started by: Krush187
4 Replies

5. Shell Programming and Scripting

Copying files to a directory

Hi I have a few questions. I am trying to copy a file to a directory. I need to copy files that do not end in numbers, for example, into a directory. This is what I tried so far. cp filename directorytowhereIwannacopy but it says it can't copy to a directory. I need to copy many files into one... (2 Replies)
Discussion started by: #moveon
2 Replies

6. UNIX for Dummies Questions & Answers

Unix command to copy files selectively

Hi, I'm new to Unix and am trying to write a copy command for the following scenario: Copy all .tif files from the src directory to dest directory but exclude the ones under archive directory. In other words, I'm trying to write the unix cp equivalent of the following ant target: <target... (3 Replies)
Discussion started by: anandkumarj
3 Replies

7. Shell Programming and Scripting

Command to list only files omit directories.

Hi All I am writting a script that does a comparison between files in 2 diffectent directories. To do this I need a command that will list out only the files in a give directory and omit any sub dorectories with that directory. But I am unable to find it. Please Help. I tried ls... (5 Replies)
Discussion started by: Veenak15
5 Replies

8. Shell Programming and Scripting

Copying files to a directory

Hi, I am newbie to unix scripting, need a help in the doubt i have. It is " when files are copied to a directory using cp command, they are arranged by default according to the file name, is there anyway where the files that are copied be arranged with respect to their size, with using the sort... (5 Replies)
Discussion started by: pundalik
5 Replies

9. Shell Programming and Scripting

How to use 'ls' command to list files like *.dat, not *.*.dat?

How to use 'ls' command to list files like *.dat, not *.*.dat (5 Replies)
Discussion started by: pmcginni777
5 Replies

10. Shell Programming and Scripting

Execute a Command in a .Dat File and use it in other Files

We have a process where we store the database password in a config file like below from where the password is picked up and used in Database Scripts ID, Password But we now have a Audit Requirement not to have the passwords in Config Files directly. We have a command which could fetch the... (2 Replies)
Discussion started by: infernalhell
2 Replies
All times are GMT -4. The time now is 10:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy