Information Technology Reference
In-Depth Information
Tip 40
Switch Locations in Terminal via Drag and Drop
By clicking and dragging a file or folder onto the Terminal window while
holding down
COMMAND
, you'll instantly switch to either the folder that you're
dragging or the folder that the file you're dragging is within. In other words,
Terminal will automatically type
CD
for you and then fill in the path, before
hitting
RETURN
on your behalf. Give it a try to see what happens, but remember
to hold down
COMMAND
before releasing the mouse button—if you don't, OS X
will simply type within Terminal the entire path to the file or the folder,
something that can be useful in itself!
Tip 41
Timestamp Zip Filenames
This is one of those tips a handful of people will find useful but is worth
sharing nonetheless. Those who use OS X on server computers might find it
particularly useful.
The following command will cause any new archives (zip files) you create to
automatically have the 24-hour time appended to the filename. For example,
creating an archive from the folder
PICTURES
at 2:13 p.m. will result in an archive
with the filename
PICTURES 14.13.27.ZIP
(with the last two digits representing the
second count).
To activate this feature, open a Terminal window (open Finder, select the
Applications list, and then in the list of applications double-click Terminal
within the
UTILITIES
folder), and type the following:
DEFAULTS WRITE COM.APPLE.FINDER ARCHIVETIMESTAMP -BOOL TRUE;KILLALL FINDER
To deactivate it at a future date, type the following into a Terminal window:
DEFAULTS DELETE COM.APPLE.FINDER ARCHIVETIMESTAMP;KILLALL FINDER