I'm trying to solve a printer issue and I'm attemting to send a text file via Ghostscript to a locally attached USB printer. To do this, I need the device name (/dev/<someidentifer>). How do I determine what that device identifier is?

The command I'm trying to issue is:

cat file.txt | gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE -sDEVICE=gdi \
-sPAPERSIZE=letter -r600 -sOutputFile=- - | cat /dev/**SOMEUSBIDENTIFER**

How can I find out what /dev/**SOMEUSBIDENTIFER** is?

Please note: I'm looking for the procedure to determine this as I don't have the actual printer to test. All my current printers are networked and the last time I dealt with locally attached printers, parallel ports (Centronics) were all the rage (/dev/lp0).

  • Can't you just use lpr? Also apple.stackexchange.com/questions/404894/… might give a clue. – nohillside Oct 23 at 5:51
  • Yes, but I’m trying to do this via gs – Allan Oct 23 at 16:07
  • I was more thinking about piping gs into lpr -o raw. – nohillside Oct 23 at 17:54
  • 1
    We don’t know if the printer works or if the Foomatic filter and PPD functions correctly so I need to do this directly to the device. lp Doesn’t send the job to the printer. It fails every time. I’m trying To force it to use the driver that’s supposed to work. – Allan Oct 23 at 20:21
  • Are you sure USB printers manifest in the filesystem at all? – bmike Oct 25 at 19:50

You must log in to answer this question.

Browse other questions tagged .