Friday, May 3, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 9210  / 1 Year ago, sun, february 5, 2023, 10:49:26

I am new to linux and am trying to get to know the command line and I got to the cat command and am having trouble with an error message. I am not quite sure what is happening here. Every time I type cat to open a file I get cat: abod: No such file or directory. I am trying to open a file from LibreOffice using "cat blog.odt" Any body knows what I am doing wrong?


More From » command-line

 Answers
0

You must either be "in" the directory of the file, or use the full path to the file when trying to cat it. Also cat does not open a file in libre office, unless there are some special options I am not aware of, all it will do is dump the contents of the file out onto the console. You can also use cat to add lines of text into a file but that is not what you are trying to do either.

Most likely you can just type libreoffice /home/$USER/path/to/blog.odt and that will open the file in libreoffice. Note that $USER needs to be replaced with your name if it is not set as an environment variable. And /path/to/blog.odt needs to be the path from your home folder, not your desktop, to where ever blog.odt is.

For example if it was in a folder called "blog_stuff" on your Desktop, and your username was bob, the command would look like libreoffice /home/bob/Desktop/blog_stuff/blog.odt

Let tab completion become your friend in this, that is hitting tab twice while typing a path, it will either auto complete or show you the list of possibilities that match what you have typed so far.


[#29096] Sunday, February 5, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
inglehare

Total Points: 330
Total Questions: 111
Total Answers: 95

Location: Sint Maarten
Member since Tue, Mar 29, 2022
2 Years ago
;