On Thu, Jan 13, 2011 at 5:08 PM, Swe Gill <sweg...@gmail.com> wrote:

> That is the problem. One file sizes upto 50GB and other 3 GB...
>
>  52872944 -rw-rw----   1 root  wheel      50G Jan 13 22:51
> httpd-modsec2_audit.log
>   3320928 -rw-rw----   1 root  wheel     3.2G Jan 13 22:51
> httpd-modsec2_debug.log
>
> I am just standing nowhere to remove the files....
>
> have tried by setting flags, changing modes.... all as a root but no luck
> yet...
>
> Any help?
>
> /S
>
>
Sweet Jebus! Ever hear of logrotate[1]? That would at least have solved this
problem in advance. My previous idea still stands. I believe rm (-f) still
requires *SOME* free space on a device to delete something. That being said,
do you have more then 50G free elsewhere on the system? Say /home
(/usr/home)? If you do, mv the file from /var/log to /usr/home. This would
effectively delete it from /var/log and free up it's space. Once it's moved
to a different location, you should have no problems doing with it as you
wish, compress and archive it or just arbitrarily delete it from the new
device if no backup is needed.


[1] I use a default setup for logrotate, it then archives each file in
/var/log, I then just archive /var/log/*.bz2 based on date and delete the
old bz2 archives from /var/log. This keeps /var/log pretty trimmed and the
only time it runs out of space is when something goes wild and eats up all
of it's space before logrotate can clean things up.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to