Commands using wc (172)

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

scping files with streamlines compression (tar gzip)
it compresses the files and folders to stdout, secure copies it to the server's stdin and runs tar there to extract the input and output to whatever destination using -C. if you emit "-C /destination", it will extract it to the home folder of the user, much like `scp file user@server:`. the "v" in the tar command can be removed for no verbosity.

Get a list of the erroring cifs entries in fstab
It disturbs me when my logwatch report tells me a share or machine has disappeared, esp as mount isn't telling me what's gone. This command outputs to stderr the erroring cifs entries from fstab.

Pimp your less
# s = combine multiple lines of whitespace into 1 # x4 = set the tabstop to 4 instead of 8 # F = Exit if the output fits on 1 screen. This is similar to git diff # R = Raw control chars. This allows you to pipe colordiff straight to less. ie: alias sdi="svn diff | colordiff | less" # S = Chop off long lines # X = Dont send termcap init and deinit scrings to the terminal

Examine processes generating traffic on your website
I often have to google this so I put it here for quick reference.

Make less act like cat if its input's contents can fit on one screen

Mysql uptime
show Mysql uptime

Convert JSON to YAML

random xkcd comic
i sorta stole this from http://www.shell-fu.org/lister.php?id=878#MTC_form but it didn't work, so here it is, fixed. --- updated to work with jpegs, and to use a fancy positive look behind assertion.

Download an entire static website to your local machine
Very nice command when you want to download a site locally to your machine, including images, css and javascript

Generate random number with shuf
If you don't have seq or shuf, bash can be used.


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: