<span class="gmail_quote"><br></span>Hi All, <br><br>I want to know how to grep and delete (remove) files . <br><br>What I need is that there are some unwanted out going mails in the queue in my Centos 4.4 Sendmail Server. I can find them with the below commad.
<br><br> mailq /var/spool/mqueue/ |grep '<>'
<br><br>Then It displays all the mails of that type withg their ids in the following way. <br><br>[root@gateway ~]# mailq /var/spool/mqueue/ |grep '<>' <br>kA63ZwJT007450 13864 Mon Nov 6 09:05 <><br>kA63LqO3004442 4110 Mon Nov 6 08:51 <>
<br>kA63V7Tn006327 16913 Mon Nov 6 09:01 <><br>kA62vH4t031111 13880 Mon Nov 6 08:27 <><br>kA62r6WW030077 13975 Mon Nov 6 08:23 <><br>kA63BxYQ002455 16443 Mon Nov 6 08:41 <><br>kA62MW0w023058 13536 Mon Nov 6 07:52 <>
<br>kA62jQah028236 13625 Mon Nov 6 08:15 <><br>kA62gLTw027445* 13710 Mon Nov 6 08:12 <><br>kA62JXwd022569 13849 Mon Nov 6 07:49 <><br>kA62idkg028035 13949 Mon Nov 6 08:14 <><br>kA62PEHX023554* 14152 Mon Nov 6 07:55 <>
<br>kA62W7Dd024920 14203 Mon Nov 6 08:02 <><br>kA62TtJn024569 14245 Mon Nov 6 07:59 <><br>kA62TU2j024446 14262 Mon Nov 6 07:59 <><br>kA62ZL0E025726 15878 Mon Nov 6 08:05 <><br>kA62MW6J023059 17106 Mon Nov 6 07:52 <>
<br>kA6266rV019846 13678 Mon Nov 6 07:36 <><br>kA62FXCd021741 13693 Mon Nov 6 07:45 <><br>kA626v5u020008 13718 Mon Nov 6 07:36 <><br>kA62X36L025101 13873 Mon Nov 6 08:03 <><br>kA62Xd6u025234 13901 Mon Nov 6 08:03 <>
<br>kA62RMT8023973 14008 Mon Nov 6 07:57 <><br>kA62Ufi6024703 14014 Mon Nov 6 08:00 <><br>kA62JxSm022664 14044 Mon Nov 6 07:49 <><br>kA62Q0Sd023738 14057 Mon Nov 6 07:56 <><br>kA62VgKI024882 14116 Mon Nov 6 08:01 <>
<br>kA62QmtQ023890 14129 Mon Nov 6 07:56 <><br>kA623NxG019271 13740 Mon Nov 6 07:33 <><br>kA620tLk018801 14004 Mon Nov 6 07:30 <><br>kA61q1PS017035 14094 Mon Nov 6 07:22 <><br>kA6215S7018835 14154 Mon Nov 6 07:31 <>
<br>kA61kYX8015811 13536 Mon Nov 6 07:16 <><br>kA61c63T014124 13811 Mon Nov 6 07:08 <><br>kA61WhXL013089 10232 Mon Nov 6 07:02 <><br><br><br>Now I want to know how to remove them. <br><br>Then I can set up a crontab to do it evey 5 minutues.
<br><br>Any help .. pls<br><br><br><br><br>
-- <br>Thank you<br><span>Indunil Jayasooriya<br>
</span><br clear="all"><br>-- <br>Thank you<br>Indunil Jayasooriya<br>