The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
exit status of command in a pipe line topcat8 UNIX for Dummies Questions & Answers 10 10-19-2007 01:39 AM
Pipe out ftp command to a file lweegp UNIX for Dummies Questions & Answers 2 10-10-2005 02:40 AM
pipe command zomboo UNIX for Dummies Questions & Answers 1 10-31-2004 02:04 PM
ret val of a command in a pipe which is NOT the last one latze Shell Programming and Scripting 5 11-01-2002 06:32 AM
How to pipe command anonymous.nico UNIX for Advanced & Expert Users 4 03-20-2002 11:06 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-08-2007
Registered User
 

Join Date: Mar 2007
Posts: 18
How can I use pipe command ?

Hi My friends

I have used this command to find files are modified within the past 24 hours

and then many files are shown but I want transfer all these files to special directory by using pipe .

can any one tell me what is the next step ?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-08-2007
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
xargs is the easiest way to handle this...
Code:
find_command_here | xargs -I{} mv {} /target/dir
Cheers
ZB
Reply With Quote
  #3 (permalink)  
Old 04-08-2007
Registered User
 

Join Date: Mar 2007
Posts: 18
so my command will be like this :
find_command_here | xargs -I{} mv {} [/target/dir] --->[is this my directory that will be transferred to it all that files]

and what is meant by -I{} and mv{}?

mv :to move files but mv{}

thanks
Reply With Quote
  #4 (permalink)  
Old 04-09-2007
Registered User
 

Join Date: Mar 2007
Posts: 18
thank you my friend

that command it is working finally after many trying but how can I let that command to work in specific time automatically?

thanks
Reply With Quote
  #5 (permalink)  
Old 04-09-2007
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,325
What do you mean by specific time? Does it mean that it has to run at a specific time of the day or something? To do any sort of scheduling on unix, you can use cron. Check the man pages of cron and crontab for details on how the job can be scheduled.
Reply With Quote
  #6 (permalink)  
Old 04-10-2007
Registered User
 

Join Date: Mar 2007
Posts: 18
yes that is my mean, how can I run that command in specific time ? let me try my brother

my regards
Reply With Quote
  #7 (permalink)  
Old 04-10-2007
Registered User
 

Join Date: Jun 2006
Location: Las Vegas, NV
Posts: 104
Put it in as a cron job.

http://www.scrounge.org/linux/cron.html
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:03 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0