Ask Your Question

how to display PDF files on CDrom in the command line.

asked 2012-08-22 11:07:23 -0500

yotaz gravatar image

updated 2014-09-30 21:46:39 -0500

mether gravatar image

I have this output from the terminal:

[yo2@2manarmy 20090406_085448]$ cd /run/media/yo2/20090406_085448
[yo2@2manarmy 20090406_085448]$ ls -la
total 4
dr-x------. 1 yo2  yo2  2048 Apr  6  2009 .
drwxr-x---+ 3 root root   60 Aug 22 11:13 ..
dr-x------. 1 yo2  yo2  2048 Apr  6  2009 Hawk Code

Inside of the Hawk Code there are 8 pdf files how can I get them list and look at them from the terminal? I tried to grep them but it is not possible.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-08-22 12:21:39 -0500

hhlp gravatar image

updated 2012-08-23 06:19:53 -0500

Change to specific directory :

cd "Hawk Code"

List all pdf files :

ls -la

Look them in terminal :

If you are using Gnome desktop...

Open a shell prompt and type the command:

evince file.pdf

If you are using KDE desktop...

Open a shell prompt and type the command:

okular file.pdf

Console pdf viewer

As far as I know there is no console based PDF viewer exists. But you can use the following trick to open a PDF file:

a) install pdftohtml - A command-line tool for converting pdf-files into html and other formats.

The idea is very simple you will use a pdftohtml program to convert a PDF file into html, xml and png images and then display them using text browser such lynx. This is useful when you works on remote server or if GUI is not available:

For example to convert FILE.PDF file you need to type the following set of commands:

pdftohtml file.PDF
lynx file.html

b) You can also convert a PDF file to text file using following command:

pdftotext file.pdf
vi file.txt

note : pdftohtml or pdftotext need to be install there aren't in the fedora repo so you need to compile by yourself...

edit flag offensive delete link more

Question Tools


Asked: 2012-08-22 11:07:23 -0500

Seen: 443 times

Last updated: Aug 23 '12