Oct 13 2009

How to clean up your Linux directories.

Posted by German Rumm in Uncategorized

I need to clean up my working folders way too frequently. Got tired of googling required commands every time and decided to post them for everyone to see.

So, here goes.

Delete all files matching a pattern in a directory

$ find . -name "*.tmp" -print | xargs rm

Remove empty directories

$ cleanlinks

Both commands work on my Ubuntu 8.04 with no apt-getting required.