blog

  • GNU – File

    Have you ever wanted to know the type of a file?. You can with the file command. For example, the command:

    file archive.pdf

    will return something like:

    archive.pdf: PDF document, version 1.5

    easy and very helpful. As always, check the man pages for more information.

  • GNU -less

    This is an impressive cli command. It does a simple task: show a file content progressively, that is to say, one page at a time. If the file is big this utility is faster than more because it does not have to load the entire file at once, just the first page. You can acces the rest of the document page by page with its own pager system, as if it was a text reader like vim or emacs. The basic sintax is :

    less "filename"

    You can do a ton of things with this utility. The man documentation shows hundreds of options and posibilities. For instance:

    less "filename" -p "text to start"

    command will allow you to open file «filename» and start showing the content when the text «text to start» is found.

    As always, check the man page for more information and options, but be aware that this utility is huge in terms of posibilities.

  • About e-readers devices

    This text is a litle rant about e-readers. First, I would like to state the pros:

    • Not having to carry my books everywhere is very convenient, I can have my administration/programming/whatever books easily accesible in a single weightless device.
    • Battery last weeks (depends on usage)
    • Able to write notes, which is also very convenient
    • Many models to choose from

    And now the cons:

    • These devices are very expensive. The average price of a e-reader is in the range of 500 euros
    • Many of them need a battery replacement after a couple of years, which I think it is unacceptable. Even worse, these devices usually are glue together so the battery is not serviceable, (basically meaning that after 2or 3 years you have to buy another one).
    • The same thing applies to all the components in the devices, if something brokes…well you get the idea.

    I really like e-readers, but I am not willing to pay ridiculous amounts of money for devices that only last a few years and are unserviceable. For now I will return to the cheapest pen and paper for my notes and carry my books around again.