Sponsored Content
Full Discussion: Find and copy
Top Forums Shell Programming and Scripting Find and copy Post 302461735 by lol100 on Tuesday 12th of October 2010 06:16:24 AM
Old 10-12-2010
Find and copy

> Advice please as much as possible to fill in large file in various folder to the server
> Folder structure
/www/1.org/htdocs
/www/2.org/htdocs
/www/3.org/htdocs
> Can tell me there is a way to fill in large file into htdocs, and then climb
> In each Diru and load for a long time. Thank you
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

HOw to find and copy

Hi, I need to find files in a directory, between dates like 4/15/06 and 5/02/06, and copy them to a different directory. Is there a way to doa find and a copy together? Thanks, Neil (1 Reply)
Discussion started by: aaajohnson
1 Replies

2. UNIX for Dummies Questions & Answers

need to help to find and copy to a file

I am trying to search for files and copy them into a text file. Can anybody help me how to do that. find /test/sds/data -name "*.*" -mtime -365 -exec ls -altr {} \ this is my find command and want to copy the result to a file. (2 Replies)
Discussion started by: pujars1
2 Replies

3. Shell Programming and Scripting

Help with Find All/Copy Script

Hi Gang, I am an old unix user and just recently returned in the flavor of a Mac. I have tons of pictures in the .orf format and would like to write a script to: Search the Hard drives for that file type Then, depending on date, copy it to a specific folder If there is an exact... (2 Replies)
Discussion started by: jlfx
2 Replies

4. UNIX for Dummies Questions & Answers

How to find and copy files from one directory to another

Ok i have three directories Destination - /u/dir1 (has subdirectories dir2 which also has subdirectory dir3) Source1 - /u/test/files/dir1/dir2/dir3 Source2 - /u/out/images/dir1/dir2/dir3 What i would like to do is copy everything from Source1 and Source2 into the Destination directory.... (3 Replies)
Discussion started by: ziggy25
3 Replies

5. Shell Programming and Scripting

How to find files and then copy them to another

I must write any shell script. I want find files which have .txt extension and then copy them to other, whithout this extension, for example: I found linux.out.txt file, and now it must be copy to new, linux.out. So: linux.out.txt -> linux.out ubuntu.config.txt -> ubuntu.config ... (4 Replies)
Discussion started by: piespluto
4 Replies

6. Shell Programming and Scripting

Help with find and copy command

I entered the following command find . -type f \( -newer startdate -a ! -newer enddate \) -exec cp tmp {} \; I got the following error: cp: 0653-436 tmp is a directory. Specify -r or -R to copy. What's happening here? (2 Replies)
Discussion started by: bbbngowc
2 Replies

7. Shell Programming and Scripting

Find and copy these files to particular directory

RedHat Enterprise Linux 5.4 I have some files with the extension .cdp in several directories in various mountpoints(filesystems) . I would like to find and copy all these files into a single directory /u03/diagnore/data. How can I do this ? (3 Replies)
Discussion started by: kraljic
3 Replies

8. UNIX for Dummies Questions & Answers

Help with find and copy

Hi , As i am a dummy in shell scripting ,i was trying to find the files which are created today and hold them in variable and the copy them to a location using a partcular command this is what did. can any one help.There may be many files under the path SOURCE=/path/to/files/ A= find... (1 Reply)
Discussion started by: vikatakavi
1 Replies

9. Shell Programming and Scripting

Ls to find to copy

I am looking to do the following: In a folder with multiple files in it, take the listing (ls) and search another directory for there file names, then take that output and copy the files out. This is to update a webpage. So a dev writes a new file and puts it in an update folder then i copy... (7 Replies)
Discussion started by: darbs121
7 Replies

10. Shell Programming and Scripting

Find and Copy Directories ONLY

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
SVN::Notify::Mirror(3pm)				User Contributed Perl Documentation				  SVN::Notify::Mirror(3pm)

