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.
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:
Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:
list all the processes
More of the same but with more elaborate perl-fu :-)
Returns nothing if the domain exists and 'No match for domain.com' otherwise.
Shows all those processes; useful when building some massively forking script that could lead to zombies when you don't have your waitpid()'s done just right.
Run the function phpinfo() on the shell
Simple command to convert a large number of images into jpeg-format. Will delete originals after conversion.
OSX's BSD version of the du command uses the -d argument instead of --max-depth.
Use `zless` to read the content of your *rss.gz file:
jhead is a very nice tool to do all sorts of things with photographs, in a batch-oriented way. It has a specific function to rename files based on dates, and the format I used above was just an example.
Renames all the jpg files as their timestamps with ".jpg" extension.
In Bash, when defining an alias, one usually loses the completion related to the function used in that alias (that completion is usually defined in /etc/bash_completion using the complete builtin).
It's easy to reuse the work done for that completion in order to have smart completion for our alias.
That's what is done by this command line (that's only an example but it may be very easy to reuse).
Note 1 : You can use given command line in a loop "for old in apt-get apt-cache" if you want to define aliases like that for many commands.
Note 2 : You can put the output of the command directly in your .bashrc file (after the ". /etc/bash_completion") to always have the alias and its completion
Converts every *.eps file to a *.pdf file
Replace 'this' with 'that'
since fuse mounts do not appear in /etc/mtab (fuse can't write there, dunno if it would if it could) this is propably a better way.
Tres lineas en un shell script para copiar la base de datos diaramente
Nothing fancy it just converts one file from one character encoding into another one.
Remove newlines from output.
One character shorter than awk /./ filename and doesn't use a superfluous cat.
To be fair though, I'm pretty sure fraktil was thinking being able to nuke newlines from any command is much more useful than just from one file.
Easy way to see your real external IP