LPC(8)

๐Ÿ’– LPC(8) โ€” the line printer control program, bestie edition ๐Ÿ’–

System Manager's Manual ยท LPC(8) ยท ok so this is the lpc page and we're gonna get through it together ๐Ÿซถ


โœจ NAME โœจ

lpc โ€” line printer control program ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

lpc [command [argument ...]]

๐ŸŽ€ DESCRIPTION ๐ŸŽ€

okay so lpc is the thing the system administrator uses to run the whole line printer situation. no cap. for every single line printer you've got configured in /etc/printcap, lpc can do all of this:

  • disable or enable a printer,
  • disable or enable a printer's spooling queue,
  • rearrange the order of jobs in a spooling queue,
  • find the status of printers, and their associated spooling queues and printer daemons.

so iconic honestly.

If you run it with no arguments at all, lpc will just sit there and prompt you for commands from the standard input. main character energy. but if you do pass arguments, lpc treats the first one as a command and the rest as parameters for that command. and yes bestie, the standard input can be redirected, which makes lpc read its commands from a file. very demure, very mindful.

Commands can be abbreviated! (short queen behavior ๐ŸŽ€) here's the full list of recognized commands:

  • ? [command ...]
  • help [command ...] โ€” Print a short description of each command specified in the argument list. or, if you gave it no argument at all, it just prints the list of the recognized commands. it's giving built-in cheat sheet โœจ
  • abort { all | printer } โ€” Immediately terminate an active spooling daemon on the local host, and then disable printing for the specified printers. disabling printing is what stops new daemons from being started by lpr(1). so yeah, it's a hard stop ๐Ÿ˜ญ
  • clean { all | printer } โ€” Remove any temporary files, data files, and control files that cannot be printed (i.e., ones that don't form a complete printer job) from the specified printer queue(s) on the local machine. cleaning out the leftovers, periodt ๐Ÿงš
  • disable { all | printer } โ€” Turn the specified printer queues off. This prevents new printer jobs from being entered into the queue by lpr(1). ๐Ÿšซ
  • down { all | printer } message [...] โ€” Turn the specified printer queue off, disable printing, and put message in the printer status file. the message does not need to be quoted โ€” the remaining arguments are treated like echo(1). this is normally used to take a printer down and let users know why. lpq(1) will indicate the printer is down and print the status message. communicating, bestie ๐Ÿ’ฌ
  • enable { all | printer } โ€” Enable spooling on the local queue for the listed printers. This will allow lpr(1) to put new jobs in the spool queue. we love a comeback story ๐ŸŒˆ
  • exit
  • quit โ€” Exit from lpc. bye bestie ๐Ÿ‘‹
  • restart { all | printer } โ€” Attempt to start a new printer daemon. This is useful when some abnormal condition causes the daemon to die unexpectedly, leaving jobs in the queue. lpq(1) will report that there is no daemon present when this condition occurs. And if the user is the superuser, it tries to abort the current daemon first (i.e., kill and restart a stuck daemon). glow-up via violence ๐Ÿ’€
  • start { all | printer } โ€” Enable printing and start a spooling daemon for the listed printers. ๐Ÿš€
  • status { all | printer } โ€” Display the status of daemons and queues on the local machine. the vibe check ๐Ÿ‘‘
  • stop { all | printer } โ€” Stop a spooling daemon after the current job completes and disable printing. finishing the sentence first, so polite ๐ŸŽ€
  • topq printer [ jobnum ... ] [ user ... ] โ€” Place the jobs in the order listed at the top of the printer queue. queue-jumping but make it authorized ๐Ÿ’…
  • up { all | printer } โ€” Enable everything and start a new printer daemon. Undoes the effects of down. the redemption arc โœจ

๐Ÿฆ‹ FILES ๐Ÿฆ‹

  • /etc/printcap โ€” printer description file
  • /var/spool/output/* โ€” spool directories
  • /var/spool/output/*/lock โ€” lock file for queue control

๐Ÿ”ฅ DIAGNOSTICS ๐Ÿ”ฅ

  • ?Ambiguous command โ€” Abbreviation matches more than one command. can't decide? then no. ๐Ÿ˜ญ
  • ?Invalid command โ€” No match was found. literally nothing. ๐Ÿ’€
  • ?Privileged command โ€” You must be a member of group โ€œoperatorโ€ or user โ€œrootโ€ to execute this command. sorry bestie, this one's above your pay grade ๐Ÿšซ๐Ÿ‘‘

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

lpq(1), lpr(1), lprm(1), printcap(5), lpd(8)


๐Ÿ’œ HISTORY ๐Ÿ’œ

The lpc command appeared in 4.2BSD. an elder. a legend. we stan a historical icon ๐Ÿซถ


and that's the whole page, bestie!! this one came from Debian and it's dated May 31, 2007 โ€” yeah she's vintage, but she still ate ๐Ÿ’…โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from