CUPS – printer in a stopped state

CUPS introduced an Error Policy which puts the CUPS printer into a stopped state when physical printers experiences an error, such as, paper jam, out of paper, paper tray open, etc. The CUPS printer does not change to an idle or ready state even after the physical problem is resolved, and the reason for this is not to drop print jobs or to send them to a printer that is not responding. The administrator must go to CUPS Web Administration or a command line to change the printer out of the stopped state. To prevent this situation change the CUPS ErrorPolicy to retry-job:

1. Enter this command at a terminal session while logged in as root:

root# /usr/sbin/lpadmin -p -o printer-error-policy=retry-job

2. Per printer – open the /etc/cups/printers.conf and find the printer that you wish to modify, and chang the ErrorPolicy entry from stop-printer to retry-job

<Printer "PrinterName">
...
ErrorPolicy retry-job

3. Globally change – open the /etc/cups/cupsd.conf and look for ErrorPolicy, if you find it, change the entry from stop-printer to retry-job.
If you do not find that entry, add the following at the end of the file:

ErrorPolicy retry-job

Or use the script below with a cron, which will automatically enables printers on a CUPS printing server:

#!/bin/sh
#
# Check if the printers are disabled and enable them.

DISABLED=`lpstat -t | grep disabled | awk ‘{ print $2 }’`

for PRINTER in $DISABLED
do
logger “Printer $PRINTER is stopped”
cupsenable -h 127.0.0.1:631 $PRINTER && logger “Printer $PRINTER has been enabled.”
done

Add the shared mailbox so it displays under your primary mailbox in Outlook Web App.

Add the shared mailbox so it displays under your primary mailbox in Outlook Web App.
This method is recommended if you want to monitor the email from your primary mailbox and the shared mailbox at the same time. In addition, after you complete this task, the shared mailbox and its folders are displayed in the left navigation pane each time you open Outlook Web App.

1. Sign in to your account in Outlook Web App.
2. Right-click your primary mailbox in the left navigation pane, and then choose add shared folder.
3. In the add shared folder dialog box, type the name or email address of the shared mailbox, and then click add.

The shared mailbox displays in your Folder list in Outlook Web App. You can expand or collapse the shared mailbox folders as you can with your primary mailbox. You also can remove the shared mailbox from your Folder list. To remove it, right-click the shared mailbox, and then click delete.

Or open the shared mailbox in a separate browser window.

1. Sign in to your account in Outlook Web App.
2. On the Outlook Web App nav bar, click on your name. A list appears.
3. Click Open another mailbox.

Type the email address of the other mailbox that you want to open. Another Outlook Web App session opens in a separate window, allowing access to the other mailbox.

List files which does not contain a string

root# grep -rL "string"

Explanation:
-r makes grep recursively
-L only output a filename when it does not contain “string”

Example:
[greg@localhost test123]$ ls -la
total 20
drwxrwxr-x. 2 greg greg 4096 Jun 2 11:31 .
drwx——. 18 greg greg 4096 Jun 2 11:30 ..
-rw-rw-r–. 1 greg greg 4 Jun 2 11:31 aaa.text
-rw-rw-r–. 1 greg greg 4 Jun 2 11:31 bbb.text
-rw-rw-r–. 1 greg greg 4 Jun 2 11:31 ccc.text
[greg@localhost test123]$ cat *
123
213
212
[greg@localhost test123]$

greg@localhost test123]$ grep -rL “123”
ccc.text
bbb.text
[greg@localhost test123]$

comm – compare two sorted files line by line.

Usage: comm [OPTION]… FILE1 FILE2
Compare sorted files FILE1 and FILE2 line by line.

With no options, produce three-column output. Column one contains
lines unique to FILE1, column two contains lines unique to FILE2,
and column three contains lines common to both files.

-1 suppress column 1 (lines unique to FILE1)
-2 suppress column 2 (lines unique to FILE2)
-3 suppress column 3 (lines that appear in both files)

–check-order check that the input is correctly sorted, even
if all input lines are pairable
–nocheck-order do not check that the input is correctly sorted
–output-delimiter=STR separate columns with STR
–help display this help and exit
–version output version information and exit

Note, comparisons honor the rules specified by ‘LC_COLLATE’.

Examples:
comm -12 file1 file2 Print only lines present in both file1 and file2.
comm -3 file1 file2 Print lines in file1 not in file2, and vice versa.

GNU coreutils online help:
Full documentation at:
or available locally via: info ‘(coreutils) comm invocation’