- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: can't delete file
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-11-2005 08:24 AM
тАО08-11-2005 08:24 AM
I need to delete that file but get an error that the file doesn't exists yet syslogd keeps appending to the file. I really need to delete that file as it is growing and eventually will fill up the file system.
I thought of running fsck -F vxfs -m /dev/rdsk/c0t0d0s0 but are not sure if the -m option will be usefull on a mounted file system.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 08:26 AM
тАО08-11-2005 08:26 AM
Re: can't delete file
fuser -u "./file"
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 08:28 AM
тАО08-11-2005 08:28 AM
Re: can't delete file
Instead try this;
# cd /var/adm/syslog
# > mail.log
The mail.log file is a log file for the open process of sendmail. Do a rm on this file and you will not get the inodes.
You can >mail.log or do 'cat /dev/null > mail.log' Both do the same thing
Can't find it? What is in the /var/adm/syslog directory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 08:29 AM
тАО08-11-2005 08:29 AM
Re: can't delete file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 08:29 AM
тАО08-11-2005 08:29 AM
Re: can't delete file
# > /var/adm/syslog/mail.log
cheers!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 08:30 AM
тАО08-11-2005 08:30 AM
Re: can't delete file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 08:32 AM
тАО08-11-2005 08:32 AM
Re: can't delete file
get lsof : http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.75/
use "ls -l" and then "lsof" like this (You had a typo of /vav when I think you meant /var):
[root@vpart1 /var/appl]# ls -l /var/adm/syslog/mail.log
-r--r--r-- 1 root root 3907409 Aug 1 16:57 /var/adm/syslog/mail.log
[root@vpart1 /var/appl]# lsof /var/adm/syslog/mail.log
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
syslogd 809 root 9u REG 64,0x8 3907409 10494 /var/adm/syslog/mail.log
[root@vpart1 /var/appl]#
and DO NOT DELETE IT, simply truncate it:
cat /dev/null > /var/adm/syslog/mail.log
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 08:36 AM
тАО08-11-2005 08:36 AM
Re: can't delete file
I tried doing an fuser -fu /var/adm/syslog/mail.log but get an error that the file doesn't exist so I can't really tell who besides syslogd is using that file.
I tried stoping syslogd and delete the file but no luck. I'm thinking this either a bug or inode corruption.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 08:40 AM
тАО08-11-2005 08:40 AM
Re: can't delete file
Routine Tasks
System Log Files
Select /var/adm/syslog/mail.log
then from the "Actions" menu, select "Trim->Trim to Zero"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 08:42 AM
тАО08-11-2005 08:42 AM
Re: can't delete file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 08:44 AM
тАО08-11-2005 08:44 AM
Re: can't delete file
Run lsof on the mounted filesystem that contains the "/var/adm/syslog" directory. You can get that info from bdf as follows:
# bdf /var/adm/syslog
now run lsof on the mntpoint returned by the above command...if it's "/var" then run lsof on it like...
# lsof /var | grep -i "/var/adm/syslog"
this will show what processes are using it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 08:54 AM
тАО08-11-2005 08:54 AM
Re: can't delete file
If you have no mail.log file in the /var/adm/syslog directory, try to 'touch mail.log' and watch to see if it is increasing in size.
Maybe the mail.log wasn't there but the syslogd says it is writing somewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 09:04 AM
тАО08-11-2005 09:04 AM
Re: can't delete file
If I do ls /var/adm/syslog/ I can see mail.log
If I do touch /var/adm/syslog/mail.log and do ls /var/adm/syslog/ then I see 2 files named mail.log
If I do rm mail.log it removes the one I touched but the original remains and can't be deleted.
I think there may be file system corruption.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 09:10 AM
тАО08-11-2005 09:10 AM
Re: can't delete file
ll /var/adm/syslog | vis
If you see something strange there, check also /etc/syslog.conf using vis(1).
Just my 2 cents...
Dietmar.
- Tags:
- unprintable chars
- vis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 09:14 AM
тАО08-11-2005 09:14 AM
Re: can't delete file
ll | vis
There seems to be special char in the file name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 09:20 AM
тАО08-11-2005 09:20 AM
Re: can't delete file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 09:26 AM
тАО08-11-2005 09:26 AM
Re: can't delete file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 09:57 AM
тАО08-11-2005 09:57 AM
Re: can't delete file
# find /var/adm/syslog -inum num -exec cat /dev/null > {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2005 10:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2005 02:03 AM
тАО08-12-2005 02:03 AM
Re: can't delete file
The solution was to use rm -i *mail*
That got rid of the file and I was able to touch a new one and point syslogd to it.