Image 13/32 For Mac
It can't be said enough, 'open' is great. You can open documents in their GUI program and you can select the GUI program with -a as well.
For example, open -a vlc movie.avi will open VLC and tell it to load movie.avi in your current dir. Open movie.avi would open it with whatever program is the default. If you just want to open a program, you can do that too: open -a system preferences will run System Preferences. You can open Urls too: open vnc://myserver:5900 will open Screen Sharing and connect to myserver. Check out man open to see all flags you can use.
Image 13 32 For Macbook Pro 32gb Ram
Lsof list open files Handy when you want to eject your USB drive and are told that it is in use and to please quit all applications and try again. $ sudo lsof /Volumes/CLINTON COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME bash 55966 clinton cwd DIR 4 2 /Volumes/CLINTON lsof 56042 root cwd DIR 4 2 /Volumes/CLINTON lsof 56043 root cwd DIR 4 2 /Volumes/CLINTON In this instance, I had cded onto the drive and so bash was accessing the volume. Note that if you see 'mds' entries, it means that spotlight is indexing the drive.