亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? unx20.htm

?? Unix Unleashed, Third Edition is written with the power user and system administrator in mind. This
?? HTM
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):

$</PRE>

<P>On BSD, you can list at jobs using atq, which lists all jobs that you have in the single queue. With a single job scheduled, your output might look like the following:

<BR></P>

<PRE>$ at

 LAST EXECUTION TIME: Mar 9, 1994 at 15:00

 Rank     Execution Date     Owner     Job #   Job Name

  1st   Mar 10, 1994 12:00   sartin    66588   stdin

$</PRE>

<H4 ALIGN="CENTER">

<CENTER><A ID="I11" NAME="I11">

<FONT SIZE=3><B>Removing Your </B><B><I>at</I></B><B> Jobs</B>

<BR></FONT></A></CENTER></H4>

<P>If you make a mistake or change your mind about running a job, you can remove it from the queue. If you didn't save the job ID that is printed by some versions of at when they add your job to the queue, you can get the job ID by listing at jobs and 
removing the job. On SYSV, you remove the job using at -r <I>jobid</I>:

<BR></P>

<PRE>$ at -l

763250700.a     Wed Mar  9 16:05:00 1994

$ at -r 763250700.a

$ at -l

$ </PRE>

<P>On a BSD system, you remove the job using atrm <I>jobid</I>:

<BR></P>

<PRE>$ atq

 LAST EXECUTION TIME: Mar 9, 1994 at 15:00

 Rank     Execution Date     Owner     Job #   Job Name

  1st   Mar 10, 1994 12:00   sartin    66588   stdin

$ atrm 66588

 66588: removed

$ atq

no files in queue.

$ </PRE>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="imp.gif" WIDTH = 68 HEIGHT = 35><B>TIP: </B> If you submit many jobs using at, you should save the job ID somewhere. The output of atq or at -l isn't very helpful if you have lots of jobs scheduled for approximately the same time. On some 
systems, you will be able to edit the job file in /usr/spool/cron/atjobs/<I>jobid</I> or /var/spool/cron/atjobs/<I>jobid</I>, but it's best not to depend on this behavior.

<BR></NOTE>

<HR ALIGN=CENTER>

<H3 ALIGN="CENTER">

<CENTER><A ID="I12" NAME="I12">

<FONT SIZE=4><B>Chronolgically Speaking&#151;</B><B><I>cron</I></B>

<BR></FONT></A></CENTER></H3>

<P>Although the at command is very useful for one-time jobs, it is somewhat difficult to use for scheduling repetitive tasks (see the note on using at to replace cron). UNIX also includes a program called cron that is responsible for running repetitively 
scheduled jobs in a flexible fashion.

<BR></P>

<P>Historically, cron was introduced as a tool for system administrators and originally only allowed scheduling of tasks by &quot;root&quot; using a file /etc/crontab that the cron program would read for information on what jobs to run at what times. Since 

that time, newer versions of cron have been introduced that allow individual users to have their own crontab, which specifies what jobs to run for that particular user.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="note.gif" WIDTH = 35 HEIGHT = 35><B>NOTE:</B>  The use of cron by non &quot;root&quot; users is not available on all versions of UNIX (for example, BSD 4.2 and 4.3).  The CD-ROM contains a version of cron that includes support for user-level 
crontabs.

<BR></NOTE>

<HR ALIGN=CENTER>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="more.gif" WIDTH = 35 HEIGHT = 35><B>Using </B><B>at</B><B> to Replace </B><B>cron</B>

<BR>

<BR>On systems that don't have cron access for normal users, you can duplicate some of the features of cron by writing at jobs that reschedule themselves. For example, to write a script that runs weekly, you could add to the end of the script:

<BR>

<BR>echo &quot;sh <I>this_script</I>&quot; | at 1900 thursday week

<BR>

<BR>to reschedule <I>this_script</I> to run at 7 p.m. next Thursday. When <I>this_script</I> runs next Thursday, it will reschedule itself for the Thursday after that. Take great care when using scripts to reschedule themselves so that you don't lose 
control of your creations.

<BR></NOTE>

<HR ALIGN=CENTER>

