Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPDATE: Linux is slowly consuming disk space

Status
Not open for further replies.

purity

MIS
Nov 5, 2002
6
US
I believe I have found the file that is responsible for the low amount of available disk space on my Linux native partition on my RedHat 7.1 Samba box.

/var/log/samba/backup.log

This file is 3.1 GB in size. (The entire Linux native partition itself is 4 GB.) I am really considering a "cp /dev/null /var/log/samba/backup.log" real soon. Would this be safe to do?

About a month ago, I did create a user account called "backup." It was going to be a Windows box scheduled to backup everything on our networked Samba share every night using xcopy. I never really used the account, though.
 
Try using
Code:
/bin/rm -fr /var/log/samba/backup.log
ln -s /dev/null /var/log/samba/backup.log
instead. I believe this would be somewhat safer, not sure though. //Daniel
 
If you have no need for your samba log file, then go ahead and delete it... I wouldn't recommend linking it to null, since you might come across a problem down the line and actually want to see what it has to say.

If you do want to keep your logs, you might want to look into logrotate... you can set it to compress the old logs, so they take up a lot less space (or you can do it manually).

btw, you don't need the -r in that 'rm' example either...
 
Nope, that's just a bad habit of mine :).

And, if you ever do want to see what SAMBA has to say, then you just delete the file again. //Daniel
 
Hey guys, thanks for your help. I'll let you know how it goes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top