commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
The closer to zero the better.Credit to TheSeb on macrumors: http://forums.macrumors.com/showthread.php?t=1289884
Copying and pasting from Office documents open in Office:mac can dirty your files with Windows CRLF and (inexplicably) Classic Mac OS LF newlines, which can break some tools. This snippet replaces them with good ol' Unix LF newlines.
Purges DNS cache of OS X.
dscacheutil -flushcache does not work since OS X 10.7.
adjusting the field "f1" will give you additional information such as
f1 = 98%
f2 = discharging
f3 = 2:02 remaining
Mac install ssh-copy-id
From there on out, you would upload keys to a server like this:
(make sure to double quote the full path to your key)
ssh-copy-id -i "/PATH/TO/YOUR/PRIVATE/KEY" username@server
or, if your SSH server uses a different port (often, they will require that the port be '2222' or some other nonsense:
(note the double quotes on *both* the "/path/to/key" and "user@server -pXXXX"):
ssh-copy-id -i "/PATH/TO/YOUR/PRIVATE/KEY" "username@server -pXXXX"
...where XXXX is the ssh port on that server
commandline for mac os x
download every last pdf reference Doc from the Apple Developer Connection, takes a half hour on a fast connection. enjoy!
In Mac OS X, by default, you have to click the mouse on a Terminal window before you can type in it. You can change this behavior to mimic the X11 behavior of focusing on the window on mouseover.
Insert an additional (moveable) spacer on the right side of the Dock in Mac OS X
Insert an additional (moveable) spacer on the left side of the Dock in Mac OS X
fixes a problem with bad bytes in /dev/urandom on Mac OS X