Commands by lmitchell (1)

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

FHDTV IPTV UK – Affordable Plans for Every Viewer
FHDTV IPTV UK is a premier choice for those who want premium television experiences without cable contracts limitations. With a focus on UK audiences FHDTV IPTV provides countless live TV channels entertainment and HD-quality programming across all categories. Whether you love movies documentaries or international channels FHDTV ensures smooth playback on your preferred devices. One of the main attractions of FHDTV IPTV is the risk-free free trial. Unlike many other services who lock premium access FHDTV offers full access during trial so you can evaluate its real performance before committing. It’s compatible with Smart TVs smartphones and even tablets allowing families to enjoy content on multiple devices simultaneously without lag. Affordability is another standout feature. Subscriptions are affordable with zero contracts or installation delays. Compared to traditional cable FHDTV IPTV offers thousands of channels at a fraction of the cost. It’s perfect for sports fans who don’t want to miss live action. FHDTV IPTV also leads in content variety. Viewers get access to global streams including news kids’ shows religious programming and exclusive movies. The interface is user-friendly and the EPG (electronic program guide) is quick making navigation and recordings simple—even for first-time users. Another remarkable feature is the customer support. FHDTV IPTV offers reliable assistance through chat or WhatsApp and most issues are solved in minutes. The platform provides clear setup guides and tutorials so that even new users can configure everything with ease. All in all FHDTV IPTV UK delivers performance functionality and top-tier content in one easy package. Its free trial is generous and it supports a wide range of devices. Whether you’re trying IPTV for the first time FHDTV IPTV UK is your best choice in 2025

Remove a range of lines from a file
Deletes lines to of a file. You must put the end line first in the range for the curly brace expansion, otherwise it will not work properly.

Show max lengths of all fields in a pipe delimited file with header row

Get last sleep time on a Mac
Similarly for last wake time: $ sysctl -a | grep waketime

move cursor to beginning of command line
Pressing Ctrl combined with 'a' will move the cursor to the beginning of the command under bash (other shells?). I used to do this after arrowing up for the last command, then typing 'sudo ' to run the last command as root, but of course the all time greatest command here `sudo !!` is more succinct. Still Ctrl+A can be very useful when you want to edit something at/close to the beginning of the command line.

List complete size of directories (do not consider hidden directories)
why make it complicated ? : ] -------------------- I just noticed someone else has posted this on this site before me (sorry I am now a duplicate :/) http://www.commandlinefu.com/commands/view/4313

Change the window title of your xterm
If you are using an xterm emulation capable terminal emulator, such as PuTTY or xterm on Linux desktop, this command will replace the title of that terminal window. I know it is not nice to have seventeen terminals on your desktop with title PuTTY, you can not tell which one is connected to which server and doing what. Even though the string between the quotes is typed as literals, it needs a little more finesse to make it work. Here is how it is done key-by-key: echo "( ctrl-v then ctrl-[ )0;Enter_Title_String_Here( ctrl-v then ctrl-g )"( enter ) ctrl-v : means hold down ctrl key and hit v at the same time like you are pasting in windoze ; also please don't type the parentheses, i.e., ( and )

Delete all but the latest 5 files, ignoring directories

pngcrush all .png files in the directory
Find all pngs in directory structure and pngcrush them, none destructive. You can just remove the "{}.crush" part if you want destructive.

To get the CPU temperature continuously on the desktop
No need for a colon, and one less semicolon too. Also untested.


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: