Sponsored Content
Operating Systems HP-UX Recursive copy of Folders with files Post 302915300 by gull04 on Tuesday 2nd of September 2014 06:57:55 AM
Old 09-02-2014
Hi,

Not entirely sure what you want to do here, am I to understand that you want to copy everything to a new destination - and place the other four directories inside the reports directory.

Or am I missng something here.

Regards

dave
 

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

copy all files and folders and cjange or remove ownership

So tried: cp -r -p test1/ user@machine:///srv/www/vhosts/domain.co.uk/httpdocs/backup/ but this didn't work either :( Anyone able to help with this? Many thanks Mr M (3 Replies)
Discussion started by: misterm
3 Replies

3. Shell Programming and Scripting

copy some files from users home folders to my folder

i have users home directories in /home all the users have some files starting with character e and i want to copy all these files in a folder in my (root) home using a script i tried the script for i in m5 do cd m5 cp e1* /home/pc/exam cd .. done but get these... (3 Replies)
Discussion started by: pcrana
3 Replies

4. Shell Programming and Scripting

I need script Copy permissions of files and folders from one server to another

Hi.. I have 2 servers with linux suse10. I made a mistake and on one of the servers changed with chmod the permission of root in directory /. In the other servers the permissions are correct Please i need a script, to change the permissions of one server 1, using the same permission of the... (11 Replies)
Discussion started by: ave-phoenix
11 Replies

5. Windows & DOS: Issues & Discussions

Windows mass copy files with same name in differnt folders

I have files existing with same names in the folders with date as display below c:\2010-09-10 <==== folder arr1.jpg arr2.jpg arr3.jpg arr4.jpg c:\2010-09-09 <==== folder arr1.jpg arr2.jpg c:\2010-09-08 <==== folder arr2.jpg arr3.jpg arr4.jpg ... (5 Replies)
Discussion started by: jville
5 Replies

6. Shell Programming and Scripting

recursive saving of files and folders

Hi all I have a bash script, that loops through a folders files and all subfolders for .shtml files. It looks for a string and replaces it, creating a backup of the original file. This all works great, but I'd like, when the backup is done, that the files are then also created in their... (4 Replies)
Discussion started by: terrid
4 Replies

7. UNIX for Dummies Questions & Answers

copy mutilple files to mutiple folders

Hi, I just started to learn shell progamming and just can't get my head around the following problem. I need to do the following: I have a folder which contains 100+ subfolders. Inside these subfolders there is one folder named 'Morph' and several jpg's. I need to copy all the files into... (4 Replies)
Discussion started by: M474746
4 Replies

8. Shell Programming and Scripting

Loop folders, delete files, copy new ones

Folks, I am hopeful that you may be able to help me out with writing a script that can be run nightly (as cron?) to loop through all subfolders within the "/media" directory, delete all of the files in each of them, and then copy in all of the files from the "/home//sansa" directory to each of... (6 Replies)
Discussion started by: acraig
6 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. Shell Programming and Scripting

How to copy files/folders and show the files/folders?

Hi, So i know we use cp -r as a basic to copy folders/files. I would like this BUT i would like to show the output of the files being copied. With the amazing knowledge i have i have gone as far as this: 1) find source/* -exec cp -r {} target/ \; 2) for ObjectToBeCopied in `find... (6 Replies)
Discussion started by: Imre
6 Replies
FS_COPYACL(1)						       AFS Command Reference						     FS_COPYACL(1)

NAME
fs_copyacl - Copies an ACL from a directory to one or more other directories SYNOPSIS
fs copyacl -fromdir <source directory (or DFS file)> -todir <destination directory (or DFS file)>+ [-clear] [-id] [-if] [-help] fs co -f <source directory (or DFS file)> -t <destination directory (or DFS file)>+ [-c] [-id] [-if] [-h] DESCRIPTION
The fs copyacl command copies the access control list (ACL) from a source directory to each specified destination directory. The source directory's ACL is unchanged, and changes to the destination directory's ACL obey the following rules: o If an entry on the source ACL does not already exist on the destination ACL, it is added. o If an entry exists on both the source and destination ACLs, the permissions from the source ACL entry replace the current permissions on the destination ACL entry. o If an entry on the destination ACL has no corresponding entry on the source ACL, it is removed if the -clear flag is included and is unchanged otherwise. In other words, if the -clear flag is provided, the source ACL completely replaces the destination ACL. When using this command to copy ACLs between objects in DFS filespace accessed via the AFS/DFS Migration Toolkit Protocol Translator, it is possible to specify files, as well as directories, with the -fromdir and -todir arguments. CAUTIONS
Do not copy ACLs between AFS and DFS files or directories. The ACL formats are incompatible. OPTIONS
-fromdir <source directory> Specifies the source directory from which to copy the ACL. (Specifying an AFS file copies its directory's ACL, but specifying a DFS file copies its own ACL.) A partial pathname is interpreted relative to the current working directory. -todir <destination directory> Specifies each directory for which to alter the ACL to match the source ACL. (Specifying an AFS file halts the command with an error, but specifying a DFS file alters the file's ACL). A partial pathname is interpreted relative to the current working directory. Specify the read/write path to each directory (or DFS file), to avoid the failure that results from attempting to change a read-only volume. By convention, the read/write path is indicated by placing a period before the cell name at the pathname's second level (for example, "/afs/.abc.com"). For further discussion of the concept of read/write and read-only paths through the filespace, see the fs mkmount reference page. -clear Replaces the ACL of each destination directory with the source ACL. -id Modifies the Initial Container ACL of each DFS directory named by the -todir argument, rather than the regular Object ACL. This argument is supported only when both the source and each destination directory reside in DFS and are accessed via the AFS/DFS Migration Toolkit Protocol Translator. -if Modifies the Initial Object ACL of each DFS directory named by the -todir argument, rather than the regular Object ACL. This argument is supported only when both the source and each destination directory reside in DFS and are accessed via the AFS/DFS Migration Toolkit Protocol Translator. -help Prints the online help for this command. All other valid options are ignored. EXAMPLES
The following example command copies the current working directory's ACL to its subdirectory called reports. Note that the source directory's ACL is unaffected. Entries on the reports directory's that are not on the source ACL of the current directory remain unaffected as well, because the -clear flag is not used. % fs listacl . reports Access list for . is Normal rights: pat rlidwka smith rlidwk Access list for reports is Normal rights: pat rl pat:friends rl Negative rights jones rlidwka % fs copyacl -fromdir . -todir reports % fs listacl . reports Access list for . is Normal rights: pat rlidwka smith rlidwk Access list for reports is Normal rights: pat rlidwka pat:friends rl smith rlidwk Negative rights jones rlidwka PRIVILEGE REQUIRED
To copy an ACL between AFS objects, the issuer must have the "l" (lookup) permission on the source directory's ACL and the "a" (administer) permission on each destination directory's ACL. If the -fromdir argument names a file rather than a directory, the issuer must have both the "l" and "r" (read) permissions on the ACL of the file's directory. To copy an ACL between DFS objects, the issuer must have the r permission on the source directory or file's ACL and the "c" (control) permission on each destination directory or file's ACL. SEE ALSO
fs_listacl(1), fs_mkmount(1), fs_setacl(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 FS_COPYACL(1)
All times are GMT -4. The time now is 01:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy