-i
If you want to protect a directory from a careless rm -rf *, touching a file named -i inside it will force rm to ask for confirmation :
touch ~/important-directory/-i
From Command Line Fu, via HN.
You can follow along on Twitter or via the feed. Don't hesitate to get in touch. Sponsor the site.
Posts tagged with tips.
If you want to protect a directory from a careless rm -rf *, touching a file named -i inside it will force rm to ask for confirmation :
touch ~/important-directory/-i
From Command Line Fu, via HN.
If you find the animated transition between Spaces on OS X unnecessary, you can switch it off like so:
defaults write com.apple.dock workspaces-swoosh-animation-off -bool YES && killall Dock
To revert the change, swap that YES for a NO.
Via superuser.
I don’t normally link to weblogs, but I really like the way the Alfred team share in-depth tips and tricks here. For an already feature-rich app with a fast pace of development, it’s a great way for users to keep abreast of new features and learn the ins and outs of existing ones.
And, from a more cynical perspective, it’s superb marketing for the app, nudges users in the direction of the Powerpack paid upgrade, and no doubt makes it easier to write more formal documentation down the road.
TL;DR: Developers, please blog like crazy!
A database of hidden settings for Mac OS X.
Tip: to open a new Finder-window, tab to the Finder-icon in the application switcher, hold the Cmd-key, press the Alt-key, release Cmd-key.
An obscure, unconventional command key combo. I’m not sure it’s any quicker than switching to the Finder and whacking ⌘ + N, but it’s nice to know it’s there!
Update:
@keyboardkitteh reports that the trick ‘works with any app that has no currently open windows, not just Finder’. Let the muscle memory re-training begin.
Update II:
@asheidan points out that the shortcut ‘also works to unminimize minimized windows’.
@jeffunity offers another handy command key combo: ⌘ + ⌥ + Space, which opens a new Finder window with the search bar in focus.
(Source: macintoshing)
If you’re the only person who uses your Linux computer, and you’re loyal to one window manager or Desktop Environment, there’s not much point in using a display manager to log in.
Instead, try adding the following to your ~/.bash_profile or ~/.zsh_profile:
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then . startx logout fi
Now, when you boot up your computer and log in at the console, X will start up, using the DE or window manager you’ve specified in ~/.xinitrc.
Of course, if you’re a real minimalist, you’d just log in and type startx, but as a lazy minimalist, I can’t be bothered typing those six letters.
If you want to run a command in the background without being bothered by its output interrupting you at the terminal, try appending &>/dev/null &.
An example:
offlineimap -o -u Noninteractive.Quiet &>/dev/null &
Thanks, Donny.
⇧ + ctrl + ⏏
!* will insert all the arguments from your previous command.
Handy if you run a command, but forget one argument; or if you open a file with one program and decide you’d be better off using another.
If you want to stop anything appearing on your Mac’s Desktop, but want to keep files in the ~/Desktop directory, open Terminal and run the following:
defaults write com.apple.finder CreateDesktop -bool FALSE ; killall Finder
After that you won’t see any icons on your Desktop—no files, no folders, no disks; just the pretty picture.
To reverse the process, run the command again, replacing FALSE with TRUE.
If you need to run the previous command as root, you can save a good few keystrokes with:
sudo !!