Find all .htaccess files and make a backup copy in respective directories
Hey guys,
I need to know how to locate all .htaccess files on the server and make a backup of them in the folder they reside before I run a script to modify all of them.
So basically taking dir1/.htaccess and copying it as dir1/.htaccess_bk
dir2/.htaccess copying as dir2/.htaccess_bk
etc...
Can someone explain the proper cp usage for this example?
Much appreciated.
---------- Post updated at 01:01 PM ---------- Previous update was at 12:48 PM ----------
Nevermind,
I think I figured it out ---------- Post updated at 01:31 PM ---------- Previous update was at 01:01 PM ----------
Okay so that seemed to work as intended.
Now I'm curious... I have a copy of each original .htaccess file named .htaccess_bak sitting along side each original just incase my script to update them all doesnt work as planned and I need to revert to the backups..
How can I accomplish either copying the contents from the backup file to the original file, or renaming the backup files all the .htaccess to overwrite the originals?
Something like...
Can someone explain the proper syntax to accomplish something like this?
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)
I just wrote a tiny script with the help of ghostdog74 to search all my files for special content phrases.
After a few modifications I now made it work, but one problem is left. The files are located in public_html folder, so there might also be .htaccess files.
So I ignored scanning of that... (4 Replies)
how can i copy those files into other directories have the same name but different in the end
i have files in directory called test:
10_10_asdadfsdfad.txt
10_10_11_asdawqefwkjasd.txt
10_10_11_12_asdafjjhoqwd.txt
i want to put them in exist directory thart i have on my system
i have... (1 Reply)
Dear All,
I have a final output files as
736645|0|
13879|1|
495563|10|
127933|14|
4975|16|
49038|6|
53560|7|
135115|8|
178857|9|
Now I want to replace second column with respective tag as per the value (4 Replies)
Hi to all,
I have the short print out sample of the DOS command "dir S/" as showed below.
Directory of C:\Program Files\Winamp\Skins\Bento\window
02/12/2010 11:35 p.m. <DIR> .
02/12/2010 11:35 p.m. <DIR> ..
11/12/2009 10:31 a.m. 13,556... (3 Replies)
Hello,
Server A: /directory1/
Server B: /Backups/
i wanted to backup contents of /directory1 from "server A" on to "Server B" every 1 hour.
If there is any change in (only new/differences) contents on serverA (directory1/) supposed to be backeup on next run.
I did used rsync command to... (5 Replies)
Hi Guys,
I need to copy the files to respective directories based on name of the file. My script is something like below
con=$1
for file in `cat $con`
do
file_tmp=$(ls -t1 $path| grep -i $file | head -n 1)
echo $file_tmp
if
then
cp $path$file_tmp $DIR/ap
if
then... (16 Replies)
I am trying to copy only the date specific folders/directories using the following command. However, the following copy command is also copying files from the root folder (OriginalFolder).
find /OriginalFolder/ -type -d \{ -mtime 1 -o -mtime 2 \ } -exec cp -R {} /CopyTo/'hostname'__CopyTo/ \;... (2 Replies)
Discussion started by: apacheLinux
2 Replies
LEARN ABOUT DEBIAN
apache::soap
Apache::SOAP(3pm) User Contributed Perl Documentation Apache::SOAP(3pm)NAME
Apache::SOAP - mod_perl-based SOAP server with minimum configuration
SYNOPSIS
httpd.conf (Location), directory-based access
<Location /mod_soap>
SetHandler perl-script
PerlHandler Apache::SOAP
PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method"
PerlSetVar options "compress_threshold => 10000"
</Location>
httpd.conf (Files), file-based access
<FilesMatch ".soap$">
SetHandler perl-script
PerlHandler Apache::SOAP
PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method"
PerlSetVar options "compress_threshold => 10000"
</FilesMatch>
.htaccess, directory-based access
SetHandler perl-script
PerlHandler Apache::SOAP
PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method"
PerlSetVar options "compress_threshold => 10000"
DESCRIPTION
This Apache Perl module provides the ability to add support for SOAP (Simple Object Access Protocol) protocol with easy configuration
(either in .conf or in .htaccess file). This functionality should give you lightweight option for hosting SOAP services and greatly
simplify configuration aspects. This module inherites functionality from SOAP::Transport::HTTP::Apache component of SOAP::Lite module.
CONFIGURATION
The module can be placed in <Location>, <Directory>, <Files>, <FilesMatch> directives in main server configuration areas or directly in
.htaccess file.
All parameters should be quoted and can be separated with commas or spaces for lists ("a, b, c") and with 'wide arrows' and commas for hash
parameters ("key1 => value1, key2 => value2").
All options that you can find in SOAP::Transport::HTTP::Apache component are available for configuration. Here is the description of most
important ones.
dispatch_to (LIST)
Specifies path to directory that contains Perl modules you'd like to give access to, or just list of modules (for preloaded modules).
PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method"
options (HASH)
Specifies list of options for your module, for example threshold for compression. Future versions will support more options. See
SOAP::Transport::HTTP documentation for other options.
PerlSetVar options "compress_threshold => 10000"
METHODS /SUBROUTINES
server
my $server = Apache::XMLRPC::Lite->server();
Returns the server object.
Useful if you need to manipulate the server object from your code.
handle
Request handler. Called by apache.
DEPENDENCIES
SOAP::Lite
mod_perl
SEE ALSO
SOAP::Transport::HTTP::Apache for implementation details,
SOAP::Lite for general information, and
F<examples/server/mod_soap.htaccess> for .htaccess example
COPYRIGHT
Copyright (C) 2000-2001 Paul Kulchenko. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Paul Kulchenko (paulclinger@yahoo.com)
perl v5.12.4 2011-08-18 Apache::SOAP(3pm)