<P>When cron runs a job for you, it executes using your user ID and privileges, but with a more sparse environment. A job executed by cron will run with sh (usually the Bourne shell) in your home directory, but will not execute .profile. The environment 
variables HOME, LOGNAME, PATH, and SHELL will be set. Your job should make minimal assumptions about its environment. For example, your PATH may only include /bin, /usr/bin and possibly your current working directory (which should be your home directory at 

the start of the job).

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="imp.gif" WIDTH = 68 HEIGHT = 35><B>TIP: </B> To run scripts from cron using a different shell, use the #! construct at the start of your script. For example:

<BR>

<BR>#!/bin/ksh

<BR># This script uses Korn shell extensions

<BR>typeset -i count=0

<BR>while [ $count -lt 5 ]

<BR>do

<BR>     echo $count

<BR>     (( count = count + 1 ))

<BR>done

<BR></NOTE>

<HR ALIGN=CENTER>

<P>The output of each job you run is saved and sent to you by electronic mail.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="imp.gif" WIDTH = 68 HEIGHT = 35><B>TIP:</B> Write your cron jobs so that they produce output only if there is an error. Scripts that are going to produce statistics or summary information should probably be written to explicitly send mail with an 

informative subject line. That way, you know something has gone wrong when you receive a message from the cron daemon.

<BR></NOTE>

<HR ALIGN=CENTER>

<H4 ALIGN="CENTER">

<CENTER><A ID="I13" NAME="I13">

<FONT SIZE=3><B>Manipulating Your crontab</B>

<BR></FONT></A></CENTER></H4>

<P>There are several different operations available from the crontab command that are used to view, modify, or remove your crontab. To see your current crontab, use crontab -l. This will list your current crontab on the standard output. For an example, see 

Listing 20.1.

<BR></P>

<P>To replace your crontab with a new crontab, use the command  crontab <I>new_crontab_file</I>. This will replace your crontab completely, so make sure that <I>new_crontab_file</I> has any old crontab entries you want to keep. A good way to do this is to 

use crontab -l first:

<BR></P>

<PRE>$ crontab -l &gt; new_crontab_file

$ vi new_crontab_file

[edit the file to update your crontab]

$ crontab new_crontab_file

$</PRE>

<P>Some versions of crontab support a special option for editing and replacing your crontab. If your system supports this, you can edit your crontab by executing crontab -e.

<BR></P>

<P>To make it so that cron will not execute any jobs for you, you could execute crontab /dev/null, which would give you an empty crontab. A better way to do this is to execute crontab -r, which will remove your crontab completely.

<BR></P>

<H4 ALIGN="CENTER">

<CENTER><A ID="I14" NAME="I14">

<FONT SIZE=3><B>Decoding a crontab</B>

<BR></FONT></A></CENTER></H4>

<P>A crontab has six fields:

<BR></P>

<PRE>

<BR>minute (0-59)



<BR>hour (0-23)



<BR>day of month (1-31)



<BR>month of year (1-12)



<BR>day of week (0-6, 0 is Sunday)



<BR>Command (rest of line)</PRE>

<P>The first five fields are numeric patterns, which can be an asterisk (which means to use all legal values) or a list of elements.  An element is either a single number or two numbers separated by a hyphen (which specifies an allowed range). Note that 
both a day of month and day of week are specified. If both fields are used, they are both honored. For example:

<BR></P>

<PRE> 0 17  1  *  0  date | mail user</PRE>

<P>will execute at 5 p.m. on the first of each month as well as at 5 p.m. on every Sunday.

<BR></P>

<P>Now look at Listing 20.1 in detail. Each line in the sample crontab illustrates a technique for using cron. 

<BR></P>

<P>See LIST20_1 on the CD-ROM for a not-so-typical crontab.

<BR></P>

<P>Look at the line in Listing 20.1 that runs a program called hourly. Notice that both day fields, the month field, and the hour field are wild cards, whereas the minute field is &quot;0.&quot; This means that the job will run on all days of all months at 

all hours at 0 minutes into the hour. This job runs every hour on the hour.

<BR></P>

<P>Look at line 2 in Listing 20.1 that runs a program called quarter_hourly. Note the change. Note the use of a list in the minute field. The minute field is now a list of &quot;0,15,30,45.&quot; This means that the job will run on all days of all months 
at all hours at 0, 15, 30, and 45 minutes into the hour. This job runs every quarter hour.

<BR></P>

