Commands using awk (1,418)

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

Search for a line of text in a directory of files recursively (while limiting to certain file extensions)

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Viewable terminal session over network.
connect to it with any network command (including web browser - if you don't mind weird formatting) curl 127.0.0.1:9876 nc 127.0.0.1 9876

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Avoid killing the X server with CTRL+C on the tty it was started from

convert markdown to PDF
This is the one-line version of this htmldoc + markdown combo to convert markdown formatted text to PDF files to distribute to your non-savvy project managers. http://scottnesbitt.net/ubuntublog/?p=114

List the most recent dates in reverse-chronological order
bash brace expansion, sequence expression

Go to the Nth line of file

resize all JPG images in folder and create new images (w/o overwriting)
Convert all jpegs in the current directory into ~1024*768 pixels and ~ 150 KBytes jpegs

Optimal way of deleting huge numbers of files
Using xargs is better than: $ find /path/to/dir -type f -exec rm \-f {} \; as the -exec switch uses a separate process for each remove. xargs splits the streamed files into more managable subsets so less processes are required.


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: