Posts Tagged ‘terminal’

Automatically Deleting Sent Mail Stored By Mutt

Sunday, October 18th, 2009

The Problem

I was recently doing some housekeeping on my websever: removing archived software downloads that I no longer needed and looking for any problems when I found one that initially had me stumped. Looking at the size of my home directory, I found it was around 600mb with no immediately obvious reason as to why.

I have hardly any files in my home directory, so I quickly located the problem to ~/Mailbox/.Sent/cur, which is, as the path suggests, related to my email server. It looked like copies of my sent mail was being stored and not deleted.

(more…)

Counting All Files in a Linux Directory

Sunday, September 27th, 2009

To count how many files there are in a directory using the terminal on a Linux machine you can combine 2 commands:

  • find
  • wc

We’ll use the find command to locate all the files (and exclude directories and other non-files) and then the wc command to count the files.

(more…)