<P>The business_hourly script runs every hour during business hours. Note the use of ranges in the hour field (to limit the job to run between 8 a.m. and 6 p.m.) and the day of week field (to limit the job to run Monday through Friday).

<BR></P>

<P>Look at the line in Listing 20.1 that runs a program called daily. Notice that both day fields and the month field are wild cards, whereas the hour field is &quot;8&quot; and the minute field is &quot;0.&quot; This means that the job will run every day 

at 8 a.m. The weekly script will run every Monday at 8 a.m. The monthly script will run just after midnight on the morning of the first of each month.

<BR></P>

<P>The two executions of the birthday script will each run once per year, one on April 20, with the argument rachel, and one on October 7, with the argument rob.

<BR></P>

<P>See Listing 20.2 for an example of a Korn shell script intended to be run as a cron job. This script sends a status summary based on the contents of two files in ~/status: a file named todo, which is a &quot;to do&quot; list, and a file named done, 
which is a list of tasks completed. During the week, you can move items from the todo file to the done. At the end of the week, this script can be run from cron and it will mail a weekly summary, add your done items to the file log, and mail a summary to 
you. Note that the script redirects all expected output either to a file or to the <I>mail_command</I>. Note that it tries to configure using only the environment variables LOGNAME and HOME. It uses only standard commands that are available in the default 

PATH.

<BR></P>

<P>Here is a cron entry to run this script every Monday morning at 8:00:

<BR></P>

<PRE>0     8     *     *     /u/sartin/bin/status_report</PRE>

<P>See LIST 20_2 on the CD-ROM for a sample cron script.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="warning.gif" WIDTH = 37 HEIGHT = 35><B>WARNING: </B>Twice a year, users of cron get to experience the potential of having some jobs run twice or not at all when they were expected to run exactly once. The problem is that once a year (when you set 

your clocks back) some local clock times occur twice, and once a year (when you set your clocks ahead) some local clock times don't occur at all. Most versions of cron attempt to deal with this by making jobs that are scheduled for ambiguous times (those 
that occur twice in one day) run exactly once, and those that are scheduled for nonexistent times (the ones that were skipped when the clock was set ahead) run once, but at a different time than requested in the crontab. Historically, different versions of 

cron have run some jobs twice or not at all near the time change.

<BR></NOTE>

<HR ALIGN=CENTER>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="imp.gif" WIDTH = 68 HEIGHT = 35><B>TIP:</B> Schedule daily, weekly, and monthly jobs to avoid ambiguous and nonexistent times due to daylight savings time changes. For example, instead of scheduling a weekly backup to run at 2 a.m., schedule it 
for 0055 (55 0 ...) or 0303 (3 3 ...). This will ensure that your job runs once even if your cron doesn't do what you expect.

<BR></NOTE>

<HR ALIGN=CENTER>

<H3 ALIGN="CENTER">

<CENTER><A ID="I15" NAME="I15">

<FONT SIZE=4><B>cron for the System Administrator</B>

<BR></FONT></A></CENTER></H3>

<P>As a system administrator, you will either control cron and at access using cron.allow or cron.deny and at.allow and at.deny (Check your system's documentation to determine the locations of these files. They are typically in /usr/spool/cron or 
/var/spool/cron.) You will need to make a basic policy decision on whether users should be granted access to these tools. One possible policy is that all users are granted access and are denied access only if they abuse the facility; in this case, use the 

cron.deny file to list those users who should not use cron, and at.deny to list those who should not use at. Another possible policy is that users must request permission to use these tools; in this case, use cron.allow and at.allow to list users who have 

been granted permission.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="imp.gif" WIDTH = 68 HEIGHT = 35><B>TIP: </B> Choose your policy right away so that you can get your configuration set up correctly. Don't try to mix cron.allow and cron.deny. Similarly, don't attempt to mix at.allow and at.deny.

<BR></NOTE>

<HR ALIGN=CENTER>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="note.gif" WIDTH = 35 HEIGHT = 35><B>NOTE:</B>  If your system runs a cron that supports a crontab only for &quot;root,&quot; you may want to consider installing the vixie-cron package from the CD-ROM. This will give your users access to the 
crontab command. You will need a separate atrun command if you wish to continue using at, because this package doesn't implement at queues.

<BR></NOTE>

<HR ALIGN=CENTER>

<H4 ALIGN="CENTER">

<CENTER><A ID="I16" NAME="I16">

