OS X has a bunch of os-specific utilities that make working in bash just a bit nicer.
To turn a date in seconds into a human readable date, use:
1 2 |
|
You can use pbcopy
to copy something into the clipboard. So for example, cat a file and place it in the system copy buffer:
1
|
|
Similarly, pbpaste
will paste from the clipboard, so to write the contents of your clipboard to a file:
1
|
|
To notify yourself after a long job has finished, for example uploading a new jar to a remote server, you can use say
to have a voice read words to you over the speakers or use growlnotify
to send yourself a growl message:
1 2 3 4 5 |
|
(growl unfortunately started charging money which is somewhat annoying, though 1.2.2 seems to still work)
so for example:
1
|
|
To open the current directory in finder:
1
|
|
If you add an external drive such as a usb stick, the mount point is in /Volumes
:
1 2 3 4 5 |
|
You can use spotlight from the command line as well with mdfind
:
1 2 3 4 5 |
|
And finally, you can create screenshots with screencapture
.
1
|
|