Ubuntu :: Lpr Command- And Man -t (bash Command - Print Both Sides Of The Paper Using A Printer?
Mar 29, 2010
I just recently learned about the wonderful little lpr command- and using man -t (bash command) to beautifully print man pages for reference- but is there a way to print both sides of the paper using a printer so equipped?
I work at The University of Alabama as a sysadmin on various HPC resources and also provide support for faculty using Unix systems. I've run into one problem that is affecting two different desktop systems running CentOS 5.3.oth of these systems have the latest updates. These machines have standard network-attached printers. One is an HP LaserJet 3250 and the other is a model that is pretty close to that one.Previously these users were able to print from graphical applications such as Firefox, but now when the print dialog is opened on ANY graphical application, it causes a hard freeze on that particular app.Printing from the commandline via `lpr` gives no issues and test pages from the Printer Admin interface also succeed.This problem has me stumped, so I'm looking for any insight as to what could have changed. I do not know what changed between the time when the printers worked graphically and when they stopped, but the users assure that they have changed no settings. The only thing I can suspect is a rogue update since this is affecting separate users on separate machines with separate printers.
We are running RHEL 5.1 on the 2.6.18.53 kernel. We are attempting to pass print jobs to a Lexmark printer with the lp -o landscape command. The print jobs continue to print "portrait". Is anyone aware of this issue and is there a work-around to get these print jobs to print in landscape format?
This pretend to be a script for rename a lot of files automatically. So I put the list of files in an array named @lista. But, as you can see, at the end of the command I use a sed filter to print out a backslash for those files that have spaces in their names, so the path for those files could be rightly interpreted.
But there's no way I could print a backslash. It works well when I use the Perl's sed substitution s///, but I need every path in the array to be fixed.
I'd like to add that the bash command works perfectly well alone. I mean outside the Perl script.
I would like to ask the following: 1) ls -l |grep test -> this will grep every "ls -l" output line 2) ls -1 |xargs grep test -> this will grep every single file with test 3) ls -1 |xargs echo -> this will echo directory list 4) ls -1 |echo -> this does nothing!!!
My question is: how some command can receive input from "both sides" (grep can grep whole output or every single file - xargs, the same is for i.e. wc command). 4) echo does nothing (it's a single echo command).
I have a big bash script ,its goal is to download movie one by one . But I often get into a problem: if this script is executed in cron,it often does not completely download the movie.I often find the movies it downloaded are several KB while the movie is actually 20MB.So I think it is because it did not wait for finishing one task ,and jump to download another.So I want to know ,is there a way to force the bash script to wait until one movie downloaded completely and then start to download another movie ?
Bash's command history is great, especially it is useful when adding the history -a command to the COMMAND_PROMPT.However, I'm wondering if there is a way to log the commands to a file as soon as the Return key is pressed, e.g. before starting the command and not on completion of the command (using the COMMAND_PROMPT option would save the command once the prompt is there again).
I read about auditing programs like snoopy and session recorder like script but I thought they're already too complex for the simple question I have. I guess that deactivating that script logs all the output of the command would lead already in the right direction but isn't there a quicker way to solve that probelm?
I am trying to grep multiple numbers from file, grep does have the -f option for that.
Code: grep -f <`seq 500 520` /etc/passwd I know this could be done with
Code: for i in `seq 500 520`; do grep "$i" /etc/passwd; done But my question is fare more behind this example. It is possible to redirect one command output which will be treat as a content of file for another command ?
I swore I wouldn't do it again, but I did it anyway and installed 'current,' but I'm using Xfce not KDE. Everything was working very well, until I tried to print this morning. From Okular it would load the paper then stop and not print. From OpenOffice it would load and print, but the output was garbage.
Finally, I moved copies of what needed to be printed to the Xp partition, booted to Xp, and documents printed out just fine. As noted I'm running Slackware64 'current' with the latest versions of Cups and Hplip. The printer is a HP 940c. Hplip reports everything is fine, as does CUPS when running it in a browser (localhost:631).
I'm trying to set up a customer who has two printers attached to their computer one is some sort of okidata color laser printer, which seems to work fine the other one is a brother HL-4040CDN, which prints fine from a Linux based application such as open office.
When i try to print from a program in wine, however, I can't for the life of me get it to print properly to legal sized paper, it doesn't complain about paper size or anything, it simply crops the print size to that of letter sized paper even though I tell it the paper size is Legal.
I have tried setting the default paper size on the printer's firmware settings, I have tried setting the paper size in cups both through the printer preferences applet and the web interface, i have tried telling the program to print to legal paper and the only thing i can affect is which end of the paper it prints to, i have even tried different drivers for CUPS, i'm not sure if the problem is wine, the program, the printer, or how wine talks to the specific printer via cups (the other printer prints fine) i am using ubuntu 10.04 or 10.10.
I've just installed java (jre-6u21-linux-i586.bin) on Red Hat 4.4 AS and issued this command to check the java version: java -versionand got :bash :java: command not found
I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:
Code: #!/bin/bash cat > ~/generateGridmix2data.sh << END
I have a debian system installed on my pc . I have just saved a text file on my desktop . Please let me know how can i print the file through comand prompt ? I need to learn the printing the file thru comamnd line .
I have a HP Officejct Pro 8000 Printer hooked to UBUNTU 9.10 on a system 76 box. The printer is not loading paper properly. I see references to this issue on various websites and I saw at least one reference to new drivers but alas they were all for windows. I checked the repository and I have the latest and greatest HPLIP. Does this mean I have all of the latest drivers?
I am trying to find a way to print PDFs from the command line. I was using "cups-pdf', but I want to be able to specify the output folder from the command line. Is there a way to do this? I guess what I am trying to do is the Gnome "Print to file" option in the terminal so I can easily print off a batch of file to whatever directory I wanted.
I got trouble to print a photo of 10x15 cm to HP Photopaper (which was delivered with the printer itself). I printed from the UI and set the size according to the papersize (both 10x15cm) and just hit print in "High Quality". The paper gets drawn in, but then the tiny LCD screen on the printer tells me - Wrong paper size, please insert a larger paper, I have to hit the Ok/Cancel button on the Printer but the effect is the same, the printer spits the empty photo paper in front of me.Does anyone have a tipp where to look at?
Is there a way to extract the last field? Specifying the field number is causing problems using awk or cut as the input log file has the output specified in different lines at different places/fields. The only thing constant is the 'pathname' which always occurs at the end.
I am trying to write a program that monitors when an lp or basically any sort of print command is issued. If a print command is detected I want to pause that job and ask the user if he / she wants to continue.
This program would run in the background all the time so it can't sit and eat up a lot of cpu. I tried a simple while loop that continuously monitored "ps" and that obviously boosted my cpu to 100%.
I am writing an expect script and I want to send the command for the print-screen function. So, what is the command? Alternatively, is there some terminal application which may be well suited to take screen-shots via commands from the terminal or automation scripts?
I am creating a script to sync my important documents between two system. I want my script to generate a log file for the last action. can you suggest me a way to achieve this.Question: If I execute the rsync command with -v flag, it will print a lot of messages on the console. Is there any way. So, I can redirect these logs to a file?
I am looking for a way to print the timestamp of a directory using find command. I can do that for a file, but for a directory, it is printing the contents of the directory as well. Lets say there is a directory called doc, and there are more than one occurrences of that directory.
find . -name "doc" -type d -exec ls -l {} ;
This is printing the contents of all the files under doc directory as well.
I am using an awk command to print a line from a cvs file.the awk command includes an if statement that filter the output-lets say i want to print all the lines that the price field is greater than 30.i have it working when i put the parameters myself.. but when i try to send them with vars it wont work..i am sending the sign of the if statement - can only be: == , < , >it looks like this:
My wife has a canon MP470 printer and running ubuntu 10.10. I am able to print black and white, but unable to print photos. I got it to work using another driver, but not the 'correct' one for this printer. I have searched a bit and don't see anything about ubuntu 10.10, just older versions. Or should I just network her to my printer....?