LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-20-2010, 09:24 AM   #1
abdo_6110
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Rep: Reputation: 0
problem in shell


i want to used the output of search to copy in another destination

examlpe

fine /home/* mtime -1
i want to used the output of the find command to copy an another destination



thanx
 
Old 12-20-2010, 10:21 AM   #2
coexistance
Member
 
Registered: Dec 2010
Location: Earth planet
Distribution: Debian GNU/Linux 6 (Squeeze) - AMD64
Posts: 50

Rep: Reputation: 9
Hello!

And I just noticed I gave the instructions for other thing, sorry.
Follow what eantoranz and druuna posted, they are correct.

Either way, the "man find" command is still useful.
And sorry again.

Good luck and cheers!

Last edited by coexistance; 12-20-2010 at 07:37 PM.
 
Old 12-20-2010, 01:25 PM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
Perhaps you want something like:

Code:
find ./ blah blah (whatever your conditions could be) -exec cp {} /another/destination/ ';'

Last edited by eantoranz; 12-20-2010 at 01:30 PM. Reason: closing / at the end of the destionation... just in case
 
Old 12-20-2010, 01:37 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by eantoranz View Post
Perhaps you want something like:
Code:
find ./ blah blah (whatever your conditions could be) -exec cp {} /another/destination/ ';'
Shouldn't that be:
Code:
find ./ blah blah (whatever your conditions could be) -exec cp -r {} /another/destination/ \;
Otherwise subdirs won't be taken into account.

Last edited by druuna; 12-20-2010 at 01:38 PM. Reason: Spelling
 
Old 12-21-2010, 02:23 AM   #5
abdo_6110
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Original Poster
Rep: Reputation: 0
thanx all for your replay it try it and work succeufllyy


thanx again
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in shell afreitascs Slackware 17 05-20-2010 10:52 PM
problem with shell sumit1203 Linux - Newbie 3 02-17-2010 06:22 AM
shell problem ust Linux - Software 2 01-24-2008 05:47 AM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
shell problem vivek10 Linux - General 2 01-16-2003 09:36 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration