How to Read OpenOffice / LibreOffice Files from the Command Line

Let’s say you have edited a file in LibreOffice Writer, but later you access your computer remotely via SSH for example. You don’t really want to bother copying the file to your current machine, and rather just quickly check its content in the terminal. Is there a way?

OpenOffice_Terminal
Since odt files are just some zip files containing XML files, you could manually decompress the file, and open XML files, but there is a more convenient the program is called odt2txt. On an Ubuntu / Debian machine it can be installed with:


For basic usage, you just need to pass the filename as parameter:


But there are also a few more options:

This also wrote with ods (spreadsheets) and odp (presentations) files with ods2txt and odp2txt which are just symlinks pointing to the same program as odt2txt, namely odt2txt.odt2txt.

Support CNX Software - Donate via PayPal or cryptocurrencies, become a Patron on Patreon, or buy review samples
Advertisements
Subscribe
Notify of
guest
2 Comments
oldest
newest most voted
Advertisements