Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Script to search and copy files Post 302671425 by bartus11 on Friday 13th of July 2012 12:22:23 PM
Old 07-13-2012
Nope. For that to work use this:
Code:
while read FILE; do
  find / -name "$FILE.*" -type f -exec cp {} /path/directory/ \;
done < gold.txt

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

search files and copy them to a directory with datestamp attached to it

Hi I need to search the some ftp files created in last 24 hours and copy them to a directory with date stamp attached to it. Iam using following command to search the files find $CA_OUT_PATH/*/ftp_out -type f -mtime -1 but now how to copy these files to some other directory one by one with... (1 Reply)
Discussion started by: sreenusola
1 Replies

2. Shell Programming and Scripting

search files and copy them to a directory with datestamp attacched to it

Hi I need to search the some ftp files created in last 24 hours and copy them to a directory with date stamp attached to it. Iam using following command to search the files find $CA_OUT_PATH/*/ftp_out -type f -mtime -1 but now how to copy these files to some other directory one by one ... (1 Reply)
Discussion started by: sreenusola
1 Replies

3. 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

4. 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

5. Shell Programming and Scripting

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... (6 Replies)
Discussion started by: rrb2009
6 Replies

6. 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

7. Shell Programming and Scripting

Copy Files with script

Hello, I have written a script to copy files from one partion to another. Not sure if this is correct. #!/bin/sh CDR_SOURCE=/storage/archive/logmgmt/result/billing/ CDR_DEST=/storage4/archive/logmgmt/result/billing/ cp $CDR_SOURCE $CDR_DEST; exit 0 The CDR_SOURCE folder has... (5 Replies)
Discussion started by: Siddheshk
5 Replies

8. 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

9. Shell Programming and Scripting

Find and copy files based on todays date and search for a particular string

Hi All, I am new to shell srcipting. Problem : I need to write a script which copy the log files from /prod/logs directory based on todays date like (Jul 17) and place it to /home/hzjnr0 directory and then search the copied logfiles for the string "@ending successfully on Thu Jul 17". If... (2 Replies)
Discussion started by: mail.chiranjit
2 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
APPLE_DUMP(1)							   Netatalk 2.2 						     APPLE_DUMP(1)

NAME
apple_dump - Dump AppleSingle/AppleDouble format file SYNOPSIS
apple_dump [-a] FILE | DIR apple_dump -f FILE apple_dump -d FILE apple_dump -h | -help | --help apple_dump -v | -version | --version DESCRIPTION
apple_dump dump AppleSingle/AppleDouble format file. OPTIONS
-a FILE|DIR This is default. Dump a AppleSingle/AppleDouble file for FILE or DIR automatically. Extrapolate FinderInfo type from absolute path. If FILE is not AppleSingle/AppleDouble format, look for .AppleDouble/FILE and ._FILE. If DIR, look for DIR/.AppleDouble/.Parent and ._DIR. -f FILE Dump FILE. Assume FinderInfo to be FileInfo. -d FILE Dump FILE. Assume FinderInfo to be DirInfo. -h, -help, --help Display the help and exit -v, -version, --version Show version and exit NOTE
There is no way to detect whether FinderInfo is FileInfo or DirInfo. By default, apple_dump examins whether file or directory, a parent directory is .AppleDouble, filename is ._*, filename is .Parent, and so on. If setting option -f or -d, assume FinderInfo and doesn't look for another file. SEE ALSO
ad(1) Netatalk 2.2 02 Sep 2011 APPLE_DUMP(1)
All times are GMT -4. The time now is 01:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy