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:
I use this in a script on my openwrt router to check if my DynDNS needs to be updated, saves your account from being banned for blank updates.
Same as original just no $ at start
Strips the non-ip information from the dig output. Could be combined with "head -1" to ensure a single ip is returned. Useful for outputting as a variable for use in scripts.
A similar command that lists only the currently running VMs is thus:
VBoxManage list runningvms
...the above showing a list of VMs by name and UUID in the same format as the "$ VBoxManage list vms" command
you can launch a VirtualBox VM from the command line using VBoxManage, but that invokes it in a gui environment.
If you want to just fire off your VM in the background, use VBoxHeadless as shown. To get the names and UUIDs of your VirtualBox VMs, type:
Gets the internal and external IP addresses of all your interfaces, or the ones given as arguments
Generates password consisting of alphanumeric characters, defaults to 16 characters unless argument given.
-n 9000 : Number of requests to perform for the benchmarking session
-c 900 : Number of multiple requests to perform at a time
Uses the last argument of the last executed command, and gets the directory name from it.
Use $!:t for the filename alone, without the dirname.
Use the command watch, which is really hard to pass nested quotes to, and insert newlines where they are supposed to go in the HTTP request. that is after 1.1 after the host and two newlines at the end before the EOF.
i use this all day
what? no support for HEREDOCs on commandlinefu's interface? need more fu.
If you want certain files out of a directory hierarchy, this will copy just the listed files, but will create the directory hierarchy in the new location ($DIR/)
Will return your internal IP address.
This command uses the recursive glob and glob qualifiers from zsh. This will remove all the empty directories from the current directory down.
The **/* recurses down through all the files and directories
The glob qualifiers are added into the parenthesis. The / means only directories. The F means 'full' directories, and the ^ reverses that to mean non-full directories. For more info on these qualifiers see the zsh docs: http://zsh.dotsrc.org/Doc/Release/Expansion.html#SEC87
It will create a backup of the filename. The advantage is that if you list the folder the backups will be sorted by date. The command works on any unix in bash.
Same thing as above, just uses fetch and ipchicken.com