Commands using xargs (769)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.

Share Your Commands


Check These Out

Say something out loud
Whatever arguments you pass will be spoken out loud. (Put it in a script or shell function.)

Crash bash, in case you ever want to for whatever reason
This is a very hackish way to do it that I'm mainly just posting for fun, and I guess technically can more accurately be said to result in undefined behavior. What the command does is tell the shell to treat libpng like it's a shell plugin (which it's most certainly not) and attempt to install a "png_create_read" command from the library. It looks for the struct with the information about the command; since it's always the command name followed by "_struct", it'll look for a symbol called "png_create_read_struct". And it finds it, since this is the name of one of libpng's functions. But bash has no way to tell it's a function instead of a struct, so it goes ahead and parses the function's code as if it was command metadata. Inevitably, bash will attempt to dereference an invalid pointer or whatever, resulting in a segfault.

Better git diff, word delimited and colorized
Define a git alias then git dcolor

Mysql uptime
show Mysql uptime

list files recursively by size

Remove the first and the latest caracter of a string

What is my ip?

Virtualbox: setup hardware
where - memory 256 assign 256 Mb RAM - acpi on enable ACPI (mandatory if you use Winfog 2000 - ioapic off disable the IO APIC. Not useful if you use one CPU (on virtual machine or a 32 bit operative system). As ACPI, this switch is mandatory for Winbug 2000 - pae on enable the Phisical Address Extension how to use more than 4Gb of RAM on x86 CPU - hwvirtex on enables hardware virtualization extensions for microprocessors that have this feature (which should be also enabled in the BIOS of the motherboard) - nestedpaging on allows part of the processes of memory management hardware are made directly

Find usb device
I often use it to find recently added ou removed device, or using find in /dev, or anything similar. Just run the command, plug the device, and wait to see him and only him

Add to Instapaper
Adds URL to Instapaper. Usage: instapaper-add user@example.com 12345 http://www.commandlinefu.com/


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: