The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to move files monicasgupta Shell Programming and Scripting 1 03-14-2008 12:53 PM
How to move all files except one? Kim Walisch Shell Programming and Scripting 4 11-02-2007 01:00 PM
move files uniksbro UNIX for Advanced & Expert Users 4 07-31-2007 08:42 AM
move files ust Shell Programming and Scripting 5 07-03-2005 11:41 PM
move files mta UNIX for Dummies Questions & Answers 2 01-16-2004 09:22 PM

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

Join Date: Dec 2007
Posts: 5
Stumble this Post!
sendmail: move files from one to anther queue

hello, wondering if someone can help me with this.

i have a backed up sendmail queue directory which has some legitimate mail files still in it. i have searched and sorted it and have a text file listing of the exact q* and d* file pairs that contain the legitimate mails. its a text file with a few thousand messages.

i need to move those files from the old mail queue folder structure and into the active mail queue structure.

for example. i have a text file listing of files that are interspersed between folders.

/..../old-mqueue/qd1
/..../old-mqueue/qd2
/..../old-mqueue/qd3
/..../old-mqueue/qd4

i am trying to moved them all into directory
/..../old-mqueue/qd5

I am trying to pipe the output of
Code:
grep . file-list.txt
If anyone can give some tips.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-18-2007
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 709
Stumble this Post!
Post

Assuming I've understood what you want correctly:
while read filename ; do mv $filename /..../old-mqueue/qd5 ; done < file-list.txt
Reply With Quote
  #3 (permalink)  
Old 12-18-2007
Registered User
 

Join Date: Dec 2007
Posts: 5
Stumble this Post!
thank you. i will try that.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:27 AM.


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

Content Relevant URLs by vBSEO 3.2.0