Commands using tail (292)

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

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Prevent an IPv6 address on an interface from being used as source address of packets.
If two or more IPv6 addresses are assigned to an interface, apply this command to all but the address that you want to use as the source address of outbound packets. This is Linux-specific and requires the iproute package, or equivalent for your distribution.

Run a command, store the output in a pastebin on the internet and place the URL on the xclipboard
The URL can then be pasted with a middle click. This is probably useful when trying to explain problems over instant messaging when you don't have some sort of shared desktop.

Insert commas to make reading numbers easier in the output of ls
This modifies the output of ls so that the file size has commas every three digits. It makes room for the commas by destructively eating any characters to the left of the size, which is probably okay since that's just the "group".   Note that I did not write this, I merely cleaned it up and shortened it with extended regular expressions. The original shell script, entitled "sl", came with this description:    : '  : For tired eyes (sigh), do an ls -lF plus whatever other flags you give  : but expand the file size with commas every 3 digits. Really helps me  : distinguish megabytes from hundreds of kbytes...  :  : Corey Satten, corey@cac.washington.edu, 11/8/89  : '   Of course, some may suggest that fancy new "human friendly" options, like "ls -Shrl", have made Corey's script obsolete. They are probably right. Yet, at times, still I find it handy. The new-fangled "human-readable" numbers can be annoying when I have to glance at the letter at the end to figure out what order of magnitude is even being talked about. (There's a big difference between 386M and 386P!). But with this nifty script, the number itself acts like a histogram, a quick visual indicator of "bigness" for tired eyes. :-)

Write on the console without being registered
http://www.linux-party.com/index.php/8157-escribir-en-la-consola-linux-sin-que-quede-registrado-en-el-history

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

convert a mp4 video file to mp3 audio file (multiple files)

Introduction to user commands
Tested on debian and ubuntu. Translations could be useless, so "LANG=C man intro" is a better alternative.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

get all pdf and zips from a website using wget
If the site uses https, use: $ wget --reject html,htm --accept pdf,zip -rl1 --no-check-certificate https-url


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: