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

backup and synchronize entire remote folder locally (curlftpfs and rsync over FTP using FUSE FS)
connect to a remote server using ftp protocol over FUSE file system, then rsync the remote folder to a local one and then unmount the remote ftp server (FUSE FS) it can be divided to 3 different commands and you should have curlftpfs and rsync installed

history autocompletion with arrow keys
This will enable the possibility to navigate in the history of the command you type with the arrow keys, example "na" and the arrow will give all command starting by na in the history.You can add these lines to your .bashrc (without &&) to use that in your default terminal.

VIM: when Ctrl-D and Ctrl-U only scroll one line, reset to default
Resets the scroll parameter to the default (half the rows in the current window). The scroll parameter can be inadvertently set to 1, e..g., if you type '1 Ctrl-D' or '1 Ctrl-U' in normal mode.

Binary search/replace
Replace all instances of "A" with "B" in file "source" saved as file "destination". !! IF A/B is multi-byte, then separate bytes with spaces like so: "s/20\ 0A/00/g".

Run a program transparently, but print a stack trace if it fails
For automated unit tests I wanted my program to run normally, but if it crashed, to add a stack trace to the output log. I came up with this command so I wouldn't have to mess around with core files. The one downside is that it does smoosh your program's stderr and stdout together.

list block devices
Shows all block devices in a tree with descruptions of what they are.

List NYC startups that are hiring

Count the number of deleted files
It does not work without the verbose mode (-v is important)

Have a smile
Outputs utf-8 smileys

Check disk for bad sectors
Checks HDD for bad sectors, just like scandisk or chkdisk under some other operating system ;-).


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: