Running Linux phần 4 doc

48 187 0
Running Linux phần 4 doc

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Chapter 8. Other Administrative Tasks 214 You should also back up your kernel sources (if you have upgraded or built your own kernel); these are found in /usr/src/linux. During your Linux adventures it's a good idea to keep notes on what features of the system you've made changes to so that you can make intelligent choices when taking backups. If you're truly paranoid, go ahead and back up the whole system; that can't hurt, but the cost of backup media might. Of course, you should also back up the home directories for each user on the system; these are generally found in /home. If you have your system configured to receive electronic mail (see Section 16.2 in Chapter 16), you might want to back up the incoming mail files for each user. Many people tend to keep old and "important" electronic mail in their incoming mail spool, and it's not difficult to accidentally corrupt one of these files through a mailer error or other mistake. These files are usually found in /var/spool/mail. Of course, this applies only if you are using the local mail system, not to people who access mail directly via POP3 or IMAP. 8.1.1.1 Backing up to tape Assuming you know what files or directories to back up, you're ready to roll. You can use the tar command directly, as we saw in Section 7.1.2 in Chapter 7, to make a backup. For example, the command: tar cvf /dev/qft0 /usr/src /etc /home archives all the files from /usr/src, /etc, and /home to /dev/qft0. /dev/qft0 is the first "floppy- tape" device — that is, a tape drive that hangs off of the floppy controller. Many popular tape drives for the PC use this interface. If you have a SCSI tape drive, the device names are /dev/st0, /dev/st1, and so on, based on the drive number. Those tape drives with another type of interface have their own device names; you can determine these by looking at the documentation for the device driver in the kernel. You can then read the archive back from the tape using a command, such as: tar xvf /dev/qft0 This is exactly as if you were dealing with a tar file on disk, as seen in Section 7.1 in Chapter 7. When you use the tape drive, the tape is seen as a stream that may be read from or written to in one direction only. Once tar is done, the tape device will be closed, and the tape will rewind. You don't create a filesystem on a tape, nor do you mount it or attempt to access the data on it as files. You simply treat the tape device itself as a single "file" from which to create or extract archives. Be sure your tapes are formatted before you use them. This ensures that the beginning-of-tape marker and bad-blocks information has been written to the tape. For formatting QIC-80 tapes (those used with floppy-tape drivers), you can use a tool called ftformat that is either already included with your distribution or can be downloaded from ftp://sunsite.unc.edu/pub/Linux/kernel/tapes as part of the ftape package. Chapter 8. Other Administrative Tasks 215 Creating one tar file per tape might be wasteful if the archive requires but a fraction of the capacity of the tape. In order to place more than one file on a tape, you must first prevent the tape from rewinding after each use, and you must have a way to position the tape to the next "file marker," for both tar file creation and extraction. The way to do this is to use the nonrewinding tape devices, which are named /dev/nqft0, /dev/nqft1, and so on for floppy-tape drivers, and /dev/nst0, /dev/nst1, and so on for SCSI tapes. When this device is used for reading or writing, the tape will not be rewound when the device is closed (that is, once tar has completed). You can then use tar again to add another archive to the tape. The two tar files on the tape won't have anything to do with each other. Of course, if you later overwrite the first tar file, you may overwrite the second file or leave an undesirable gap between the first and second files (which may be interpreted as garbage). In general, don't attempt to replace just one file on a tape that has multiple files on it. Using the nonrewinding tape device, you can add as many files to the tape as space permits. In order to rewind the tape after use, use the mt command. mt is a general-purpose command that performs a number of functions with the tape drive. For example, the command: mt /dev/nqft0 rewind rewinds the tape in the first floppy-tape device. (In this case, you can use the corresponding rewinding tape device as well.) Similarly, the command: mt /dev/nqft0 reten retensions the tape by winding it to the end and then rewinding it. When reading files on a multiple-file tape, you must use the nonrewinding tape device with tar and the mt command to position the tape to the appropriate file. For example, to skip to the next file on the tape, use the command: mt /dev/nqft0 fsf 1 This skips over one file on the tape. Similarly, to skip over two files, use: mt /dev/nqft0 fsf 2 Be sure to use the appropriate nonrewinding tape device with mt. Note that this command does not move to "file number two" on the tape; it skips over the next two files based on the current tape position. Just use mt to rewind the tape if you're not sure where the tape is currently positioned. You can also skip back; see the mt(1) manual page for a complete list of options. You need to use mt every time you read a multifile tape. Using tar twice in succession to read two archive files usually won't work; this is because tar doesn't recognize the file marker placed on the tape between files. Once the first tar finishes, the tape is positioned at the Chapter 8. Other Administrative Tasks 216 beginning of the file marker. Using tar immediately will give you an error message because tar will attempt to read the file marker. After reading one file from a tape, just use: mt device fsf 1 to move to the next file. 8.1.1.2 Backing up to floppy Just as we saw in the last section, the command: tar cvf /dev/fd0 /usr/src /etc /home makes a backup of /usr/src, /etc, and /home to /dev/fd0, the first floppy device. You can then read the backup using a command, such as: tar xvf /dev/fd0 Because floppies have a rather limited storage capacity, GNU tar allows you to create a "multivolume" archive. (This feature applies to tapes as well, but it is far more useful in the case of floppies.) With this feature, tar prompts you to insert a new volume after reading or writing each floppy. To use this feature, simply provide the M option to tar, as in: tar cvMf /dev/fd0 /usr/src /etc /home Be sure to label your floppies well, and don't get them out of order when attempting to restore the archive. One caveat of this feature is that it doesn't support the automatic compression provided by the z and I options. However, there are various reasons why you may not want to compress your backups created with tar, as discussed later. At any rate, you can create your own multivolume backups using tar and gzip in conjunction with a program that reads and writes data to a sequence of floppies (or tapes), prompting for each in succession. One such program is backflops, available on several Linux distributions and on the FTP archive sites. A do-it- yourself way to accomplish the same thing is to write the backup archive to a disk file and use dd or a similar command to write the archive as individual chunks to each floppy. If you're brave enough to try this, you can figure it out for yourself. 8.1.1.3 To compress, or not to compress? There are good arguments both for and against compression of tar archives when making backups. The overall problem is that neither tar nor the compression tools gzip and bzip2 are particularly fault-tolerant, no matter how convenient they are. Although compression using gzip or bzip2 can greatly reduce the amount of backup media required to store an archive, compressing entire tar files as they are written to floppy or tape makes the backup prone to complete loss if one block of the archive is corrupted, say, through a media error (not uncommon in the case of floppies and tapes). Most compression algorithms, gzip and bzip2 included, depend on the coherency of data across many bytes in order to achieve compression. If any data within a compressed archive is corrupt, gunzip may not be able to uncompress the file from that point on, making it completely unreadable to tar. Chapter 8. Other Administrative Tasks 217 This is much worse than if the tar file were uncompressed on the tape. Although tar doesn't provide much protection against data corruption within an archive, if there is minimal corruption within a tar file, you can usually recover most of the archived files with little trouble, or at least those files up until the corruption occurs. Although far from perfect, it's better than losing your entire backup. A better solution is to use an archiving tool other than tar to make backups. Several options are available. cpio is an archiving utility that packs files together, similar in fashion to tar. However, because of the simpler storage method used by cpio, it recovers cleanly from data corruption in an archive. (It still doesn't handle errors well on gzipped files.) The best solution may be to use a tool such as afio. afio supports multivolume backups and is similar in some respects to cpio. However, afio includes compression and is more reliable because each individual file is compressed. This means that if data on an archive is corrupted, the damage can be isolated to individual files, instead of to the entire backup. These tools should be available with your Linux distribution, as well as from all the Internet- based Linux archives. A number of other backup utilities, with varying degrees of popularity and usability, have been developed or ported for Linux. If you're serious about backups, you should look into them. 1 Among those programs are the freely available taper, tob and Amanda, as well as commercial programs like ARKEIA (free for use with up to two computers), BRU, and Arcserve. Lots of free backup tools can also be found at http://velocom.linux.tucows.com/system/backup.html. 8.1.2 Incremental Backups Incremental backups, as described earlier in this chapter, are a good way to keep your system backups up-to-date. For example, you can take nightly backups of only those files that changed in the last 24 hours, weekly backups of all files that changed in the last week, and monthly backups of the entire system. You can create incremental backups using the tools mentioned previously: tar, gzip, cpio, and so on. The first step in creating an incremental backup is to produce a list of files that changed since a certain amount of time ago. You can do this easily with the find command. 2 If you use a special backup program, you will most likely not have to do this, but set some option somewhere that you want to do an incremental backup. For example, to produce a list of all files that were modified in the last 24 hours, we can use the command: find / -mtime -1 \! -type d -print > /tmp/filelist.daily The first argument to find is the directory to start from — here, /, the root directory. The -mtime -1 option tells find to locate all files that changed in the last 24 hours. 1 Of course, this section was written after the author took the first backup of his Linux system in nearly four years of use! 2 If you're not familiar with find, become so soon. find is a great way to locate files across many directories that have certain filenames, permissions, or modification times. find can even execute a program for each file that it locates. In short, find is your friend, and all good system administrators know how to use it well. Chapter 8. Other Administrative Tasks 218 The \! -type d is complicated (and optional), but it cuts some unnecessary stuff from your output. It tells find to exclude directories from the resulting file list. The ! is a negation operator (meaning here, "exclude files of type d"), but put a backslash in front of it because otherwise the shell interprets it as a special character. The -print causes all filenames matching the search to be printed to standard output. We redirect standard output to a file for later use. Likewise, to locate all files that changed in the last week, use: find / -mtime -7 -print > /tmp/filelist.weekly Note that if you use find in this way, it traverses all mounted filesystems. If you have a CD- ROM mounted, for example, find attempts to locate all files on the CD-ROM as well (which you probably do not wish to backup). The -prune option can be used to exclude certain directories from the walk that find performs across the system; or, you can use find multiple times with a first argument other than / . See the manual page for find(1) for details. Now you have produced a list of files to back up. Previously, when using tar, we have specified the files to archive on the command line. However, this list of files may be too long for a single command line (which is usually limited to around 2048 characters), and the list itself is contained within a file. You can use the -T option with tar to specify a file containing a list of files for tar to back up. In order to use this option, you have to use an alternate syntax to tar in which all options are specified explicitly with dashes. For example, to back up the files listed in /tmp/filelist.daily to the device /dev/qft0, use the command: tar -cv -T /tmp/filelist.daily -f /dev/qft0 You can now write a short shell script that automatically produces the list of files and backs them up using tar. You can use cron to execute the script nightly at a certain time; all you have to do is make sure there's a tape in the drive. You can write similar scripts for your weekly and monthly backups. cron is covered in the next section. 8.2 Scheduling Jobs Using cron The original purpose of the computer was to automate routine tasks. If you must back up your disk at 1:00 A.M. every day, why should you have to enter the commands manually each time — particularly if it means getting out of bed? You should be able to tell the computer to do it and then forget about it. On Unix systems, cron exists to perform this automating function. Briefly, you use cron by running the crontab command and entering lines in a special format recognized by cron. Each line specifies a command to run and when to run it. Behind your back, crontab saves your commands in a file bearing your username in the /var/spool/cron/crontabs directory. (For instance, the crontab file for user mdw would be called /var/spool/cron/crontabs/mdw.) A daemon called crond reads this file regularly and executes the commands at the proper times. One of the rc files on your system starts up crond when the system boots. There actually is no command named cron, only the crontab utility and the crond daemon. Chapter 8. Other Administrative Tasks 219 On some systems, use of cron is limited to the root user. In any case, let's look at a useful command you might want to run as root and show how you'd specify it as a crontab entry. Suppose that every day you'd like to clean old files out of the /tmp directory, which is supposed to serve as temporary storage for files created by lots of utilities. Notice that cron never writes anything to the console. All output and error messages are sent as an email message to the user who owns the corresponding crontab. You can override this setting by specifying MAILTO=address in the crontab file before the jobs themselves. Most systems remove the contents of /tmp when the system reboots, but if you keep it up for a long time, you may find it useful to use cron to check for old files (say, files that haven't been accessed in the past three days). The command you want to enter is: ls -l filename But how do you know which filename to specify? You have to place the command inside a find command, which lists all files beneath a directory and performs the operation you specify on each one. We've already seen the find command in Section 8.1.2. Here, we'll specify /tmp as the directory to search, and use the -atime option to find files whose last access time is more than three days in the past. The -exec option means "execute the following command on every file we find": find /tmp \! -type d -atime +3 -exec ls -l {} \; The command we are asking find to execute is ls -l, which simply shows details about the files. (Many people use a similar crontab entry to remove files, but this is hard to do without leaving a security hole.) The funny string {} is just a way of saying "Do it to each file you find, according to the previous selection material." The string \; tells find that the -exec option is finished. Now we have a command that looks for old files on /tmp. We still have to say how often it runs. The format used by crontab consists of six fields: minute hour day month dayofweek command Fill the fields as follows: 1. Minute (specify from 0 to 59) 2. Hour (specify from 0 to 23) 3. Day of the month (specify from 1 to 31) 4. Month (specify from 1 to 12, or a name such as jan, feb, and so on) 5. Day of the week (specify from 0 to 6 where 0 is Sunday, or a name such as mon , tue , and so on) 6. Command (can be multiple words) Figure 8-1 shows a cron entry with all the fields filled in. The command is a shell script, run with the Bourne shell sh. But the entry is not too realistic: the script runs only when all the conditions in the first five fields are true. That is, it has to run on a Sunday that falls on the Chapter 8. Other Administrative Tasks 220 15th day of either January or July — not a common occurrence! So this is not a particularly useful example. Figure 8-1. Sample cron entry If you want a command to run every day at 1:00 A.M., specify the minute as 0 and the hour as 1. The other three fields should be asterisks, which mean "every day and month at the given time." The complete line in crontab is: 0 1 * * * find /tmp -atime 3 -exec ls -l {} \; Because you can do a lot of fancy things with the time fields, let's play with this command a bit more. Suppose you want to run the command just on the first day of each month. You would keep the first two fields, but add a 1 in the third field: 0 1 1 * * find /tmp -atime 3 -exec ls -l {} \; To do it once a week on Monday, restore the third field to an asterisk but specify either 1 or mon as the fifth field: 0 1 * * mon find /tmp -atime 3 -exec ls -l {} \; To get even more sophisticated, there are ways to specify multiple times in each field. Here, a comma means "run on the 1st and 15th day" of each month: 0 1 1,15 * * find /tmp -atime 3 -exec ls -l {} \; while a hyphen means "run every day from the 1st through the 15th, inclusive": 0 1 1-15 * * find /tmp -atime 3 -exec ls -l {} \; and a slash followed by a 5 means "run every fifth day" which comes out to the 1st, 6th, 11th, and so on: 0 1 */5 * * find /tmp -atime 3 -exec ls -l {} \; Now we're ready to actually put the entry in our crontab file. Become root (because this is the kind of thing root should do) and enter the crontab command with the -e option for "edit": rutabaga# crontab -e Chapter 8. Other Administrative Tasks 221 By default, this command starts a vi edit session. If you'd like to use Emacs instead, you can specify this before you start crontab. For a Bourne-compliant shell, enter the command: rutabaga# export VISUAL=emacs For the C shell: rutabaga# setenv VISUAL emacs The environment variable EDITOR also works in place of VISUAL for some versions of crontab. Enter a line or two beginning with hash marks (#) to serve as comments explaining what you're doing, then put in your crontab entry: # List files on /tmp that are 3 or more days old. Runs at 1:00 AM # each morning. 0 1 * * * find /tmp -atime 3 -exec ls -l {} \; When you exit vi, the commands are saved. Look at your crontab entry by entering: rutabaga# crontab -l We have not yet talked about a critical aspect of our crontab entry: where does the output go? By default, cron saves up the standard output and standard error and sends them to the user as a mail message. In this example, the mail goes to root , but that should automatically be directed to you as the system administrator. Make sure the following line appears in /usr/lib/aliases (/etc/aliases on SuSE, Debian, and RedHat): root: your-account-name In a moment, we'll show what to do if you want output saved in a file instead of being mailed to you. Here's another example of a common type of command used in crontab files. It performs a tape backup of a directory. We assume that someone has put a tape in the drive before the command runs. First, an mt command makes sure the tape in the /dev/qft0 device is rewound to the beginning. Then a tar command transfers all the files from the directory /src to the tape. A semicolon is used to separate the commands; that is standard shell syntax: # back up the /src directory once every two months. 0 2 1 */2 * mt -f /dev/qft0 rewind; tar cf /dev/qft0 /src The first two fields ensure that the command runs at 2:00 A.M., and the third field specifies the first day of the month. The fourth field specifies every two months. We could achieve the same effect, in a possibly more readable manner, by entering: 0 2 1 jan,mar,may,jul,sep,nov * mt -f /dev/qft0 rewind; \ tar cf /dev/qft0 /src The aforementioned section Section 8.1 explains how to perform backups on a regular basis. The following example uses mailq every two days to test whether any mail is stuck in the mail queue, and sends the mail administrator the results by mail. If mail is stuck in the mail queue, Chapter 8. Other Administrative Tasks 222 the report includes details about addressing and delivery problems, but otherwise the message is empty: 0 6 */2 * * mailq -v | \ mail -s "Tested Mail Queue for Stuck Email" postmaster Probably you don't want to receive a mail message every day when everything is going normally. In the examples we've used so far, the commands do not produce any output unless they encounter errors. But you may want to get into the habit of redirecting the standard output to /dev/null, or sending it to a log file like this (note the use of two > signs so that we don't wipe out previous output): 0 1 * * * find /tmp -atime 3 -exec ls -l {} \; >> /home/mdw/log In this entry, we redirect the standard output, but allow the standard error to be sent as a mail message. This can be a nice feature because we'll get a mail message if anything goes wrong. If you want to make sure you don't receive mail under any circumstances, redirect both the standard output and the standard error to a file: 0 1 * * * find /tmp -atime 3 -exec ls -l {} \; >> /home/mdw/log 2>&1 When you save output in a log file, you get the problem of a file that grows continuously. You may want another cron entry that runs once a week or so, just to remove the file. Only Bourne shell commands can be used in crontab entries. That means you can't use any of the convenient extensions recognized by bash and other modern shells, such as aliases or the use of ~ to mean "my home directory." You can use $HOME , however; cron recognizes the $USER, $HOME, and $SHELL environment variables. Each command runs with your home directory as its current directory. Some people like to specify absolute pathnames for commands, like /usr/bin/find and /bin/rm, in crontab entries. This ensures that the right command is always found, instead of relying on the path being set correctly. If a command gets too long and complicated to put on a single line, write a shell script and invoke it from cron. Make sure the script is executable (use chmod +x) or execute it by using a shell, such as: 0 1 * * * sh runcron As a system administrator, you often have to create crontab files for dummy users, such as news or UUCP . Running all utilities as root would be overkill and possibly dangerous, so these special users exist instead. The choice of a user also affects file ownership: a crontab file for news should run files owned by news , and so on. In general, make sure utilities are owned by the user in whose name you create the crontab file. As root , you can edit other users' crontab files by using the -u option. For example: tigger # crontab -u news -e Chapter 8. Other Administrative Tasks 223 This is useful because you can't log in as user news , but you still might want to edit this user's crontab entry. 8.3 Managing System Logs The syslogd utility logs various kinds of system activity, such as debugging output from sendmail and warnings printed by the kernel. syslogd runs as a daemon and is usually started in one of the rc files at boot time. The file /etc/syslog.conf is used to control where syslogd records information. Such a file might look like the following (even though they tend to be much more complicated on most systems): *.info;*.notice /var/log/messages mail.debug /var/log/maillog *.warn /var/log/syslog kern.emerg /dev/console The first field of each line lists the kinds of messages that should be logged, and the second field lists the location where they should be logged. The first field is of the format: facility . level [; facility . level ] where facility is the system application or facility generating the message, and level is the severity of the message. For example, facility can be mail (for the mail daemon), kern (for the kernel), user (for user programs), or auth (for authentication programs such as login or su). An asterisk in this field specifies all facilities. level can be (in increasing severity): debug, info, notice, warning, err, crit, alert , or emerg . In the previous /etc/syslog.conf, we see that all messages of severity info and notice are logged to /var/log/messages, all debug messages from the mail daemon are logged to /var/log/maillog, and all warn messages are logged to /var/log/syslog. Also, any emerg warnings from the kernel are sent to the console (which is the current virtual console, or an xterm started with the -C option). The messages logged by syslogd usually include the date, an indication of what process or facility delivered the message, and the message itself — all on one line. For example, a kernel error message indicating a problem with data on an ext2fs filesystem might appear in the log files, as in: Dec 1 21:03:35 loomer kernel: EXT2-fs error (device 3/2): ext2_check_blocks_bit map: Wrong free blocks count in super block, stored = 27202, counted = 27853 Similarly, if an su to the root account succeeds, you might see a log message, such as: Dec 11 15:31:51 loomer su: mdw on /dev/ttyp3 [...]... 11 :46 am 14 ttyp2 11 :46 am 1 w ttyp4 11 :46 am kermit ttyp0 11 :46 am 14 bash We see the login times for each user (in this case, one user logged in many times), as well as the command currently being used The w(1) manual page describes all the fields displayed /var/log/lastlog This file is similar to wtmp but is used by different programs (such as finger to determine when a user was last logged in) 2 24 Chapter... /tifflzw /plan9bm /xes /ccr /miff 24 /png16m /mgrgray8 /tiff12nc /pkm /r4081 /jpeg /png16 /mgrgray2 /tiffg32d /ppm /oki4w /cgm 24 /pngmono /bitcmyk /tiffcrle /pnm /oce9050 /pxlcolor /cgmmono /pcx24b /bit /faxg32d /pgnm /m8510 /epswrite /bmp256 /pcx16 /psgray /dfaxlow /pgm /imagen /bbox /bmpamono /pcxmono /tiffpack /inferno /pbm /cp50 /omni /sgirgb /mgr4 /tiff24nc /pkmraw /sj48] GS> quit $ If you are not... /DJ6xx /cdjcolor /tek4696 /x11gray2 /lex5700 /ljetplus /paintjet /hpijs /uniprint /t4693d4 /x11cmyk4 /lxm5700m /ljet4 /djet500c /cdj1600 /stcolor /iwlq /x11cmyk /ln03 /lbp8 /ljet3 /deskjet /cdj890 /lq850 /iwhi /x11 /la75 /bjc600 /laserjet /AP21xx /cdj850 /epsonc /sxlcrt /la50 /bj10e /hpdj /DJ9xx /cdj550 /eps9mid /lvga256 /declj250 /cljet5 /pjxl /DJ6xxP /cdjmono /ap3250 /x11gray4 /lex3200 /lj5mono /pj... /cljet5 /pjxl /DJ6xxP /cdjmono /ap3250 /x11gray4 /lex3200 /lj5mono /pj /DJ630 /cdeskjet /t4693d8 /x11cmyk8 /lex7000 /lj4dith /dnj650c /chp2200 /hl7x0 /t4693d2 /x11cmyk2 /lj250 /jpeggray /png256 /mgrgray4 /tiffg4 /ppmraw /okiibm /cif /pnggray /mgrmono /tiffg3 /pnmraw /oki182 /nullpage /cgm8 /pcxcmyk /bitrgb /faxg4 /pgnmraw /necp6 /pxlmono /bmp16m /pcx256 /psrgb /faxg3 /pgmraw /jetp3852 /pswrite /bmp16... lptest 35 6 227 Chapter 8 Other Administrative Tasks The output should look much like this: !"#$%&'( )*+,-./012 345 6789:;?@ABC "#$%&'( )*+,-./012 345 6789:;?@ABCD #$%&'( )*+,-./012 345 6789:;?@ABCDE $%&'( )*+,-./012 345 6789:;?@ABCDEF %&'( )*+,-./012 345 6789:;?@ABCDEFG &'( )*+,-./012 345 6789:;?@ABCDEFGH This output is short enough that you can see the result of redirecting it to your printer... are much more sophisticated than the small one presented here 8 .4 Managing Print Services Linux has a fairly complicated printing system, compared to the printing services most PCs use It allows many users to print documents at the same time, and each user can send documents from one or more applications without waiting for the previous document to finish 225 Chapter 8 Other Administrative Tasks printing... as lpr, to print a document That document does not go directly to the printer, though, because it might already be busy Instead, the document is stored in a temporary file in a directory called the printer spool directory As the word "spool" suggests, the documents get taken out of the directory one by one as the printer becomes free Each printer has its own spool directory When Linux starts, it sets... one LaserJet 4 and will use the ljet4 filter only for it, ljet4 is one logical name for the printer Similarly, a dot-matrix printer might be named 72dpi when accessed via its low-resolution printer definition line, and have the name 144 dpi when accessed in a higher resolution If you use a printer administration utility that comes with your Linux distribution, you may have to follow certain arbitrary... adapter:\ :lp=dev/tty01:br#3 840 0:rw:xc#0:xs# 040 0 040 :sh:\ :sd=/var/spool/lpd/samoa:pl#72:pw#85:mx#0:mc#0:\ :lf=/var/log/lpd-errs:if=/usr/local/cap/samoa: # agapornis via printer room subnet (standard access) moa|ps|QMS 1725 via Ethernet:\ :lp=/var/spool/lpd/moa/moa:rm=agapornis:rp=samoa:\ :sd=/var/spool/lpd/moa:mx#0:sh:\ :lf=/var/log/lpd-errs:if=/usr/local/cap/samoa: 8 .4. 6 Configuring Ghostscript Ghostscript... formatting documents for printing These filters are also specified in the /etc/printcap file, and we'll talk a lot about them in this section There are several printer-support packages for Linux Most distributions use the BSD-derived package that contains the lpd printer daemon These packages include a set of utilities and manpage documents to support traditional Unix-style printing on Linux The BSD . 3:58pm up 4: 12, 5 users, load average: 0.01, 0.02, 0.00 User tty login@ idle JCPU PCPU what mdw ttyp3 11 :46 am 14 - mdw ttyp2 11 :46 am 1 w mdw ttyp4 11 :46 am kermit mdw ttyp0 11 :46 am 14 bash We. !"#$%&'( )*+, /012 345 6789:;<=>?@ABC "#$%&'( )*+, /012 345 6789:;<=>?@ABCD #$%&'( )*+, /012 345 6789:;<=>?@ABCDE $%&'( )*+, /012 345 6789:;<=>?@ABCDEF. Administrative Tasks 2 14 You should also back up your kernel sources (if you have upgraded or built your own kernel); these are found in /usr/src /linux. During your Linux adventures it's

Ngày đăng: 24/07/2014, 02:20

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan