Unix commands

From CoreInfo
Jump to navigation Jump to search

Get top 50 largest files/folder

  • Install GNU coreutils >= 7.5
    • One option is to install the new version with Macports sudo port install coreutils
gdu -h /Volumes/Solution\ Centre/* | gsort -h -r | ghead -n 50


Other links:

Other tools to get server space (windows)

Get folder sizes in current directory

du -hsx * | sort -rh | head -10

Watch a file for changes

Tail will keep running while it's watching x file and display any changes as it happens.

tail -f  <filePath>


tail -f  ~/sntop.log

Lion crontab location

Same location in Snow Leopard

cat /usr/lib/cron/tabs/<yourUsername>

OSX For Hackers

A bunch (shell script) of Mac Terminal commands which allow you to easily turn some annoying Mac features on/off. E.G.

  • Show hidden files
  • Show hidden Library
  • Make hidden Dock icons transparent
  • Disable the annoying "are you sure you want to open x program"
  • and allot more

Links to the commands