Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Using above command , I delete all the files belong to group abc.
Now the problem i face is that the this command gives error that some files are missing . And this error occur because after creating list of files, it pass that list to rm -rf but till that time sendmail process queue and some of files disapper from /var/spool/mqueue.
Any suggestion to avoid this error message please ..
I had to look it up since I don't use sendmail, Postfix has the postuser command that takes care of things like you want to do. I think the best way to go is to stop the sendmail daemon first, clean up the queue and start the sendmail daemon again.
You are of course entitled to have a different opinion. I only pointed you to the fact that you are using find to delete specific messages from the sendmail queue and that there are alternatives. I even told you that most likely if you stop the sendmail daemon before beginning the cleanup operation you'll not encounter that error. The find command passes the hits one after another to the rm command so it's not surprising that you encounter errors when running that on a mail queue that's active.
If you know how to clean up the sendmail queue then why are you insisting on using find to delete files from it when the daemon is active?
This is obvious thing that you are asking, while daemon is running then you are trying to execute this command then you'll see that kind of errors and its a obvious behaviour.
As per your questing, I feel that you don't want to see errors you only want to see success output right ? IF that so try following command :-
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.