Cool command of the week... "head"
Head reads part of a file, this an be done by lines, or by bytes. It's faster by bytes, for obvious disk IO reasons, but line numbers will probably be more useful in most cases anyway.
Here's a sample....
head -n 99000000 mozdl.tsv | tail -n 1;
-n 99000000 tells the machine to read from the 99 millionth line of mozdl.tsv
| tail -n 1 tells the machine how many lines to output from where it began... one
I find myself using this command a lot, especially with bytes to jump around a file to sample data without having to expend cycles processing \n characters.
Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts
Wednesday, July 15, 2009
Moving from Vista to Linux
I decided to install Ubuntu Jaunty on my main dev machine to see what the 3D Compiz desktop was like compared to my laptop. Before this I have only run Linux as a firewall (Smooth Linux), as a server (Ununtu Server) and Ubuntu on my Laptops to read emails and listen to the radio while out on contracts.
Well... it's been almost a week now, and I have not booted into Windows since. Why not? Well... as it turns out... all the software I frequent (Blender3D, Processing, Apache Server) run faster, crash less and use the memory FAR more efficiently.
This was not what I expected, but none-the-less, a pleasant surprise.
An added bonus is the command-line interface, which has rich functionality like email, curl, grep, regex right at your finger tips. In Windows I have to install software to complete these tasks.
I find myself using the command line all the time, which is great, because my poor arm is sore in the evenings from using the mouse all day. Oh... and the circular 3D desktop is awesome!!! :)
Well... it's been almost a week now, and I have not booted into Windows since. Why not? Well... as it turns out... all the software I frequent (Blender3D, Processing, Apache Server) run faster, crash less and use the memory FAR more efficiently.
This was not what I expected, but none-the-less, a pleasant surprise.
An added bonus is the command-line interface, which has rich functionality like email, curl, grep, regex right at your finger tips. In Windows I have to install software to complete these tasks.
I find myself using the command line all the time, which is great, because my poor arm is sore in the evenings from using the mouse all day. Oh... and the circular 3D desktop is awesome!!! :)
Subscribe to:
Posts (Atom)