Commands using head (314)

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

Fetch the Gateway Ip Address
Better use iproute2 !

Check if your desired password is already available in haveibeenpwnd database. This command uses the API provided by HIBP

What is My WAN IP?
The curl command retrieve the HTML text containing the IP address. The grep command picks out the IP address from that HTML text.

check open ports without netstat or lsof

Counts number of lines
Counts number of lines of code in *.h and *.cc files

Find failures with journalctl
Sometimes things break. You can find the most recent errors using a combination of journalctl, along with the classic tools sort and uniq

sleep until X o'clock
pauses exactly long enough to wake at the top of the hour

Find failures with journalctl
Sometimes things break. You can find the most recent errors using a combination of journalctl, along with the classic tools sort and uniq

Resume a partially copied file

Convert a bunch of HTML files from ISO-8859-1 to UTF-8 file encoding in a folder and all sub-folders
This is my first attempt at converting all HTML files to UTF-8 file encoding, including all subfolders. Theres probably a much more compact way to do it, but I'm quite proud of it with my windows background ;)


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: