Posts Tagged: sysadmin

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 Flush Routing Table on a Mac

If you’re feeling like your routing is all dicked up on your Mac, try this. sudo route -n flush; sudo route -n flush; sudo route -n flush; Running route several times should clear out all of your routing table data. Now restart your networking and your default routes should be created.

How to Restart Networking on a Mac

If you’re like me and you have to connect to a VPN with the Cisco Anywhere Connect client, you’re probably dealing with strange networking issues as a result. One of the things I do when I’m experiencing networking issues is that I restart networking on my Mac. To do that run this command. sudo ifconfig… Read more »

Synch two directories with rsync

If you’ve ever thought, “What’s the easiest why to quickly synch two remote directories?” If I were going to sync up two remote directories I would do this. rsync -avz . If I ran this command in a directory called Maildir.backup, all of the contents of the remote Maildir would be in there. If… 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 »