9

I'm have a file called t-0.8.eps.

How can I open this file in the shell?

I am using Mac and when I click .eps files the preview (the name of the software to read PDFs) says failed.

12

In general, you can use open from the terminal to open any file with its default application (see this SO question). open is Mac OS-specific. On GNU/Linux, the equivalent is usually xdg-open.

Also, for your reference, you can try to find out what type of file a file really is (regardless of its extension) using the file command.

  • I typed to terminal ...$ file t-0.8.eps and it says t-0.8.eps: empty – Meva Jan 30 '14 at 15:32
  • @Meva This means just what it says: this is an empty file. It seems it was created incorrectly. – Joseph R. Jan 30 '14 at 15:32
  • Won't open do exactly the same thing as double clicking the file (which is what the OP did)? – terdon Jan 30 '14 at 15:59
  • @terdon It will. That's exactly the point. The way I read the question, the OP is looking for a way to open files from a terminal the same way they are opened with a double-click. In any case, the actual issue seems to be that the .eps file is incorrectly created (see the OP's comment) – Joseph R. Jan 30 '14 at 16:03
  • @JosephR. yeah, I know, I reached the same conclusion in the comments to my answer. But the OP states that they already tried clicking and preview failed, so open will make no difference. – terdon Jan 30 '14 at 16:05
6

Files with the .eps extension are usually encapsulated postscript. You can view them with gv:

gv t-0.8.eps

Or with your favorite PDF viewer:

evince t-0.8.eps

Or even with an image editor

gimp t-0.8.eps
  • Gimp says : Opening '/....../Documents/Gerris Programs/Tutorials/rayleigh-taylor/t-0.8.eps' failed: Unknown file type And I have no evince or gv? – Meva Jan 30 '14 at 14:42
  • 1
    @Meva what operating system are you using? If Linux, which distribution? If Debian/Ubuntu/Mint etc, just run sudo apt-get install gv or sudo apt-get install evince. Anyway, you should have a pdf viewer installed, try okular. If none of these work, please update your question with the output of file t-0.8.eps. – terdon Jan 30 '14 at 14:51
  • mac 10.9.1 I am using.I have preview to read pdf files but when I click eps files preview says failed.. – Meva Jan 30 '14 at 15:23
  • 1
    @Meva please always include your OS in your questions. Also, show me the output of file t-0.8.eps as I requested. Apart from that, you could try macghostview available for OSX – terdon Jan 30 '14 at 15:25
  • 1
    @Meva there you go then, that's the problem. The file is empty which is why it can't be read. – terdon Jan 30 '14 at 15:52
0

Inkscape can open and edit eps files. It won't fix an empty file though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.