- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /var full, cannot rm
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
Forums
Discussions
Discussions
Discussions
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
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
02-25-2003 02:29 AM
02-25-2003 02:29 AM
/var full, cannot rm
My /var is 100%, due too a many many files in /var/tmp.
I'd like to rm /var/tmp/*, but there are too many arguments to use a "*".
ls : Too many arguments
rm : Too many arguments
ls | xargs -l rm doesn't seem to work either.
What to now ?
Regards,
Ceesjan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2003 02:34 AM
02-25-2003 02:34 AM
Re: /var full, cannot rm
for i in /var/tmp/*
do
rm $i
done
Regards,
Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2003 02:36 AM
02-25-2003 02:36 AM
Re: /var full, cannot rm
you could use the find command, e.g.:
# find /var/tmp/ -type f -name "whatever_with_wildcard" -exec ls -l {} \;
And if you get the correct output, substitute ls -l by rm.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2003 02:36 AM
02-25-2003 02:36 AM
Re: /var full, cannot rm
find /var/tmp -mtime +7 | while read LINE
do
rm $LINE
done
Hope it helps,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2003 02:36 AM
02-25-2003 02:36 AM
Re: /var full, cannot rm
find /var/tmp -type f -mtime +X -exec rm {} \;
Where X = a number of days old.
Alternatively, you can still use rm but limit the number of files by specifying a less general argument. Something like:-
rm a* # remove all files starting with a
rm b*
rm aa*
rm bb*
etc depending what filenames you have.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2003 02:47 AM
02-25-2003 02:47 AM
Re: /var full, cannot rm
#cd /var
#rm -rf tmp
#mkdir tmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2003 02:51 AM
02-25-2003 02:51 AM
Re: /var full, cannot rm
All options i already found myself, but the real solution was to find the processes which generate these files.
It seemed that i had more than 10 fbackup processes running.
By killing these fbackups, the /var was automatically reduced to 63%. The amount of files decrease just enough to let my wildcard-expension (*) work again.
Case closed
Thanks,
Ceesjan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2003 02:56 AM
02-25-2003 02:56 AM
Re: /var full, cannot rm
Don't forget that many system daemons/software place their lockfiles in /var/tmp (for example RaidManager). You don't necessarily want to remove everything or you could delete something the system needs.
I would look to see what is in the directory first using Robert Jan's solution (but echo rather than rm the line) then use John Palmers idea to delete blocks of files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2003 04:05 AM
02-25-2003 04:05 AM
Re: /var full, cannot rm
Check against a current /var/tmp file by running lsof - this will identify the process associated with the file.
rgds, Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2003 05:33 AM
02-25-2003 05:33 AM
Re: /var full, cannot rm
Boot your system to single user mode.
shutdown -ry now
interupt the boot process when prompted
bo Y to interact with the IPL
hpux -is
Boots to single user mode, mounts nothing.
cd /var
There should be nothing there. If there is, list it and delete it or possbily move it somewhere else.
You can issue manual mount commands in single user mode.
mount /home
Then move the offending files there if applicable.
If files have been copied into /var while not mounted, they wont show up on a ls after a filesystem is mounted on the folder. Thus the files appear hidden and are tough to find.
Its happened to me a few times with flaky disks and finger mistakes.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com