Posts Tagged: Linux

Linux Find Directories Consuming The Most Data

If you want to find out which directories on your Linux box that is gobbling up all of your disk space, use this command. du -h <dir> | grep ‘[0-9\.]\+G’ If you want to check the current directory, don’t include a

How to Truncate a File from Command Line on Mac or Linux

I often get data files with a ton of data, but I only need the first few lines. It’s usually because I’m building out some test data for code I’m writing. I don’t need to create 2,000 accounts to run my code. Here’s how I figured out how to truncate a file from the command-line… Read more »

How to Add a Linux User for Mail but Not Login

I’ve had to, from time-to-time, create users on Linux boxes that need to connect via IMAP to get email, but they can’t SSH or login to the server. There are certainly more elaborate ways to solve this problem, but here’s my ghetto solution. When creating the user set their shell to /bin/false. useradd –shell /bin/false… Read more »

Lubuntu on Asus EEE PC 900

I have an Asus EEE PC900, but the bastardized version of Debian that came with the computer was wildly out-of-date. No sane person should put an un-patched computer on the Internet without patching it. Unfortunately there isn’t apparently any way to update the hacked Debian install that came with the computer. Fortunately, I was able… Read more »