Unix/Linux Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Help with find and copy

UNIX for Dummies Questions & Answers


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 05-07-2013
vikatakavi vikatakavi is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 14 October 2014, 9:57 AM EDT
Posts: 50
Thanks: 25
Thanked 1 Time in 1 Post
Wrench 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


Code:
SOURCE=/path/to/files/
A= find $SOURCE/* -type f -mtime -1
hadoop fs -copyFromLocal $A /user/path/

can any one tweek the above code
Sponsored Links
    #2  
Old Unix and Linux 05-07-2013
hanson44 hanson44 is offline
Registered User
 
Join Date: Mar 2013
Last Activity: 12 May 2013, 11:33 PM EDT
Posts: 858
Thanks: 18
Thanked 181 Times in 178 Posts
I'm not sure what the hadoop command is doing. Anyway, maybe this might work:

Code:
SOURCE=/path/to/files/
find "$SOURCE" -type f -mtime -1 -exec cp -v "{}" /usr/path/ \;

The Following User Says Thank You to hanson44 For This Useful Post:
vikatakavi (05-08-2013)
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find and copy lol100 Shell Programming and Scripting 1 10-12-2010 06:53 AM
How to find files and then copy them to another piespluto Shell Programming and Scripting 4 11-22-2009 03:43 AM
Help with Find All/Copy Script jlfx Shell Programming and Scripting 2 08-31-2008 11:48 AM
need to help to find and copy to a file pujars1 UNIX for Dummies Questions & Answers 2 07-12-2007 09:56 AM
HOw to find and copy aaajohnson UNIX for Dummies Questions & Answers 1 05-18-2006 01:41 PM



All times are GMT -4. The time now is 06:59 AM.