I am for the most part a Windows user. I was kind of moving towards Linux, Ubuntu in particular, but that ship pretty much sailed when I got my hands on Windows 7. Awesome, awesome operating system. But, I still have to use some Unix and Mac systems once in a while. And then there are certain commands that I often use, but always forget since it usually goes a bit of time between times I do it. So, what follows is basically just a list of commands that I keep forgetting, but keep having to look up again.
Remove .DS_Store files
Removes all those stupidannoying DS_Store files that Mac litters around wherever it goes. Works in the current directory and downwards.
Recursivly download a whole website
Show hidden files on in OS X
Swap TRUE with FALSE to hide them again. The second line kills and relaunches Finder.
killall Finder && open /System/Library/CoreServices/Finder.app
Redirect std error to std out
Compress and decompress files
tar czvf archive.tar.gz filedir filedir
tar cjvf archive.tar.bz2 filedir filedir
# Decompress
tar xzvf archive.tar.gz
tar xjvf archive.tar.bz2
Find open files
SSH filesystem on Mac
First download and install sshfs for Mac OS X. Then to mount
/Applications/sshfs/bin/mount_sshfs server1_hostname: ~/sshfs/server1
And to unmount (and uninstall the sshfs)
sudo /Applications/sshfs/uninstall.sh
















