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

Load another file in vim
You can then switch from a file to another with ^W^W

Show memory usage of all docker / lxc containers (works on CoreOS)

Application network trace based on application name
This command takes an application name as an argument and then it will listen to the tcp traffic and capture packets matching the process Id of the application. The output shows: local address / local port / Remote Address / Remote port / State / Owning Process ID

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

Search google.com on your terminal
I found this command on a different site and thought you guy might enjoy it. Just change "YOURSEARCH" to what ever you want to search. Example, "Linux Commands"

Massive change of file extension (bash)
Change the file extension in batch. Useful to create output file names with same input name but distinct extension by including logic inside the loop

Post a message to another users screen via SSH
Post a message on another users screen via SSH

A command to copy mysql tables from a remote host to current host via ssh.
In the example above 3 tables are copied. You can change the number of tables. You should be able to come up with variants of the command by modifying the mysqldump part easily, to copy some part of remote mysql DB.

Find files and calculate size of result in shell
Find files and calculate size with stat of result in shell

Get IPv4 of eth0 for use with scripts
I've been using it in a script to build from scratch proxy servers.


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: