- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- help on writing a script to clear files in /var/sp...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2011 10:20 PM
тАО06-19-2011 10:20 PM
Please can you help me wrting a script to clear files in /var/spool/mqueue directories. The files are of the following type:
dfn3F6U3919153
tfn3F6U3919153
Tfp3BG0iH10642
qfp5HGUfb28340
This files are filling up /var
Fernando
Solved! Go to Solution.
- Tags:
- mqueue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2011 10:24 PM - last edited on тАО08-02-2011 06:30 AM by Kevin_Paul
тАО06-19-2011 10:24 PM - last edited on тАО08-02-2011 06:30 AM by Kevin_Paul
Re: help on writing a script to clear files in /var/spool/mqueue
See my reply to your previous thread:
http://h30499.www3.hp.com/t5/Messaging/Help-in-clearing-out-var-spool-mqueue/m-p/5276091#M5434
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2011 10:48 PM
тАО06-19-2011 10:48 PM
Re: help on writing a script to clear files in /var/spool/mqueue
Yes, you right,:
You should stop mail before running it:
/# sbin/init.d/sendmail stop
#!/usr/bin/ksh
# create file_list with:
# fgrep -l "yyyy xxxxxxx" > file_list
# find . -name "qf*" -exec fgrep -l "Returned mail: see transcript for details"
+ > file_list
# find . -name "qf*" -exec fgrep -l "Warning: could not send message for past 4
hours" + > file_list
for file in $( < file_list); do
base=${file#./[dq]}
base=${base#[dq]}
echo d$base q$base Q$base x$base
done | xargs -n1000 rm -f
BUT what I really dont understand is the "yyyy xxxxxxx" part, on the third line of your script.
Please can you explain
Fernando
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2011 10:55 PM
тАО06-19-2011 10:55 PM
SolutionI'm not sure any more, those were just some example comments. It's whatever you want to search for. Each of those lines are some examples that I used to clean up old messages and then the bounces and the re-bounces.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2011 10:58 PM
тАО06-19-2011 10:58 PM
Re: help on writing a script to clear files in /var/spool/mqueue
Ok, sorry if I did not understood at that moment, its clear now, I am going to do that. My apologises.
Fernando
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2011 11:18 PM - last edited on тАО08-02-2011 06:30 AM by Kevin_Paul
тАО06-19-2011 11:18 PM - last edited on тАО08-02-2011 06:30 AM by Kevin_Paul
Re: help on writing a script to clear files in /var/spool/mqueue
>it's clear now, I am going to do that.
If you are happy with the answers given, please read the following about how to assign points:
http://h30499.www3.hp.com/t5/help/faqpage/faq-category-id/kudos#kudos