NAME
SVN::Notify::Mirror - Keep a mirrored working copy of a repository path SYNOPSIS
Use svnnotify in post-commit: svnnotify --repos-path "$1" --revision "$2" --handler Mirror --to "/path/to/www/htdocs" [--svn-binary /full/path/to/svn] [--tag-regex "regex"] [--minimal] or better yet, use SVN::Notify::Config for a more sophisticated setup: #!/usr/bin/perl -MSVN::Notify::Config=$0 --- #YAML:1.0 '': PATH: "/usr/bin:/usr/local/bin" 'path/in/repository': handler: Mirror minimal: 1 to: "/path/to/www/htdocs" 'some/other/path/in/repository': handler: Mirror to: "/path/to/remote/www/htdocs" 'some/project/tags': handler: Mirror to: "/path/to/another/dir" tag-regex: "TRUNK-" DESCRIPTION
Keep a directory in sync with a portion of a Subversion repository. Typically used to keep a development web server in sync with the changes made to the repository. This directory can either be on the same box as the repository itself, or it can be remote (via SSH connection). USAGE
Depending on whether the target is a "Local Mirror" or a Remote Mirror, there are different options available. All options are available either as a commandline option to svnnotify or as a hash key in SVN::Notify::Config (see their respective documentation for more details). Common Options In addition to all of the options available to svnnotify, there is a single global option that affects both "Local Mirror" and Remote Mirror targets: minimal If the "--minimal" flag is passed on the commandline (or a hash entry created in a config file), then the update will occur at the shortest common path of all files/dirs that are changed for that revision. For example, using the example config file above, the following changes occured in rev 23: Changed paths: M path/in/repository/subdir/subdir2/file.1 A path/in/repository/subdir/file.2 M path/in/repository/subdir/subdir3/file.3 and the checked-out mirror was in "/path/to/www/htdocs", then the update would be executed in the "/path/to/www/htdocs/subdir" directory. This is the shorted common path of the updated files. NOTE: when using the SVN::Notify::Config mode, the matching path (in the above example "path/in/repository") is stripped off of the shortest common path prior to appending that to the destination path (the "to:" key). It is assumed that a matching key is the "root" of the working copy. Working Copy on Mirror Because 'svn export' is not able to be consistently updated, the sync'd directory must be a full working copy, and if you are running Apache, you should add lines like the following to your Apache configuration file: # Disallow browsing of Subversion working copy # administrative directories. <DirectoryMatch "^/.*/.svn/"> Order deny,allow Deny from all </DirectoryMatch> The files in the working copy must be writeable (preferrably owned) by the user identity executing the hook script (this is the user identity that is running Apache or svnserve respectively). Local Mirror Used for directories local to the repository itself (NFS or other network mounted drives count). The only required options are: o handler = Mirror Specifies that this module is called to process the Notify event. o to = /path/to/working/copy Specified which directory should be updated. Remote Mirror Used for mirrors on some other box, e.g. a web server in a DMZ network. See SVN::Notify::Mirror::SSH or SVN::Notify::Mirror::Rsync for more details. All "ssh-*" options are now deprecated in the base class and support for them will be removed in the next major release. Please update your configurations (see SVN::Notify::Mirror::SSH for details). Methods of Mirroring There are two schemes to keep a directory synced to a path in the repository: 1. Update a checked out working copy This is the normal mode of operation and is commonly used to keep a test web server in sync with the repository on every commit. 2. Switch a working copy to a new tag This is the preferred method when you want to keep a production web server up to date with only specific revisions, through the use of smart tagging. For the latter case, SVN::Notify::Mirror can be configured to monitor a path in the repository and only trigger an update when the path matches a specific regular expression, and do so by switching the mirrored path to the new tag. o tag-regex This optional parameter works with any "Local Mirror" or "Remote Mirror", using any of the applicable transfer methods (currently local, SSH, or Rsync). The "--tag-regex" parameter takes a string which will be interpreted as a conventional Perl regex, and only those repository paths which match the regex will be updated. The regex also determines what the mirrored directory will be switched to. For example, using a SVN::Notify::Config file (which is the most useful way to employ this option): #!/usr/bin/perl -MSVN::Notify::Config=$0 --- #YAML:1.0 '': PATH: "/usr/bin:/usr/local/bin" 'project1/trunk': handler: Mirror to: "/path/to/test/htdocs" 'project1/tags': handler: Mirror to: "/path/to/production/htdocs" tag-regex: "TRUNK-" This would have the effect of keeping the path "/path/to/test/htdocs" in sync on every commit, but "/path/to/production/htdocs" would be switched only when a tag was created in "project1/tags" that matched the string "TRUNK-". NOTE: this is not a sophisticated regex; in particular you should not employ anchors, since the URL is not split into repos-root and path segments before testing. To initialize the switch directory, you must perform an initial checkout like this: $ svn checkout file://$REPOS/project1/tags/TRUNK-0_0_1 where "TRUNK-0_0_1" is the name of any path in the ".../tags/" folder. PREREQUISITES (Optional and otherwise) The only mandatory prerequisite is SVN::Notify (obviously), but the presence of several other modules will enable other features: SVN::Notify::Config Permits a YAML config file to be used as the entire postcommit script, like the second example in the SYNOPSIS above. Net::SSH Required to use SSH to update a remote working copy. See SVN::Notify::Mirror::SSH for usage of that transport method. File::Rsync Required to use rsync to update a remote working copy See SVN::Notify::Mirror::RSync for usage of that transport method.. If you install any of these modules after installing SVN::Notify::Mirror, those features will be available immediately (though you can rerun the install in order to see the tests). AUTHOR
John Peacock <jpeacock@cpan.org> COPYRIGHT
Copyright (c) 2005-2008 John Peacock This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. SEE ALSO
SVN::Notify, SVN::Notify::Config POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 275: You forgot a '=back' before '=head2' perl v5.14.2 2012-07-04 SVN::Notify::Mirror(3pm)
All times are GMT -4. The time now is 05:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy