2

I tried to use the command:

open <filename.pdf>

but the message I got was

Couldn't get a file descriptor referring to the console

What can I do?

  • 3
    Are you using SSH to connect to a Mac or running this command on your local machine? Which shell are you using? – grg Aug 13 '18 at 19:20
1

Were you literally typing in the “<“ and “>” characters in that command, or did you mean:

open FILENAME.pdf

Where FILENAME is a place holder variable for potentially any file name?

The redirection characters of < > have special meaning to and get interpreted by the shell and their use as you described might well cause that error message as your command in that case means something akin to ‘make the standard input file descriptor for the open command to be filename.pdf and make its standard output file descriptor to be UNNAMED FILE’

That probably accounts for your error.

F.

0

Use this:

open /Users/yourid/subfolder1/subfolder2/your filename.pdf

This will work because Preview is the default handler for PDF files. If there is no default handler, OR you wish to open with a different app, use the -a option, and spec the handler/app you want to use. And read man open... or just type open on the command line by itself.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .