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 ?


btmp (35.4 MB)

driveclient.log (15 MB)

  1. how to clean tmp files

#df -m /tmp

 Filesystem     1M-blocks  Used Available Use% Mounted on

 /dev/xvda1         40184 38508         0 100% /

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/btmp

If 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.log

Regarding 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.

| improve this answer | |
  • It should be sudo > /var/log/btmp right? instead sudo > /var/log/btmp.log – kamlesh.bar May 7 '15 at 9:03
  • @kamlesh.bar yes sorry. – Rinzwind May 7 '15 at 10:23
  • sudo > does the same as > by itself (except it might ask a password) I think you mean sudo truncate – Jasen Jan 16 '19 at 2:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.