Basically I want to clear unwanted log files from ubuntu 14.04 rackspace cloud server. as files are using too much space.
can I remove following log files from server ?
/var/log
btmp (35.4 MB)
driveclient.log (15 MB)
- how to clean tmp files
#df -m /tmp
Filesystem 1M-blocks Used Available Use% Mounted on /dev/xvda1 40184 38508 0 100% /
1 Answer
btmp logs failed attempts into your system. In theory this could mean someone is trying to brute force passwords. You can empty this file but should not remove it since software could crash when it expects the file to be there. To empty it from command line:
sudo > /var/log/btmpIf it gets filled quickly you really should investigate why.
driveclient.log is something specific to space rack. Again to empty it use...
sudo > /var/log/driveclient.logRegarding this last you should have the following files (nore info in the link):
Agent file location (Linux)
Assuming a default installation, following are the agent file locations on Linux systems:
Configuration files: /etc/driveclient Logs: /var/log Startup script: /etc/init.d Application: /usr/local/bin PID file for running the agent: /var/run/driveclient.pid Database: search for a *.db file under /var/cache/driveclient
You can turn logging off or set the size of this log in /etc/driveclient and also how many compressed backups will be saved before the next one gets deleted.
3