Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Script to search and copy files Post 302671411 by bartus11 on Friday 13th of July 2012 12:07:55 PM
Old 07-13-2012
cp can be done in find's exec clause, also "cat" is not needed:
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
KUPFER(1)																 KUPFER(1)

NAME
kupfer - Convenient command and access tool for applications and documents SYNOPSIS
kupfer [ OPTIONS | FILE ... ] kupfer-exec FILE ... DESCRIPTION
Kupfer is an interface for quick and convenient access to applications and their documents. The most typical use is to find a specific application and launch it. We have tried to make Kupfer easy to extend with plugins so that this quick-access paradigm can be extended to many more objects than just applications. kupfer-exec is a helper script that can execute commands saved to file, but only by connecting to an already running instance of Kupfer. SPAWNING
Running kupfer on the command line (without options) will try to show the program it if already running. Kupfer can be invoked with a list of files kupfer FILE ... This can be used to select files given as command-line arguments in the program. Then you can invoke actions even on objects from a shell-based context. You may also pipe text to kupfer to pass it to a currently running instance of the program. OPTIONS
--no-splash Launch without presenting main interface --list-plugins Display a list of all installed plugins --debug Enable more verbose output that can help understanding the program's operation. --relay Is deprecated and will be started by the Multihead Support plugin when needed --exec-helper=HELPER Run plugin helper program, which should be the name of a module inside kupfer. The following are generic options --help Display usage information --version Display version information CONFIGURATION
Custom plugins are added to kupfer by installing them to the directory ~/.local/share/kupfer/plugins, or any kupfer/plugins directory in any of $XDG_DATA_DIRS. ENVIRONMENT VARIABLES
If KUPFER_NO_CUSTOM_PLUGINS is set, only allow loading built-in plugins (installed in the program's python package). If KUPFER_NO_CACHE is set, do not load from or write to any source cache files. AUTHOR
Ulrik Sverdrup <ulrik.sverdrup@gmail.com> 2011 KUPFER(1)
All times are GMT -4. The time now is 08:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy