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.
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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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:
Easily removes line #2 in ~/.ssh/known_hosts.
Uses find, plutil and xpath.
Note: Some applications don't have proper information. system_profiler might be better to use.
It's a bit slow query.
Due to command length limit, I removed -name "*.app" and CFBundleName.
Or, if you have restricted access for sftp only, I think you can still do this:
diff /path/to/localfile <(scp [email protected]:/path/to/remotefile >(cat))
Subtitles' file names contain S04E01, S04E02, ... S04E12 and end with ".smi".
Videos' file names contain S04E01, S04E02, ... S04E12 and end with ".avi".
You can change the patterns by changing `ls *S04E$jj*.smi` and `ls *S04E$jj*.avi` parts.
You can change the number of starting and ending file by changing `seq -f "%02.0f" 1 12` part.
man find: If no paths are given, the current directory is used. - Can anybody tell me why so many people are typing the dot?
mtr is a network utility that combines traceroute and ping utility
Display information about the cores.
* sudo apt-get install schedtool
Using the COPYFILE_DISABLE=true environment variable you can prevent tar from adding any ._-files to your .tar-file on Mac OS X.
zsh only
I always hated resorting to using $(seq -w 1 99) to pad numbers. zsh provides a shortcut that couldn't be more intuitive. It also works in reverse {99..01}
should do the same as command #12875, just shorter.
Be aware of using the --password argument as it will appear your password in plain text on the screen. You may use -p argument instead, it will prompt you to enter you password in hidden mode.
Substitute that 724349691704 with an UPC of a CD you have at hand, and (hopefully) this oneliner should return the $Artist - $Title, querying discogs.com.
Yes, I know, all that head/tail/grep crap can be improved with a single sed command, feel free to send "patches" :D
Enjoy!