Commands using zcat (18)

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

Quickly re-execute a recent command in bash
! will expand to the last time you ran , options and all. It's a nicer alternative to ^R for simple cases, and it's quite helpful for those long commands you run every now and then and haven't made aliases or functions for. It's similar to command 3966, in some sense.

update you web
in fact, I want to know, how to only get the modified files.

Backup all starred repositories from Github

all out
How to force a userid to log out of a Linux host, by killing all processes owned by the user, including login shells:

grep (or anything else) many files with multiprocessor power
Parallel does not suffer from the risk of mixing of output that xargs suffers from. -j+0 will run as many jobs in parallel as you have cores. With parallel you only need -0 (and -print0) if your filenames contain a '\n'. Parallel is from https://savannah.nongnu.org/projects/parallel/

Show whats going on restoring files from a spectrum protect backup
spectrum protect's dsmc command shows file names and total amount of restore. This command shows which files are actually open and their siz in GB and highlights the change to the previous output

find out which directory uses most inodes - list total sum of directoryname existing on filesystem

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Quick directory bookmarks
Set a bookmark as normal shell variable $ p=/cumbersome/path/to/project To go there $ to p This saves one "$" and is faster to type ;-) The variable is still useful as such: $ vim $p/ will expand the variable (at least in bash) and show a list of files to edit. If setting the bookmarks is too much typing you could add another function $ bm() { eval $1=$(pwd); } then bookmark the current directory with $ bm p

change microdvd subtitles framerate
this command example converts to 25 fps subtitles that were originally created for 24 fps movie


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: