2 tools to view files from the terminal


Surely, after reading the title of this article you are thinking about tools like concatenator or cat, to visualize the content of plain text files, or also in tools as practical as less and more that allow us to visualize the content in a more controlled way when it is of a considerable size and we want to paginate it and move through it. a simple way from the command line.

Perhaps you are also thinking about editors such as vi, vim, gedit, nano, etc., but we are not referring to these types of tools either, but to two specific tools that will be very helpful when it comes to view the content of files from the command line, without using graphical tools. They are not really everyday tools, and they are not really used to visualize content, but we will make them serve for this ...

I am referring to AntiWord and odt2txt. Yes, two tools that really do is convert between formats. The first is to convert Microsoft Word documents such as .doc or .docx to plain text files, although you can also convert them to PDF or even PostScript, the latter being very practical for working with certain printers. The second is a program to convert from .odt, that open document format, to .txt.

And how can we make these tools, apart from convert, they also show us the result on the screen when we work in the terminal, so very simple: pipes and less or more. So we can see the content in addition to the conversion, channeling the output of the command towards less or more:

odt2txt nombre_documento.odt | less

antiword nombre_documento.docx | more

You can use less or more indifferently in one or the other. Depending on whether you are more interested in the output that provides less or the one that provides more. Obviously, you must have these two packages installed on your distro ...

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published.



  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.