<FONT SIZE=3><B>Using cron to Schedule Administrative Tasks</B>

<BR></FONT></A></CENTER></H4>

<P>You should use one or more crontabs to schedule all of your repetitive administrative tasks, such as backups, log file administration, news expiration, and file archival. See Listing 20.3 for a sample script that does simple log file pruning. Run this 
from your crontab as prunelog <I>path_to_log_file</I> <I>...</I>. It will keep the 10 most recent days (or weeks or hours) of log files available for review, and throw out older data to prevent running out of disk space.

<BR></P>

<P>If your system uses a cron like the SYSV one, you should take advantage of the user-specific crontabs to split administrative tasks. For example, all Usenet cron jobs should be in the crontab for user netnews (or whatever user ID you use for the news 
software). Only those jobs that need &quot;root&quot; privileges should be in the crontab for &quot;root.&quot;

<BR></P>

<P>Here is a crontab entry that will execute this job to prune /usr/spool/mqueue/syslog:

<BR></P>

<PRE>0     1     *     *     *     /usr/adm/prunelog     /usr/spool/mqueue/syslog</PRE>

<P>See LIST20_3 on the CD-ROM for a program that prunes log delete files with cron.

<BR></P>

<H3 ALIGN="CENTER">

<CENTER><A ID="I17" NAME="I17">

<FONT SIZE=4><B>Summary</B>

<BR></FONT></A></CENTER></H3>

<P>In this chapter, you have learned how to use at to schedule one-time jobs; how to use batch (and at -q) to run large jobs without loading your system badly; and how to use cron to schedule recurring jobs. These techniques should help you to get maximum 

benefit out of your computer even when you are not around to use it.

<BR></P>

<P><A HREF="unx19.htm"><IMG SRC="bluprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>

<A HREF="index.htm"><IMG SRC="blutoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>

<A HREF="unxpt5.htm"><IMG SRC="blunext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>

<A HREF="index.htm"><IMG SRC="bluprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Home"></A>

