- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /var/mail/root file is very big in size
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
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
тАО08-15-2007 04:15 PM
тАО08-15-2007 04:15 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 04:22 PM
тАО08-15-2007 04:22 PM
Re: /var/mail/root file is very big in size
Hi,
Just issue the following command to empty the file.
# > filename
or
# cat /dev/null > filename
Thanks.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 04:35 PM
тАО08-15-2007 04:35 PM
Re: /var/mail/root file is very big in size
whether the command should be like this?
cat /dev/null/root > root.old
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 04:40 PM
тАО08-15-2007 04:40 PM
SolutionCould you explain your requirement clearly?
For example, if you want to empty the file /tmp/test.txt use the below command.
# > /tmp/test.txt
or
# cat /dev/null > /tmp/test.txt
Both the above commands will erase the content of the file /tmp/test.txt and make the file size to 0 bytes.
If you want to rename or move to other location, then you may use "cp" or "mv".
Thanks
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 04:46 PM
тАО08-15-2007 04:46 PM
Re: /var/mail/root file is very big in size
Hi Deepu,
Please keep this document handy.
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=emr_na-c00904662-7
Hope this help.
WK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 05:07 PM
тАО08-15-2007 05:07 PM
Re: /var/mail/root file is very big in size
# mailx
h $
d *
q
If you don't want to change anything, use "x" to exit.
h $: to go to the end, use a message number.
z: to go to next page.
d *: to delete all
d n - m: to delete a range
Using from(1) would give who sent them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 05:14 PM
тАО08-15-2007 05:14 PM
Re: /var/mail/root file is very big in size
I want to keep the /var/mail/root file into another file and make it emptied. I don't want to lose the contents of the file at least for now. At the same time I want to make it zero in size.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 05:24 PM
тАО08-15-2007 05:24 PM
Re: /var/mail/root file is very big in size
Then as Ganesan suggested, you use cp:
# cp /var/mail/root /var/mail/root.old
# > /var/mail/root
You can use "mailx -u root.old" to read.
Or you can cat the file onto the end of a Netscape mail folder and then you can sort out all of the "junk" mail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 05:53 PM
тАО08-15-2007 05:53 PM
Re: /var/mail/root file is very big in size
check for the reason , why root's mail-inbox is getting very big in size. we were facing the same probs in one server. and we were able to found error in on shell script which is scheduld in cron. this bad entry was making tha mail-inbox in very big size.
So you can look in to this area also
Regards
Prasanrth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2007 07:52 AM
тАО08-17-2007 07:52 AM
Re: /var/mail/root file is very big in size
Copy your original file then make it blank
At first
cp /var/mail/root /var/mail/root.backup
then
cat /dev/null > /var/mail/root
Thanks & Regards
A. Aashique
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2007 05:01 PM
тАО08-17-2007 05:01 PM
Re: /var/mail/root file is very big in size
I did exactly like that. First I copied to a new file and then made it null.
Thanks to all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2007 05:03 PM
тАО08-17-2007 05:03 PM
Re: /var/mail/root file is very big in size
Please assign point to close the case.
have a nice weekend
WC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2007 05:03 PM
тАО08-17-2007 05:03 PM