Sponsored Content
Full Discussion: Search and Copy Script
Top Forums Shell Programming and Scripting Search and Copy Script Post 302480004 by rrb2009 on Monday 13th of December 2010 05:38:22 PM
Old 12-13-2010
Search and Copy Script

Dear All,

I would like to create a Unix script which basically searches for files which are more than 2 days old and copy only the new files to the destination. What i mean is if the destination may have most of the files, it may not have only last 2 to 3 days file.

I am able to create the script which basically search and copy which are older than 2 days but how would i check if the destination has any of the files and how would i skip them? Also is there any other better command i can use other than "cp"?

Thanks,

RR
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Shell script to search for text in a file and copy file

Compete noob question.... I need a script to search through a directory and find files containing text string abcde1234 for example and then copy that file with that text string to another directory help please :eek: (9 Replies)
Discussion started by: imeadows
9 Replies

2. Shell Programming and Scripting

Perl script to search a line and copy it to another line

Hi I have a log file (say log.txt). I have to search for a line which has the string ( say ERROR) in the log file and copy 15 lines after this into another file (say error.txt). Can someone give me the code and this has to be in PERL Thanks in advance Ammu (3 Replies)
Discussion started by: ammu
3 Replies

3. Shell Programming and Scripting

Search and copy to a new file-Help

Hi All, server16.na.in.com UNKNOWN ftpuser "CWD" dms-imrm/Delasco_Invoices_DayForward_Scan" 250 - server16.na.in.com UNKNOWN ftpuser "PWD" 257 - server16.na.in.com UNKNOWN ftpuser "CWD Private" 250 - server16.na.in.com UNKNOWN ftpuser "PWD" 257 - server16.na.in.com UNKNOWN... (7 Replies)
Discussion started by: Tuxidow
7 Replies

4. Shell Programming and Scripting

Search, copy and paste

Can i search in a file for more than one string at a time? And copy the next string after that and paste it in column style? Is it possible? Thanks! (4 Replies)
Discussion started by: kingpeejay
4 Replies

5. Shell Programming and Scripting

shell script to search and copy files

Hello Im new to this forums, I would like some help regarding a script that I need in order to copy some files. Heres the scenario: I need to search several files which have a particular code inside, lets say "test" all of them on different directories. I need to copy all of them on a new... (4 Replies)
Discussion started by: c.watson
4 Replies

6. Shell Programming and Scripting

Shell Script to Search for a particular String and copy the timestamp to a variable

Hi, We Perfrom Loads to the database through a Perl script which generates a statistics file. I need to read the statistics. the Statistics file looks something like below: Process Beginning - 08-26-2010-23.41.47 DB2 CONNECTION SUCCESSFUL! Ready to process and load file: FILENAME # of... (2 Replies)
Discussion started by: Praveenkulkarni
2 Replies

7. Shell Programming and Scripting

sed help - search/copy from one file and search/paste to another

I am a newbie and would like some help with the following - Trying to search fileA for a string similar to - AS11000022010 30.4 31.7 43.7 53.8 60.5 71.1 75.2 74.7 66.9 56.6 42.7 32.5 53.3 I then want to replace that string with a string from fileB - ... (5 Replies)
Discussion started by: ncwxpanther
5 Replies

8. Shell Programming and Scripting

recursive search and copy

Hello again. Well, I need help again sooner as I thought. Now I want to search for files with a known name within all subdirs, and copy the to differently named files in the same directory. For example if I had only one file to copy, I would just usecp fileName newFileNamebut to do this... (1 Reply)
Discussion started by: cabaciucia
1 Replies

9. UNIX for Dummies Questions & Answers

Script to search and copy files

HI everyone, I been to this site before for help and found my answers on other threads now I am posting my own :). I have a list of file names with out extensions on an txt file. I need a way for the script to search on the server for each file name and copy the files over to a new directory.... (12 Replies)
Discussion started by: sergiol
12 Replies

10. Shell Programming and Scripting

Search and Copy Files

Hi All Need your help, I am looking for a script to search for files with specific extension as .log and then copy the latest one to a different folder. Here is the scenario /dev/abc/xyz/a_2_122920131.log /dev/abc/xyz/a_2_123020131.log /dev/abc/xyz/b_2_12302013.log... (2 Replies)
Discussion started by: jimmun
2 Replies
uuto(1) 						      General Commands Manual							   uuto(1)

NAME
uuto, uupick - public UNIX system to UNIX system file copy SYNOPSIS
[options] source-files destination system] DESCRIPTION
sends source-files to destination. uses the facility to send files (see uucp(1)), while allowing the local system to control the file access. A source-file name is a path name on your machine. Destination has the form: where system is taken from a list of system names that knows about (see in uucp(1) manual entry). user is the login name of someone on the specified system. recognizes the following options: Copy the source file into the spool directory immediately, and send the copy. Send mail to the requester when the copy is complete. The files (or sub-trees if directories are specified) are sent to PUBDIR on system, where PUBDIR is the UUCP public directory Specifically the files are sent to PUBDIR The recipient is notified by electronic mail when the files arrive. accepts or rejects the files transmitted to the recipient. Specifically, searches PUBDIR for files destined for the user. For each entry (file or directory) found, the following message is printed on the standard output: file-name] dirname] then reads a line from the standard input to determine the disposition of the file: <new-line> Go on to next entry. Delete the entry. Move the entry to named directory dir (current directory is default). Note that, if the current working directory is desired for dir, do specify any parameter with A construction such as is erroneous, and results in loss of data. Same as except move all the files sent from system. Print the contents of the file. Stop. EOT (control-D) Same as Escape to the shell to execute command. Print a command summary. invoked with the option searches only the PUBDIR for files sent from system. WARNINGS
To send files that begin with a dot (such as the filename must contain a corresponding dot. For example: and are correct, whereas and are incorrect. FILES
PUBDIR public directory SEE ALSO
mail(1), uuclean(1M), uucp(1), uustat(1), uux(1). Tim O'Reilly and Grace Todino, O'Reilly & Associates, Inc. USA. Grace Todino and Dale Dougherty, O'Reilly & Associates, Inc. USA. STANDARDS CONFORMANCE
uuto(1)
All times are GMT -4. The time now is 10:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy