11-10-2007
Copy single file to multiple directories
Please help - I need to copy a single file to multiple directories.
Dir structure:
Parent_Directoy
Filename1
Child_Directory1
Child_Directory2
Child_Directory3
Child_Directory4
....
So I need to copy Filename1 to all of the Child_Directories.
Currently I do it one by one via
cp Filename1 Child_Directory1/
cp Filename1 Child_Directory2/
....
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a report file that is generated every day by a scheduled process.
Each day the file is written to a directory named .../blah_blah/Y07/MM-DD-YY/reportmmddyy.tab
I want to copy all of this reports to a separate directory without having to do it one by one.
However, if I try
cp... (3 Replies)
Discussion started by: ken2834
3 Replies
2. UNIX for Dummies Questions & Answers
Hello-
I need to copy a file into multiple directories, and each directory's sub-directories (of which there are 5)
Currently, the parent directory is set up like this:
dir1
sub-dir1
sub-dir2
sub-dir3
sub-dir4
sub-dir5
dir2
sub-dir1
sub-dir2
sub-dir3
... (1 Reply)
Discussion started by: penlok
1 Replies
3. Shell Programming and Scripting
I would like to find and backup all *.mp4 files from /Pictures and its sub-directories and move them to a single directory on a remote. I can find and move the files but I don't want the directory structure...just the files to be placed in a single remote directory.
To find my files I use
... (1 Reply)
Discussion started by: wreckedred
1 Replies
4. Shell Programming and Scripting
Hello,
I have a small question and i hope someone can help me, if i have 200 domains directories in my server under this directory
something like
now how i can copy one folder i have to this directories?
Thank You (5 Replies)
Discussion started by: GamGom
5 Replies
5. Shell Programming and Scripting
I have several directories and all those directories have .dat files in them. I want to copy all those .dat files to one directory say "collected_directory"
The problem is I don't want to overwrite files. So, if two file names match, I don't want the old file to be overwritten with a new one.
... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
6. Shell Programming and Scripting
my directory structure is like below:
basedir\
p.txt
q.htm
r.java
b\
abc.htm
xyz.java
c\
p.htm
q.java
rst.txt
my requirement is i want to copy all the files and directories... (0 Replies)
Discussion started by: ajayyadavmca
0 Replies
7. UNIX for Dummies Questions & Answers
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. Shell Programming and Scripting
Hi ,
I want a script to create a directories at different locations.
suppose i am on home/path/zone1. I want to create a directory of current month in this location.
Then i want to create the same current month directory in home/path/zone2.like this for 9 diffrent zones.
I can do this... (4 Replies)
Discussion started by: sv0081493
4 Replies
9. Shell Programming and Scripting
I'm trying to copy a file myfile.scr from my local Linux server to multiple folders on remote AiX server using single rsync command.
Below command helps me copy the file "myfile.scr" from my localhost to a remote host folder "/app/deployment/tmpfiles"
rsync --delay-updates -F --compress... (1 Reply)
Discussion started by: mohtashims
1 Replies
10. UNIX for Beginners Questions & Answers
Dear all
I have a multiple directories, say for example org1, org2, org3 ..... org100 and each directory having a file namely dnaG.fasta. I need to copy all the dnaG.fasta file from each directory and paste in another directory fastconcatg. Therefore, my script has to copy dnaG.fasta file from... (5 Replies)
Discussion started by: dineshkumarsrk
5 Replies
LEARN ABOUT LINUX
mod_security
mod_security(3erl) Erlang Module Definition mod_security(3erl)
NAME
mod_security - Security Audit and Trailing Functionality
DESCRIPTION
Security Audit and Trailing Functionality
EXPORTS
list_auth_users(Port) -> Users | []
list_auth_users(Address, Port) -> Users | []
list_auth_users(Port, Dir) -> Users | []
list_auth_users(Address, Port, Dir) -> Users | []
Types Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
Users = list() = [string()]
list_auth_users/1 , list_auth_users/2 and list_auth_users/3 returns a list of users that are currently authenticated. Authentica-
tions are stored for SecurityAuthTimeout seconds, and are then discarded.
list_blocked_users(Port) -> Users | []
list_blocked_users(Address, Port) -> Users | []
list_blocked_users(Port, Dir) -> Users | []
list_blocked_users(Address, Port, Dir) -> Users | []
Types Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
Users = list() = [string()]
list_blocked_users/1 , list_blocked_users/2 and list_blocked_users/3 returns a list of users that are currently blocked from access.
block_user(User, Port, Dir, Seconds) -> true | {error, Reason}
block_user(User, Address, Port, Dir, Seconds) -> true | {error, Reason}
Types User = string()
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
Seconds = integer() | infinity
Reason = no_such_directory
block_user/4 and block_user/5 blocks the user User from the directory Dir for a specified amount of time.
unblock_user(User, Port) -> true | {error, Reason}
unblock_user(User, Address, Port) -> true | {error, Reason}
unblock_user(User, Port, Dir) -> true | {error, Reason}
unblock_user(User, Address, Port, Dir) -> true | {error, Reason}
Types User = string()
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
Reason = term()
unblock_user/2 , unblock_user/3 and unblock_user/4 removes the user User from the list of blocked users for the Port (and Dir) spec-
ified.
THE SECURITYCALLBACKMODULE
The SecurityCallbackModule is a user written module that can receive events from the mod_security Erlang Webserver API module. This module
only exports the function(s), event/4,5 , which are described below.
EXPORTS
event(What, Port, Dir, Data) -> ignored
event(What, Address, Port, Dir, Data) -> ignored
Types What = atom()
Port = integer()
Address = {A,B,C,D} | string() <v>Dir = string()
Data = [Info]
Info = {Name, Value}
event/4 or event/4 is called whenever an event occurs in the mod_security Erlang Webserver API module ( event/4 is called if Address
is undefined and event/5 otherwise). The What argument specifies the type of event that has occurred, and should be one of the fol-
lowing reasons; auth_fail (a failed user authentication), user_block (a user is being blocked from access) or user_unblock (a user
is being removed from the block list).
Note:
Note that the user_unblock event is not triggered when a user is removed from the block list explicitly using the unblock_user function.
Ericsson AB inets 5.5.2 mod_security(3erl)