One Liners
Getting a clearer picture of http response time breakdown via CLI
I came across this handy python script https://github.com/reorx/httpstat that provides a http response breakdown in text. This saves you having to open up a browser and look at a visual network response waterfall.
Read moreMac OS/X One Liner – Changing hostname
To change the Hostname under Mac OS/X 10.5 $ sudo scutil --set HostName servername.example.com
Read moreLinux One Liner – vim remove syntax highlighting
From within vi, which is normally vim these days. :syn off That’s bugged me at times and I never knew how to turn it off.
Read moreLinux One Liner – dirtree alternative
Linux has a cool command called dirtree that gives a more visual representation of your directory structure. If you have the misfortune of working on a Unix variant that doesn’t have it, checkout this cool one liner.
Read moreLinux One Liner – Erasing Stuff
Don’t try this at home unless you understand what it’s going to do. sudo dd if=/dev/zero of=/dev/hda1
Read moreLinux One Liner – Finding Stuff
Let’s say you created a file in your home directory but can’t work out which directory you put it in. <br /> $ find ~ -name somefile.txt<br /> You can replace ~ (tilda) with a directory e.
Read moreLinux One Liner – Parsing long HTML urls
Ever wanted to look at a long HTML URL more easily, say to investigate a parameter. Here is a search from MapQuest. http://www.mapquest.com/maps/map.adp?formtype=address&addtohistory=&address=10%20Market%20St&city=San%20Francisco&state=CA&zipcode=94111%2d4801&country=US&geodiff=1 <br /> $ echo "[insert url here]" | | tr "&?
Read moreLinux One Liner – Security
Here are a few useful one liners for Linux Security. View current packet filtering rules. (i.e. what can and can’t access your computer. <br /> $ iptables -L<br /> On older distros, iptables may not be in place.
Read moreLinux One Liner – Using the manual
For users of Linux regardless of the skill level, using the OS manual is invaluable. Frank gives an example using crontab at Viewing a specific version of a man page , but as with Linux there is always more then one way to skin a cat.
Read moreLinux One Liner – Calculating Used Diskspace
You can easily see the state of diskspace used with the command. <br /> $ df<br /> However, often you want to know where most of the diskspace is being taken.
Read moreNew Category – Linux One Liners
I came across Frank’s blog Programming – Powerful One liners – “What can a one liner do for you?” Great Idea, I often use one line Linux commands and in my current consulting role, I’m being asked more and more Linux questions, which often result in a one Line answer.
Read more