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

Get length of current playlist in xmms2

check open ports without netstat or lsof

show current directory
Opens a file or URL in the user's preferred application.

Recording the desktop and an application audio source for webcast
You will have to use the sound preferences (record) to choose the audio source and set it to internal.

Replace all tabs with spaces in an application
Note that this assumes the application is an SVN checkout and so we have to throw away all the .svn files before making the substitution.

highlight with grep and still output file contents

Get all IPs via ifconfig

Open Remote Desktop (RDP) from command line having a custom screen size
This example uses xfreerdp, which builds upon the development of rdesktop. This example usage will also send you the remote machine's sound.

uncomment the lines where the word DEBUG is found

Temporarily suspend and unsuspend a foreground job
Press ^Z, do what you need to do on the shell, then input % to resurrect the suspended job.


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: