Debian apt-get update error
-
@jaredbusch said in Debian apt-get update error:
You can add
| sort -hr
to sort it largest first.[root@jrd-nc Pictures]# du -h --max-depth=1 | sort -hr 424G . 277G ./Picasa 126G ./ImageMixer3 6.5G ./Nikon D3200 5.1G ./Nikon Transfer 3.1G ./Photo Stream 2.0G ./Japan 2011 1.4G ./Video of kids&big kids playing Wii 1.3G ./100NIKON 896M ./iCloud Photos 711M ./Nicole's Pictures 601M ./101NIKON 203M ./Mom's Pictures 127M ./screenshots 27M ./Spiceworks Definitions 16M ./Spotlight Student 14M ./Photoshop Files 12M ./Medical 8.4M ./2013-01-08 7.9M ./Meme images 2.5M ./2013-12-11 Jared_Caricature 96K ./Clipart 4.0K ./Saved Pictures 4.0K ./Raptr Screenshots 4.0K ./Image Backup 4.0K ./Camera Roll [root@jrd-nc Pictures]#
Side note, /WTB someone to organize my shit for cheap.
-
@jaredbusch said in Debian apt-get update error:
cd /var du -h --max-depth=1 | sort -hr
Add sudo to the front of that so you can get all the folders info.
So:
sudo du -h --max-depth=1 | sort -hr
-
@jrc said in Debian apt-get update error:
@jaredbusch said in Debian apt-get update error:
cd /var du -h --max-depth=1 | sort -hr
Add sudo to the front of that so you can get all the folders info.
So:
sudo du -h --max-depth=1 | sort -hr
He is running as root already.
-
@jrc said in Debian apt-get update error:
sudo du -h --max-depth=1 | sort -hr
In /var/www/web/logs I have an access log that is 7.5GB. Can I purge that?
-
@wls-itguy said in Debian apt-get update error:
@jrc said in Debian apt-get update error:
sudo du -h --max-depth=1 | sort -hr
In /var/www/web/logs I have an access log that is 7.5GB. Can I purge that?
Your logs should be cycling. Is this a log for a single day?
-
@jaredbusch doubtful
-
@wls-itguy said in Debian apt-get update error:
@jaredbusch doubtful
I know the logs are set to cycle by most applications. No idea how your system was setup originally.
But to answer your question, stop the webserver
service apache stop
I think for Debian.Delete the log
Start the webserver again
service apache start
The apache process will recreate a new log.
-
@jaredbusch said in Debian apt-get update error:
@wls-itguy said in Debian apt-get update error:
@jrc said in Debian apt-get update error:
sudo du -h --max-depth=1 | sort -hr
In /var/www/web/logs I have an access log that is 7.5GB. Can I purge that?
Your logs should be cycling. Is this a log for a single day?
I'm downloading it now so I can go through it and verify that it isn't all one day. Can I delete it and create a new .log file and go on my way?
-
@jaredbusch said in Debian apt-get update error:
@wls-itguy said in Debian apt-get update error:
@jaredbusch doubtful
I know the logs are set to cycle by most applications. No idea how your system was setup originally.
But to answer your question, stop the webserver
service apache stop
I think for Debian.Delete the log
Start the webserver again
service apache start
The apache process will recreate a new log.
Gotcha
-
@jaredbusch said in Debian apt-get update error:
@wls-itguy said in Debian apt-get update error:
@jrc said in Debian apt-get update error:
sudo du -h --max-depth=1 | sort -hr
In /var/www/web/logs I have an access log that is 7.5GB. Can I purge that?
Your logs should be cycling. Is this a log for a single day?
It was not for a single day. It was from day 1 of the server life (25-Sept-2015)
-
@wls-itguy said in Debian apt-get update error:
@jaredbusch said in Debian apt-get update error:
@wls-itguy said in Debian apt-get update error:
@jrc said in Debian apt-get update error:
sudo du -h --max-depth=1 | sort -hr
In /var/www/web/logs I have an access log that is 7.5GB. Can I purge that?
Your logs should be cycling. Is this a log for a single day?
It was not for a single day. It was from day 1 of the server life (25-Sept-2015)
Strange, is it doing it now. It should be on your cronjobs daily or weekly.
-
@dbeato said in Debian apt-get update error:
@wls-itguy said in Debian apt-get update error:
@jaredbusch said in Debian apt-get update error:
@wls-itguy said in Debian apt-get update error:
@jrc said in Debian apt-get update error:
sudo du -h --max-depth=1 | sort -hr
In /var/www/web/logs I have an access log that is 7.5GB. Can I purge that?
Your logs should be cycling. Is this a log for a single day?
It was not for a single day. It was from day 1 of the server life (25-Sept-2015)
Strange, is it doing it now. It should be on your cronjobs daily or weekly.
Meaning I should put it there or it should already be there?
-
@wls-itguy little over halfway down the page it mentions how lograte shouldbe happening.
Managing Log Rotation Using Logrotate
By default, Ubuntu sets up its own log rotation plan with logrotate.
This program can take parameters and rotate logs when certain criteria are met. We can see what events cause logrotate to swap the Apache logs by looking in
/etc/logrotate.d/apache2
:sudo nano /etc/logrotate.d/apache2
Here, you can see some of the parameters given to logrotate. First of all, notice the first line is:
/var/log/apache2/*.log {
This means that logrotate will only operate on those logs in "/var/log/apache2". Keep this in mind if you have chosen a different directory for your logs in your Apache configuration.
-
@wls-itguy said in Debian apt-get update error:
eaning I should put it there or it should already be there?
It should be already be happening.