In Linux operating system environment ________ command is used to print a file.
lpr
In the Linux operating system, managing files and interacting with system peripherals like printers is typically done through command-line interface tools. The question asks about the specific command used for sending a file to a printer.
Let's examine the provided options in the context of Linux commands:
Based on the standard utilities available in most Linux environments for sending files to a printer, the correct command is lpr.
The lpr command typically works by adding files to the print queue. For example, to print a file named document.txt, you would use the command:
lpr document.txt
You can often specify the printer using the -P option:
lpr -P printer_name document.txt
Therefore, the command specifically designed for printing a file by sending it to the print spooler in Linux is lpr.
| Command | Primary Function | Relevance to Printing |
|---|---|---|
| lpr | Sends files to the print spooler/queue. | Directly used for printing files. |
| pr | Formats/paginates files for printing. | Used to prepare files before sending them to a printer (often with lpr). |
| lpq | Checks the status of the print queue. | Related command for managing print jobs. |
| lprm | Removes jobs from the print queue. | Related command for managing print jobs. |
Modern Linux distributions widely use the Common Unix Printing System (CUPS). CUPS is modular and relies on a set of commands and configuration files to manage printing services. The lpr command is one of the primary user-facing commands provided by CUPS for initiating print jobs. Other commands like lpq (list print queue), lprm (remove print jobs), and lpstat (print status information) are also part of the CUPS suite, offering comprehensive control over the printing process from the command line.
Understanding these commands is essential for effective command-line management of printing in a Linux environment.
A mechanism for arranging controlled access to a shared resource, like a file, is called:
Which UNIX/Linux command is used to make all files and sub-directories in the directory “progs” executable by all users?
Consider the following statements :
(a) UNIX provides three types of permissions
Read
Write
Execute
(b) UNIX provides three sets of permissions
permission for owner
permission for group
permission for others
Which of the above statement/s is/are true ?
Match the following WINDOWS system calls and UNIX system calls with reference to process control and File manipulation.
Windows | UNIX |
A. Create-process( ) | I. Open( ) |
B. WaitForSingleObject( ) | II. Close( ) |
C. CreateFile( ) | III. Fork( ) |
D. CloseHandle( ) | IV. Wait( ) |
File manipulation operations in an operating system include: