Unix commands
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
- One option is to install the new version with Macports
gdu -h /Volumes/Solution\ Centre/* | gsort -h -r | ghead -n 50
Other links:
Other tools to get server space (windows)
- http://sizeondisk.codeplex.com/
- http://www.addictivetips.com/windows-tips/disk-space-fan-is-awesome-eye-candy-disk-analysis-tool/
- http://www.addictivetips.com/windows-tips/free-hard-disk-space-after-finding-large-files-folder-visualizer/
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>
- Source: http://www.tonyamoyal.com/2009/11/19/where-is-my-crontab-located-on-mac-os-x-105-leopard/
- keywords: mac crontab location
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
- Commands: https://gist.github.com/2260182
- Originating site with other commands: http://news.ycombinator.com/item?id=3779895