11

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.

0

3 Answers 3

12

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
7
  • Gimp says : Opening '/....../Documents/Gerris Programs/Tutorials/rayleigh-taylor/t-0.8.eps' failed: Unknown file type And I have no evince or gv? Commented Jan 30, 2014 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. Commented Jan 30, 2014 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.. Commented Jan 30, 2014 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 Commented Jan 30, 2014 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. Commented Jan 30, 2014 at 15:52
11

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.

6
  • I typed to terminal ...$ file t-0.8.eps and it says t-0.8.eps: empty Commented Jan 30, 2014 at 15:32
  • @Meva This means just what it says: this is an empty file. It seems it was created incorrectly. Commented Jan 30, 2014 at 15:32
  • Won't open do exactly the same thing as double clicking the file (which is what the OP did)? Commented Jan 30, 2014 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) Commented Jan 30, 2014 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. Commented Jan 30, 2014 at 16:05
1

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.