Cancel all print jobs via command line

Hi there,
I'm trying to write a logout hook that cancels all existing print jobs on my client machines.
From the man pages of lprm I believe it should be:
lprm -
But when I run this as root I get the following returned:
lprm: The printer-uri attribute is required!
I used to run this using Apple Remote Desktop under 10.4 and it worked fine, it doesn't work now either remotely or as admin on the client itself.
Have things changed under Leopard?

Hi
+*". . . Have things changed under Leopard? . . ."*+
Absolutely. Did you have any doubts? For example apropos has disappeared yet the man page is still there. Its not the only thing that has disappeared. Clearly nicl had to go because of NetInfo's demise. These are just some of the differences I've found. No doubt there will be others?
You could look at the man pages for cancel and lp. They appear to be the same thing. Might be up to what you want?
Tony

Similar Messages

  • How do I cancel a rman job from command line?

    Hello to all,
    I am having some problems with a rman job that is running via OEM-GC. I get an error message regading the SPFILE and control file being locked due to another job accessing it. I found this in the RMAN ref guide:
    To determine which job is holding the conflicting enqueue:
    1. After you see the first RMAN-08512: waiting for snapshot controlfile enqueue message, start a new SQL*Plus session on the target database:
    % sqlplus sys/sys_pwd@prod1
    2. Execute the following query to determine which job is causing the wait:
    SELECT s.sid, username AS "User", program, module, action, logon_time "Logon", l.*
    FROM v$session s, v$enqueue_lock l
    WHERE l.sid = s.sid and l.type = 'CF' AND l.id1 = 0 and l.id2 = 2;
    You should see output similar to the following (the output in this example has been truncated):
    SID User Program Module Action Logon
    9 SYS rman@h13 (TNS V1-V3) backup full datafile: c1 0000210 STARTED 21-JUN-99
    Solution
    After you have determined which job is creating the enqueue, you can do one of the following:
    * Wait until the job creating the enqueue completes
    * Cancel the current job and restart it once the job creating the enqueue completes
    * Cancel the job creating the enqueue
    So with this in mind; How do I cancel the job from RMAN command line!!!
    This is my output by the way:
    SID User PROGRAM MODULE ACTION Logon ADDR KADDR SID TY ID1 ID2 LMODE REQUEST CTIME BLOCK
    475 SYS [email protected] (TNS V1-V3) backup full datafile 0000018 STARTED16 23-APR-09 00000023EB8D488 000000023EB8D4A8
    475 CF 0 2 4 0 113123 0
    Any help will be gratefully received
    Thanks to all that reply

    I used the following to get the spid and killed the process on the OS.
    set linesize 120
    col sid for 999
    col username for a14 trunc
    col osuser for a18 trunc
    col spid for 99990
    col logon_time for a12
    col status for a9 trunc
    col machine for a26 trunc
    col running for a10 trunc
    select s.sid
    , s.username
    , s.osuser
    , s.machine
    , s.status
    , p.spid spid
    , to_char( logon_time, 'Mon dd@hh24:mi') logon_time
    , rtrim (s.module)||decode( nvl(length( rtrim(s.module)),0),0,'',' ')|| upper(s.program) running
    from v$session s
    , v$process p
    where ( p.addr = s.paddr ) and s.type!='BACKGROUND'
    and upper(s.program) not like '%CJQ0%' and s.program is not null and s.username is not null
    order by s.sid;

  • HPpsc 1215 all in one printer and cannot cancel all print jobs whatever I do.

    One of the jobs just says it is deleting but it cannot seem to get rid of the job, which is holding everything else up.  I have tried everything I can think of to clear it.  Any ideas will be gratefully received.
    This question was solved.
    View Solution.

    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00095908&lc=en&dlc=en&cc=us&product=412187
    tecnical support for hp printing

  • How do I cancel a print job from my computer to my HP Photosmart 7510. Touchscreen is unavailable.

    HP Photosmart 7510 All-in-One CQ877a Model C3112; Operating system Windows Vista 64-bit.
    Can't find how to easily cancel a print job. The touch screen is unavailable during the printing process (just shows the HP icon spinning around during the print process). There isn't a "cancel" button or touch area to cancel. We're wasting ink and paper by not being able to cancel jobs easily. Read the 24-page manual and it doesn't mention it. Looked on line for an answer, can't seem to locate one. Can always go to Start, Printers, and select the printer and then cancel from within there, but by then, the job is finished.

    There should be a cancel button (X) on the printer. Check out the pic below taken from page 7 of the User manual for your printer:
    http://goo.gl/mW7Fy
    Alternately, instead of going the Start button route, did you check out the Final tip at the bottom of the article?
    "Final Tip (Shortcut)
    Before using the method above to open the print queue, look for the printer icon in the notification area. If you see it, double-click it to bring up the print queue. "
    If I have helped in any way, just click the Kudos star on the left. Also, if your issue has been resolved, don't forget to select Accept as Solution

  • Upgrading from 10.5 to 10.6 via command line

    Hi all:
    Can anybody tell me what package(s) should be installed when upgrading a 10.5 server to 10.6? I don't need any of the language kits or printer drivers or X11, just the basic install option. I'd like to install the packages via command line, but there are a few that look relevant and I'm not sure which ones to install.
    These look promising:
    MacOSXServerInstall.mpkg
    MacOSXServerInstall.pkg
    OSInstall.mpkg
    OSInstall.pkg
    OSUpgrade.pkg
    Thanks,
    Brewster

    Looks like I can just ARD into the machine while booted from the DVD, so this is moot. :P

  • How to merge multiple documents via command line (Adobe Acrobat Pro 9.3.2)?

    I'm searching solutions to merge multiple documents (all stored in one folder) via command line or batch file to a single PDF-File...
    Is there a way to do this?
    Finaly I want to control this from a application written in MS-Access. So, perhaps there are some features already integrated in Access to do this?
    Thanks for answer!

    If you have some programming experience you could probably do this using VBA from within MS Access to control Acrobat via OLE.
    Lots of examples on the Web.
    Hope this helps

  • Adobe Reader 11 (XI) won't open file via command line

    Hello,
    I have posted this question to probably inapropriate topic earlier today, so I am repeating it again.
    I installed newest Adobe Reader XI today and when I tried to open certain pdf file via command line, it reported a syntax error. Now, this syntax worked so far on versions 9 and 10  (I checked today with them and it is working), so my question is - where can I find new syntax, if there is any? Googling didn't help. Or what else could wrong?
    In previous versions I was able to open pdf file (on page 5) like this (all was taken from Help file "Open parameters")
    "CompletePathToAdobeReader"/A"page=5""CompletePathToPDF",
    ie
    "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"/A"page=5""d:\V2\DataSheet.pdf"
    but now - not that it doesn't open specific page, but it doesn't want to open file at all.
    edit:
    Operating systems running: Windows 7, Windows XP
    Thank you.
    Message was edited by: v604

    Yes, it reported correctly becuase there is a syntax error in your command. Try spaces between the /A switch and open parameter. Try this:
    "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /A "page=5" "d:\V2\DataSheet.pdf"
    Hope this helps.
    -Sumit

  • How to call a ODI Job using Command line?

    Hello All,
    Please help me on this..
    How to call an ODI Job using Command line?
    Thanks
    Ravikiran

    Generate a scenario of your package. Then go to <ODI_HOME>/oracledi/agent/bin in command prompt and invoke startscen command .
    startcmd.sh OdiStartScen -SCEN_NAME=scn_load_data -SCEN_VERSION=001 -CONTEXT=GLOBAL -AGENT_CODE=odiSchedAgent001
    Bhabani
    http://dwteam.in

  • Setting IIS W3C Extended Log File settings via command line, registry or configuration file

    I am currently in need of a way to set IIS W3C Extended Log File settings via command line, registry or configuration file.  More specifically the 'Bytes Sent (sc-bytes)' and 'Bytes Received (cs-bytes)' settings that are not enabled by default. 
    If anyone knows where I can locate these setting (outside of the GUI) for all IIS versions that would be greatly appreciated.

    I believe I have found a valid solution. You must have the WebAdministration module loaded.  I hope this helps someone.
    Use the following syntax to view current W3C fields:
    Get-WebConfiguration -filter system.applicationhost/sites/sitedefaults/logfile | select-object -expandProperty logExtFileFlags
    Use the following syntax to set W3C fields:
    Set-WebConfigurationProperty -Filter System.Applicationhost/Sites/SiteDefaults/logfile -Name LogExtFileFlags -Value "Date,Time,ClientIP,UserName,SiteName,ComputerName,ServerIP,Method,UriStem,UriQuery,HttpStatus,Win32Status,BytesSent,BytesRecv,TimeTaken,ServerPort,UserAgent,Cookie,Referer,ProtocolVersion,Host,HttpSubStatus"}

  • Print queue hangs up when I cancel any print job

    I'm using my Photosmart All-in-One C309 printer wirelessly. It prints fine until I need to cancel a print job. As soon as I cancel any job that's currently printing (either in the software or by pressing the cancel button on the printer) the print queue hangs up and the job that I tried to cancel just sits there saying it is being deleted but it doesn't go away and it stops me printing anything else.
    I've discovered a way to clear the stuck job and get the printer going again (using the Troubleshoot option under Devices and Printers) but surely I should be able to cancel a print job without jamming up the queue completely?
    I've had the printer for a year now and it's always had this problem.
    This question was solved.
    View Solution.

    Have you tried to delete and re-add the printer?
    Delete the printer (select it and hit the delete key on your keyboard).  Re-add it this way:
    1. Make sure the printer is turned on and connected to your network. Verify that you can access the printer's internal web page by browsing to its IP address before continuing.
    2. Click >> Start >> Control panel >> Printers.
    3. Click the Add a printer
    4. Select Local printer
    5. Select Create a new port and select Standard TCP/IP Port and click Next button.
    6. Under Device type, select TCP/IP Device. Under Hostname or IP address, enter the printer's host name (found on the printer's network configuration report the generated above). Click Next.
    If you get a message about Additional Port Information Required, then the printer was not found using the host name. You can go back and retry or using the printer's IP address instead of the host name.
    7. Select Hewlett-Packard from the list of manufacturers and select and select your printer model. Click Next.
    If your printer model was not listed, then select Have Disk, browse the HP CD that came with your printer and select the first file that starts with hp and ends with inf. Click Open then OK. Select your printer model. Click Next.
    8. If you are asked, use the currently installed driver.
    9. It will ask for the Printer name -- enter a new name or use the existing one. This will be the name of the printer that you select from other applications.
    10. You may be asked to share the printer. Make a choice and click Next.
    11. The Print Test Page box appears. Go ahead and print it.
    12. Click Finish.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • How do I remove Lotus Notes PDFMaker plugin via command line?

    How do I remove the lotus notes PDFMaker plugin via command line?  I originally deployed Adobe Acrobat 10 as a complete install to many computers.  I see how to remove this specific feature through the GUI in Windows 7 by going to control panel / programs and features / Adobe Acrobat X / change / modify / create adobe PDF / acrobat PDFMaker / Lotus Notes, but this would be a tedious task to do manually at each computer.  I've experimented with a few msiexec commands after removing Acrobat such as:
    msiexec /i "\\path to msi" remove=pdfmakerforlotusnotes
    msiexec /i "\\path to msi" disable_pdfmaker=yes
    Both still install acrobat as a complete install.  Any help and suggestions would be appreciated.  Thank you!

    Thank you Sabian, that did the trick.  Here is the command line I used for anyone else having a similar issue:
    msiexec /i "\\path to msi" REMOVE=PDFMakerForLotusNotes /qn
    I did this on a test machine with a complete Acrobat installed.  I ran the above command and it removed the Lotus Notes PDFMaker plugin.  I should also note that it didn't downgrade my version of Acrobat and all of my custom settings within the application are still there.

  • [SOLVED] How to Create an Image from UTF8 Text via Command-line

    As the title points out, I'm trying to create an image from unicode text via command line. I tried...
    convert -pointsize 48 -size 400 caption:测试用 text.png
    But that results in question marks for the Chinese characters. So searching around online I discovered that I needed to specify a font which could display the characters. The characters show up just fine in Firefox, KDE, Kate, Terminal, etc so I know I have a font which can render them. I thought it might be DejaVu but this also resulted in question marks...
    convert -font /usr/share/fonts/TTF/DejaVuSerif.ttf -pointsize 48 -size 400 caption:测试用 text.png
    Any ideas?
    Last edited by tony5429 (2011-01-31 23:17:41)

    DejaVu doesn't contain those Chinese glyphs at all, so please don't blame ImageMagick for not rendering them.
    So, Firefox, Kate, Terminal and the others you stated to use DejaVu, if encounter these characters, fall back to some other fonts to render them. These fonts are, however, not vector, but bitmap fonts. (This can be seen if you increase text size (Ctrl++ in Firefox): the Chinese characters don't change, they remain of their inherent size.)
    Actually, e.g. /usr/share/fonts/misc/18x18ko.pcf.gz definitely contains the three example characters, so the mentioned apps may use this font as fall back.
    Apparently ImageMagick doesn't handle bitmap fonts (I'm not sure), so you won't be able to hit your original target. Anyway, since you tried to parse "-pointsize 48", you wouldn't be satisfied with the font size.
    Your only choice seems to be using the above mentioned CJK-approved TTFs.
    EDIT: typo
    Last edited by barto (2011-01-28 21:52:33)

  • Running reports via command-line with /batch option

    Hi,
    I have created a batch file which runs, and exports the results of 7 different discoverer reports with /batch option.
    Contents of batch file:
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input1.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input2.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input3.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input4.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input5.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input6.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input7.txt"
    Sample of a cmd file the bacth file runs:....
    /connect user/password@oraprd /apps_responsibility "BIS Super User"
    /open "H:\Projects\DRP Import Modelling\Dev\Intransit Extract.dis"
    /sheet 1 /export xls "H:\Projects\DRP Import Modelling\automation\Intransit Input.xls" /batch
    The batch file runs ok and processes each report in sequence, and creates the excel export one after the other.
    However, I need to process the 7 reports in parallel, so changed the batch file to process in own thread :
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input1.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input2.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input3.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input4.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input5.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input6.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input7.txt"
    The reports kick off at the same time and I can see 7 dis4usr.exe processes running via task manager
    Problem:
    The first reports runs and exports ok.
    All the others dis4usr.exe processing stops with the following error pop-up:
    ! Could not open file. OK
    Question:
    Can you only process reports sequentially via command line mode with /batch option?
    If not...what am I missing...its driving me insane :)
    All asistance is greatly appreciated. Thanks

    Ladies and gentlemen.....I have solved my problemo!
    The reason why the rest of the reports were getting the 'could not open file.' error was due to the fact that each discoverer instance launched was
    trying to access the same standard log file simultaneously.
    I modified each cmd file to write logging info to individual files: eg
    /logfile "H:\Projects\DRP Import Modelling\Automation\input2_log.txt"
    Now that's there's no contention with logging, the reports are firing off beautifully in parallel :)
    I am definitely having a beer this evening!
    Thanks for everyone's input...kept me on the righteous path :)

  • Submit --Title via command line.

    So I'm submitting files via command line. All is working well but I need to set the Title and description on the fly from a script. so I'm attempting to use the --title and --description options. But the submission fails when I do. Anybody out there make this work on 10.6.4? Example below.
    podcast -s my.server.com -u user -p password --submit --file /path/to/file --workflow "Workflowname" --title "my new podcast --description "This is the Description"

    Well that's a start
    Looking at man podcast, there is not any '--title' or '--description' options on the command line, which could explain why they don't work
    It looks like podcast expects this data to be passed in via a metadata .plist file.
    Here's the example from man podcast:
    podcast --server myserver.example.com --user username --pass password
    --submit --file /path/to/file --workflow 'Workflow1' --metadata
    /path/to/metadata.plist
    where the file /path/to/metadata.plist should look something like (again, taken from man podcast:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
      <dict>
        <key>Author</key>
        <string>Professor Rick Hathaway</string>
        <key>Comment</key>
        <string>Strangely, things fall together. Sorry Yeats.</string>
        <key>Copyright</key>
        <string>Copyright (c) 2007 Vox Clamantis College</string>
        <key>Description</key>
        <string>Gravitation is a phenomenon through which all objects attract each other.</string>
        <key>Keywords</key>
        <string>gravitation phys13</string>
        <key>Title</key>
        <string>Lecture 4 -- The theory of gravitation</string>
      </dict>
    </plist>

  • Cancel multiple print jobs

    How do I cancel multiple print jobs with a Color LaserJet CP 4025? I've tried all of the usual solutions from control panel to turning off the power, disconnecting, etc. Nothing. There are too many print jobs to just use the cancel button. Help! Thanks.
    This question was solved.
    View Solution.

    Hi,
    Download and run HP Print and Scan Dr utility from link below
    www.hp.com/go/tools
    Although I am an HP employee, I am speaking for myself and not for HP.
    --Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"

Maybe you are looking for

  • AE was setup succesfully on iphone but cannot be detected by windows

    Once AE was powered on iphone and windows were able to detect it. I could not configure on Windows via airport utility but I could configure on iphone. Once configured it disappeared from Windows and airport utility. How do I configure on itunes on w

  • Returning a JButton

    Hey i want a method to return a JButton like so: public JButton createButton(); // Make the actual button on the screen and pass it back to main button = new JButton(""); // Creates the button return button; // Returns the button to main so only a fe

  • Account has been hacked, need help

    Hello! I've been owner of skype account 'kolezev' for few years. It was linked with email *removed for privacy*. Today I've recieved a message that lniked email has been changed to *removed for privacy*. I didn't do it. Now I have no access to my acc

  • Service Allowance after the completion of ine year

    Hi Gurus I have a scenario. If the employee completes one year in the company, then i want to give some allowance. How can i do this. Is there any standard functionality or do i need to write a PCR. If its thru PCR, how can i get the start date of th

  • The unserlying connection was closed .and unexpected error was occured on send.

    Dilip Patil..