9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I would like to know how we can highlight/select a section of a file in vi and delete that section if we don't want to use the dd command to delete one line at at time. There is one where we don't want to delete the whole line , but up to a certain word. (2 Replies)
Discussion started by: Pouchie1
2 Replies
2. Homework & Coursework Questions
1.) I am to write scripts that will be phasetest folder in the home directory.
2.) The folder should have a set-up,phase and display files
I have written a small script which i used to check for the existing users and their password.
What I need help with:
I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies
3. Shell Programming and Scripting
Hey all,
Thanks for all the help you have given me. Two more things I am trying to figure out.
I need to issue a command..example
ps -ef | grep <process>
This would return about 10-15 running processes. I need to verify that there are x amount of processes running. What is... (7 Replies)
Discussion started by: jeffs42885
7 Replies
4. Programming
hey all, I have question when am writing simple shell...
in the child am calling execvp, i want the parent to know when execvp returns - 1. how can i let the parent know the result of execvp
thanks in advance (9 Replies)
Discussion started by: joey
9 Replies
5. UNIX for Advanced & Expert Users
How do you locate all nonblank lines that don't begin with #, /* ,or // ? (3 Replies)
Discussion started by: pulsar2587
3 Replies
6. UNIX for Dummies Questions & Answers
How would you change the IP address using the command line?
How would you make the new IP address persistent after a reboot?
How do you find the default route of your host?
Your /var file system is full. How do you find the files and directories that consume most of the... (1 Reply)
Discussion started by: d3coy
1 Replies
7. Solaris
Hello Everbody
I hope you can give me a hand, I have some questions
The first one itīs about some message that I donīt know what means, I was looking about it. but nothing. This is the message
rsh: connection from bad port
bsd-gw: Error reading from connection: Bad file number
And my... (4 Replies)
Discussion started by: lo-lp-kl
4 Replies
8. Programming
What does "extern" do?
ex. extern int x;
and another question, what about using static in functions? like: static void foo(), why? (2 Replies)
Discussion started by: Esaia
2 Replies
9. UNIX for Dummies Questions & Answers
Hi!
Im new to all this but the computer club im in has unix i think.
now my questions.
1.is it NTFS i need to partion the harddrive with to be able to use unix?
2.Unix and Linux whats the diffrense?yes im a noob got no idea been using crap windows for ages and hate it.
3.I got a win98... (2 Replies)
Discussion started by: Pierre
2 Replies
LP(4) Linux Programmer's Manual LP(4)
NAME
lp - line printer devices
SYNOPSIS
#include <linux/lp.h>
CONFIGURATION
lp[0-2] are character devices for the parallel line printers; they have major number 6 and minor number 0-2. The minor numbers correspond
to the printer port base addresses 0x03bc, 0x0378 and 0x0278. Usually they have mode 220 and are owned by root and group lp. You can use
printer ports either with polling or with interrupts. Interrupts are recommended when high traffic is expected, for example, for laser
printers. For usual dot matrix printers polling will usually be enough. The default is polling.
DESCRIPTION
The following ioctl(2) calls are supported:
int ioctl(int fd, LPTIME, int arg)
Sets the amount of time that the driver sleeps before rechecking the printer when the printer's buffer appears to be filled to arg.
If you have a fast printer, decrease this number; if you have a slow printer then increase it. This is in hundredths of a second,
the default 2 being 0.02 seconds. It only influences the polling driver.
int ioctl(int fd, LPCHAR, int arg)
Sets the maximum number of busy-wait iterations which the polling driver does while waiting for the printer to get ready for receiv-
ing a character to arg. If printing is too slow, increase this number; if the system gets too slow, decrease this number. The
default is 1000. It only influences the polling driver.
int ioctl(int fd, LPABORT, int arg)
If arg is 0, the printer driver will retry on errors, otherwise it will abort. The default is 0.
int ioctl(int fd, LPABORTOPEN, int arg)
If arg is 0, open(2) will be aborted on error, otherwise error will be ignored. The default is to ignore it.
int ioctl(int fd, LPCAREFUL, int arg)
If arg is 0, then the out-of-paper, offline and error signals are required to be false on all writes, otherwise they are ignored.
The default is to ignore them.
int ioctl(int fd, LPWAIT, int arg)
Sets the number of busy waiting iterations to wait before strobing the printer to accept a just-written character, and the number of
iterations to wait before turning the strobe off again, to arg. The specification says this time should be 0.5 microseconds, but
experience has shown the delay caused by the code is already enough. For that reason, the default value is 0. This is used for
both the polling and the interrupt driver.
int ioctl(int fd, LPSETIRQ, int arg)
This ioctl(2) requires superuser privileges. It takes an int containing the new IRQ as argument. As a side effect, the printer
will be reset. When arg is 0, the polling driver will be used, which is also default.
int ioctl(int fd, LPGETIRQ, int *arg)
Stores the currently used IRQ in arg.
int ioctl(int fd, LPGETSTATUS, int *arg)
Stores the value of the status port in arg. The bits have the following meaning:
LP_PBUSY inverted busy input, active high
LP_PACK unchanged acknowledge input, active low
LP_POUTPA unchanged out-of-paper input, active high
LP_PSELECD unchanged selected input, active high
LP_PERRORP unchanged error input, active low
Refer to your printer manual for the meaning of the signals. Note that undocumented bits may also be set, depending on your
printer.
int ioctl(int fd, LPRESET)
Resets the printer. No argument is used.
FILES
/dev/lp*
SEE ALSO
chmod(1), chown(1), mknod(1), lpcntl(8), tunelp(8)
COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 1995-01-15 LP(4)