</P></BODY></HTML>

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一区二区三区视频| 日本三级亚洲精品| 麻豆一区二区三| va亚洲va日韩不卡在线观看| 日韩午夜电影av| 亚洲激情在线激情| 国产一区二区三区蝌蚪| 欧美精品 国产精品| 国产精品久久三区| 精品中文av资源站在线观看| 91福利区一区二区三区| 日本一区二区三区在线观看| 日韩av电影一区| 色婷婷av一区二区三区之一色屋| 日本一区二区三区视频视频| 美国欧美日韩国产在线播放| 欧美中文字幕一区| 国产精品灌醉下药二区| 国产在线精品一区二区三区不卡 | 久久不见久久见免费视频7| 91豆麻精品91久久久久久| 日本一区二区三区在线不卡| 国产在线一区二区综合免费视频| 亚洲一区二区在线观看视频| 91在线观看成人| 中文欧美字幕免费| 国产精品一区久久久久| 欧美大片顶级少妇| 美女视频网站久久| 欧美一区二区三区四区在线观看| 亚洲午夜一区二区三区| 色欧美88888久久久久久影院| 国产精品热久久久久夜色精品三区 | 欧美电影免费观看高清完整版在线观看| 亚洲精品国产无套在线观| 99这里都是精品| 国产精品丝袜久久久久久app| 国产很黄免费观看久久| 精品蜜桃在线看| 日本在线不卡视频一二三区| 69精品人人人人| 青青草91视频| 日韩视频一区在线观看| 美腿丝袜在线亚洲一区| 欧美一区二区三区四区五区| 毛片av中文字幕一区二区| 日韩欧美亚洲国产另类| 精品在线免费观看| 精品欧美久久久| 国产一区二区在线观看免费| 337p粉嫩大胆色噜噜噜噜亚洲| 精品亚洲porn| 久久久久久麻豆| 国产98色在线|日韩| 亚洲欧洲成人精品av97| 91网站在线观看视频| 亚洲日本一区二区三区| 欧洲一区在线电影| 日日夜夜一区二区| 日韩欧美精品三级| 国产在线精品视频| 中文字幕在线免费不卡| 一本到不卡精品视频在线观看| 亚洲另类色综合网站| 欧美日韩色一区| 美脚の诱脚舐め脚责91| 久久精品视频在线免费观看 | 亚洲五月六月丁香激情| 欧美日韩一区二区三区不卡| 日本视频免费一区| 国产亚洲自拍一区| 99精品欧美一区二区三区小说 | 奇米影视一区二区三区小说| 精品毛片乱码1区2区3区| 国产成人自拍在线| 亚洲欧美激情视频在线观看一区二区三区| 91福利资源站| 日本伦理一区二区| 91片在线免费观看| 久久看人人爽人人| 94-欧美-setu| 欧美日韩精品福利| 4438成人网| 美女国产一区二区三区| 日韩欧美中文字幕制服| 高清在线不卡av| 亚洲国产精品影院| 日韩欧美国产午夜精品| 成人开心网精品视频| 一区二区免费视频| 日韩美一区二区三区| aaa国产一区| 蜜臀a∨国产成人精品| 国产精品系列在线| 欧美日韩日日夜夜| 国产成人aaaa| 亚洲国产毛片aaaaa无费看| 久久综合丝袜日本网| 在线免费av一区| 国产一区视频网站| 亚洲综合色噜噜狠狠| 精品国产91乱码一区二区三区| 97久久精品人人做人人爽| 日韩黄色一级片| 亚洲欧洲av在线| 日韩欧美国产三级电影视频| 91美女蜜桃在线| 国模冰冰炮一区二区| 亚洲综合小说图片| 日本一二三不卡| 欧美一卡二卡三卡四卡| 94-欧美-setu| 国产精品一区二区男女羞羞无遮挡| 一区二区三区视频在线观看| 久久久蜜臀国产一区二区| 欧美日韩中字一区| 国产福利不卡视频| 日本在线不卡视频| 亚洲国产欧美在线| 国产精品欧美一级免费| 日韩欧美你懂的| 亚洲自拍偷拍综合| 国产欧美日韩精品在线| 日韩欧美你懂的| 欧美久久一二区| 日本高清不卡视频| 成人久久视频在线观看| 精品一区二区三区免费播放| 香蕉久久一区二区不卡无毒影院 | 欧美三级在线视频| 99精品欧美一区二区三区综合在线| 久草精品在线观看| 日韩国产在线一| 一区二区三区四区乱视频| 中文字幕巨乱亚洲| 久久蜜桃一区二区| 日韩欧美视频一区| 91.com在线观看| 欧美视频一区二区三区在线观看| av电影在线观看一区| 国产精品自拍毛片| 久久丁香综合五月国产三级网站| 午夜精品一区二区三区电影天堂 | 久久亚洲精品小早川怜子| 欧美久久一二三四区| 欧美在线观看18| 欧美中文字幕久久| 欧美性受xxxx黑人xyx性爽| 色呦呦一区二区三区| 99精品视频一区二区三区| eeuss鲁片一区二区三区| 高清成人免费视频| 高清在线成人网| 成人avav影音| 91一区二区在线观看| 91浏览器打开| 一本大道久久精品懂色aⅴ| 99久久亚洲一区二区三区青草| 成人性生交大片免费| 国产成人av一区二区| 国产成人在线视频网站| 国产成人av福利| 成人av网站在线观看| 99久久婷婷国产综合精品| 99re热这里只有精品视频| 91免费观看视频| 色狠狠桃花综合| 欧美主播一区二区三区| 欧美日韩dvd在线观看| 在线91免费看| 日韩欧美国产不卡| 精品国产乱码久久久久久闺蜜| 精品久久久久一区| 国产性色一区二区| 国产精品久久久久9999吃药| 亚洲色图制服丝袜| 亚洲成人久久影院| 免费精品99久久国产综合精品| 老司机一区二区| 国产精品综合网| av电影天堂一区二区在线 | 麻豆精品在线播放| 国产精品一区二区久久精品爱涩| 国产999精品久久| 色婷婷久久一区二区三区麻豆| 欧美四级电影在线观看| 91精品一区二区三区久久久久久| 日韩欧美一级片| 国产片一区二区三区| 亚洲欧美另类小说视频| 日韩在线一区二区三区| 国产在线精品一区二区夜色| www.欧美日韩国产在线| 在线观看欧美黄色| 欧美一级一级性生活免费录像| 日韩美女视频在线| 国产日韩影视精品| 一区二区三区不卡在线观看| 视频一区国产视频| 国产不卡视频一区|