Unix commands

From CoreInfo
Revision as of 00:51, 3 July 2013 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

source

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>

e.g.

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