niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » Unix internals
search and move
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
arunkumar610@gmail.com
*nix forums beginner


Joined: 02 Mar 2006
Posts: 2

PostPosted: Thu Mar 02, 2006 6:07 am    Post subject: search and move Reply with quote

How can i pass the the output of find command as sorce argument for mv
command ?

The scenario is i have to move some files which have modified 100
days before from current directory to /tmp directory.

When i execute the below command, it displayes the expected file.
find ./ -name "*_AUDIT*.Z" -mtime +100 -print

But how can i pass the output to mv command? Please help me to execute
the below uncompleted command.
find ./ -name "*_AUDIT*.Z" -mtime +100 -print | xargs mv <what should
be the source?> /tmp
Back to top
Frank Cusack
*nix forums Guru Wannabe


Joined: 02 Mar 2005
Posts: 215

PostPosted: Thu Mar 02, 2006 6:51 am    Post subject: Re: search and move Reply with quote

On 1 Mar 2006 22:07:29 -0800 "arunkumar610@gmail.com" <arunkumar610@gmail.com> wrote:
Quote:
How can i pass the the output of find command as sorce argument for mv
command ?

The scenario is i have to move some files which have modified 100
days before from current directory to /tmp directory.

When i execute the below command, it displayes the expected file.
find ./ -name "*_AUDIT*.Z" -mtime +100 -print

But how can i pass the output to mv command? Please help me to execute
the below uncompleted command.
find ./ -name "*_AUDIT*.Z" -mtime +100 -print | xargs mv <what should
be the source?> /tmp

See xargs(1)
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Wed Dec 03, 2008 1:54 am | All times are GMT
navigation Forum index » Programming » Unix internals
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Best method to search kristy420 Oracle 0 Tue Nov 18, 2008 6:34 pm
No new posts Move Oracle 10g database to another location Selt Server 0 Fri Jul 21, 2006 2:14 pm
No new posts Bug#379104: ITP: complearn-mpi -- parallel quartet tree s... Rudi Cilibrasi devel 0 Fri Jul 21, 2006 11:30 am
No new posts IMAP4 search with special characters Luis Corrales python 0 Fri Jul 21, 2006 7:51 am
No new posts Array and Search function cdf PHP 2 Thu Jul 20, 2006 12:01 pm

Per Insurance | Mortgage | Buy PSP | Credit Check | Credit Cards UK
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1546s ][ Queries: 16 (0.0837s) ][ GZIP on - Debug on ]