Results 1 to 3 of 3
Hi folks,
I'm trying to wrap my head around a problem and was hoping that a brainiac out there could help me out.
I have a text file that contains ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-17-2013 #1Just Joined!
- Join Date
- Jan 2012
- Posts
- 7
Locate and copy list of files on local drive
Hi folks,
I'm trying to wrap my head around a problem and was hoping that a brainiac out there could help me out.
I have a text file that contains several hundred file names that look like this:
A002_C006_1119YZ.MOV
A003_C005_1119A1.MOV
A005_C004_1119SZ.MOV
I'm trying to work out how to run a "find" command for all of the files, and then copy them to a local drive. I know the individual commands but not how to string them all together.
Any help would be gratefully received!
Best,
Patski.
- 01-17-2013 #2Linux Newbie
- Join Date
- Nov 2012
- Posts
- 134
hi,
which passes one file at a time to shCode:find <optionS> -exec sh -c '<commandS> "$1"' _ {} \;
or
which passes every files at the same time to sh.Code:find <optionS> -exec sh -c '<commandS> "$@"' _ {} \+
_ is a dummy parameter because sh when used with -c, starts its positional parameters at $0, and $@ starts at $1.
- 01-17-2013 #3Just Joined!
- Join Date
- Jan 2012
- Posts
- 7
Thanks a lot for replying Watael - I'll give it a try!
Best
Patski


Reply With Quote
