Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can you print pages from 7 to 17 by lpr?

share|improve this question
up vote 12 down vote accepted
lpr -P myprinter -o page-ranges=7-17

where myprinter is the name of your printer

share|improve this answer
How did you find the information about the flag: - page-ranges=7-17 .? It is not in my manual in Ubuntu. – Masi Dec 2 '09 at 20:03
I just Googled for "lpr page range" - and lo - first result – Sathya Dec 2 '09 at 21:42
i think the command should be -o page-ranges=7-17 not - page-ranges=7-17. can't test since i have no printer, but you don't give your source so i can't look to see if the typo is yours or theirs. – quack quixote Dec 2 '09 at 23:11
@~quack That's correct. Not sure how I missed typing the missing letter. – Sathya Dec 3 '09 at 9:22
Depending on how you installed lpr, -o may or may not work! See here:… and here:… – zebonaut Dec 29 '11 at 22:35

Masi, the command IS documented on your Ubuntu box, in the online-help for CUPS. Visit


to see what I mean.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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