Jennifer Zelazny

Random and Opinionated Thoughts

Tag: commands


Show Disk Space Usage (Sorted)

Posted by: Jennifer Zelazny | 1 Comment

Every once and awhile I find myself needed to what is the space hog on my computer/server. While the command du – h in the command line works for a general overview – I really want to see the results in descending order (by space used). This command will list out everything in descending order so you can quickly see where the most space is used: du -k -s * | sort -k1 -g -r Read more

Apple UNIX

Copy to Clipboard in the Command Line Interface (CLI)

Posted by: Jennifer Zelazny | 0 Comments

Ever wonder how to copy something from the command line into the Mac OS clipboard? If you want to copy/paste a files content (perhaps a log file or a conf file, etc) into the clipboard to use outside of the CLI, you can use the commands pbcopy and pbpaste. Example: I want to copy the contents of my public key to the clipboard (so I can send it to a server admin who will use it in allowing me to access their subversion repository). All I would need to do is: cat | pbcopy (cat writes out the content... Read More » Read more


whereis and locate.

Posted by: Jennifer Zelazny | 0 Comments

A few simple commands to help make your life working with UNIX a little easier: If you are looking for a certain programs, use:whereis. Example. You want to find out where ipfw is located. In the command line type whereis ipfw and whereis will spit out the location (/sbin/ipfw). If you need to find a program or a file and you know what it is called, use:locate. Example. I know I want to uninstall MySQL, and I want to see every file that has mysql in the file path. In the command line, type locate MySQL and locate will spit... Read More » Read more