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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? unx05.htm

?? Unix Unleashed, Third Edition is written with the power user and system administrator in mind. This
?? HTM
?? 第 1 頁 / 共 3 頁
字號:

<H3 ALIGN="CENTER">

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

<FONT SIZE=4><B>Finding the Date and Time</B>

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

<P>When used by an ordinary user, the date command does only one thing: it displays the date and the time. The system administrator can use date to set the date and the time.

<BR></P>

<P>Here's how you use date to find out the current date and time:

<BR></P>

<PRE>$ date

Sat Sep 28 1:45:58 EDT 1991</PRE>

<P>This is the simplest form of executing the date command, but not the most useful. This command has many options that let you extract any part of the usual output and display that part alone or with other parts.

<BR></P>

<P>First, look at the individual options. Unlike most UNIX commands, which usually have single letters as options, date's options are strings of characters. The option string begins with a plus sign (+) and each option is preceded with a percent sign (%). 

You can include ordinary text in the option string, as you will see in the next example.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="imp.gif" WIDTH = 68 HEIGHT = 35><B>TIP: </B>You should enclose the option string in either single or double quotation marks so that the shell won't interpret any characters in the ordinary text portion that it believes are special.

<BR></NOTE>

<HR ALIGN=CENTER>

<P>The a option outputs the abbreviated name of the day, and the A option provides the unabbreviated name:

<BR></P>

<PRE>$ date +%a

Sat

$ date +%A

Saturday</PRE>

<P>The b option outputs the abbreviated name of the month, and the B option provides the unabbreviated name:

<BR></P>

<PRE>$ date +%b

Sep

$ date +%B

September</PRE>

<P>The d option provides the day of the month in two-digit numeric form, and the e option outputs the day of the month with a space preceding the day for days 1 to 9. In the following example, the date is the 28th day of the month:

<BR></P>

<PRE>$ date +%d

28

$ date +%e

28</PRE>

<P>If you execute these two commands again early the next month&#151;on the fourth, for example&#151;you would see the following:

<BR></P>

<PRE>$ date +%d

4

$ date +%e

4</PRE>

<P>The D option outputs the common numerical date format (month/day/year) used in the United States:

<BR></P>

<PRE>$ date +%D

09/28/91</PRE>

<P>Other options&#151;c, x, and X&#151;output the date in the format for whichever country was specified when SVR4 was installed. If you designated a country other than the United States during installation, try these options on your own; their output 
differs for different countries.

<BR></P>

<P>The options H and I output the hour in numeric form: H in 24 hour or military form, and I in 12 hour form.

<BR></P>

<PRE>$ date +%H

13

$ date +%I

1</PRE>

<P>The j option is rather interesting. It outputs the so-called &quot;Julian&quot; date&#151;the day as one of the 365 days of the year (or 366 in a leap year). The following example shows the j option returning the date for September 28:

<BR></P>

<PRE>$ date +%j

271</PRE>

<P>This option is useful when calculating the elapsed time between two dates.

<BR></P>

<P>The U and W options both output the week as one of the 52 weeks of the year (or 53 in a leap year). They differ in that U begins the week with Sunday and W begins the week with Monday. When executed on September 29, 1991, date produces the following:

<BR></P>

<PRE>$ date +%U

39

$ date +%W

39</PRE>

<P>The m option outputs the month as one of the 12 months of the year:

<BR></P>

<PRE>$ date +%m

09</PRE>

<P>The M option gives the minutes value in the range of 00 to 59, and the S option shows the seconds value in the range of 00 to 61 (to allow for a &quot;leap second&quot; or two):

<BR></P>

<PRE>$ date +%M

48

$ date +%S

41</PRE>

<P>The R option combines the H and M options, and the T option combines H, M, and S:

<BR></P>

<PRE>$ date +%R

13:48

$ date +%T

13:48:51</PRE>

<P>The p option outputs either AM or PM, and r combines I, M, S, and p:

<BR></P>

<PRE>$ date +%p

AM

$ date +%r

1:48:25 AM</PRE>

<P>The w option shows the day of the week as a number between 0 and 6, with 0 representing Sunday:

<BR></P>

<PRE>$ date +%w

6</PRE>

<P>The y option shows the year as a number between 00 and 99, and the Y option shows the year as a four-digit value:

<BR></P>

<PRE>$ date +%y

91

$ date +%Y

1991</PRE>

<P>The Z option outputs the abbreviated time zone name for your computer. In the following example, the computer is located in the Eastern time zone, but during Daylight Savings Time:

<BR></P>

<PRE>$ date +%Z

EDT</PRE>

<P>You can combine two or more options along with text strings to produce more descriptive outputs, such as the following:

<BR></P>

<PRE>$ date &quot;+Today is %A, the %e of %B, %Y&quot;

Today is Saturday, the 28 of September, 1991</PRE>

<H3 ALIGN="CENTER">

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

<FONT SIZE=4><B>Displaying a Monthly or Yearly Calendar with </B><B><I>cal</I></B>

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

<P>The cal command is very simple but quite handy when you need to see the calendar of any month (or all 12) in any given year. Used with no arguments, cal simply prints a calendar of the current month:

<BR></P>

<PRE>$ cal

February 1994

S  M Tu  W Th  F  S

1  2  3  4  5

6  7  8  9 10 11 12

13 14 15 16 17 18 19

20 21 22 23 24 25 26

27 28

$</PRE>

<P>If you specify a year, as in cal 1993, you get a calendar for all 12 months, but if you specify a month and a year, as in cal 4 1992, you get just that month.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="caution.gif" WIDTH = 37 HEIGHT = 35><B>CAUTION: </B>If you specify a year as a two-digit number, cal gives you the calendar for that year. In other words, cal 93 produces a calendar for the year 93, not the year 1993.

<BR></NOTE>

<HR ALIGN=CENTER>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="note.gif" WIDTH = 35 HEIGHT = 35><B>Historical Note: </B> In 1752 the calendar was adjusted to account for the &quot;discovery&quot; of leap year by eliminating 11 days (September 3 through September 13). Type cal 9 1752 to see the strangest 
month of all!

<BR></NOTE>

<HR ALIGN=CENTER>

<H3 ALIGN="CENTER">

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

<FONT SIZE=4><B>Getting Information About Users</B>

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

<P>To get information about users (including yourself), you can use several commands. The who command reports on users who are presently logged in, and finger reports on anyone who has an account on the computer. The id command reports information about 
the user who invokes it.

<BR></P>

<H4 ALIGN="CENTER">

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

<FONT SIZE=3><B>The </B><B><I>who</I></B><B> Command</B>

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

<P>The who command normally reports certain information about logged-in users. By using its options, you can specify that it report information about the processes initiated by init, and that it report reboots, changes to the system clock, and logoffs. 
(See chapters 18 and 35 for more information on processes and init.) If you invoke who with no options or arguments, you get the following output:

<BR></P>

<PRE>$ who

juucp      tty00        Sep 28 11:13

pjh        slan05       Sep 28 12:08</PRE>

<P>The output shows that two users are currently logged in: the user juucp, who logged in at 11:13, and the user pjh, who logged in at 12:08. Notice that juucp is logged in on a tty line (actually, juucp is a neighboring site that is called in over a 
modem) and that pjh logged in over a network (STARLAN, which is shortened to slan in who's output).

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="note.gif" WIDTH = 35 HEIGHT = 35><B>NOTE:</B> The term tty is short for teletypewriter, the first kind of terminal to be connected to a UNIX computer system. Even though terminals have advanced significantly, the terminology has not changed. A 
&quot;neighboring site&quot; is a computer that is located nearby.

<BR></NOTE>

<HR ALIGN=CENTER>

<P>The -u option adds the &quot;time since the last activity&quot; (also called the idle time) and the process ID number for each logged-in user. A &quot;process ID number&quot; or PID is an interger number assigned by UNIX to uniquely identify a given 
process (usually, a process is a program that is running). PIDs are needed in UNIX because they allow&#151;yea, encourage&#151;simultaneous running of multiple processes. (See Part IV, &quot;Process Control,&quot; for more information.)

<BR></P>

<PRE>$ who -u

juucp      tty00        Sep 28 11:13   .     5890

pjh        slan05       Sep 28 12:08   .     7354</PRE>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="note.gif" WIDTH = 35 HEIGHT = 35><B>NOTE:</B> If the user has been active within the last minute, who displays a dot (.) for the idle time.

<BR></NOTE>

<HR ALIGN=CENTER>

<P>The -T option reports a plus sign (+) if you are able to send messages to the user's terminal, or a minus sign (-) if it is not:

<BR></P>

<PRE>$ who -T

juucp    + tty00        Sep 28 11:13

pjh      + slan05       Sep 28 12:08</PRE>

<P>The -q (quick) option simply shows login IDs and a count of the logged-in users:

<BR></P>

<PRE>$ who -q

juucp    pjh

# users=2</PRE>

<P>There's a special case for who: who am i. This case is useful if you are logged in from several terminals under different accounts, and you forget which one you are currently using:

<BR></P>

<PRE>$ who am i

pjh        slan05       Sep 28 12:08</PRE>

<P><B>The </B><B><I>finger</I></B><B> Command</B>

<BR></P>

<P>You can use the finger command with or without arguments. Without arguments, finger's output looks a little like who's:

<BR></P>

<PRE>$ finger

Login       Name               TTY          Idle    When    Where

pjh      Pete Holsberg         pts000         6d Mon 13:03

ajh      Alan Holsberg         sxt/002           Sat 15:00</PRE>

<P>This output lists all currently logged users&#151;with a heading line&#151;plus the user's full name and the name of the remote computer (in the &quot;Where&quot; column) if the person is logging in over a network.

<BR></P>

<P>This command is more useful if you give it a person's login ID as an argument, as in the following example:

<BR></P>

<PRE>$ finger lam

Login name: lam                         In real life: Pak Lam dp168

Directory: /home/stu/lam                Shell: /usr/bin/ksh

On since Feb 23 19:07:31 on pts016       from pc2

2 days 21 hours Idle Time

No unread mail

No Plan.</PRE>

<P>Here, finger displays personal information for the user lam: his real name, home directory, which shell he uses, and when he last logged in and from which computer (pc2). The last line indicates that he does not have a text file called .plan in his home 

directory. The finger command displays the contents of .plan and .project if they exist. As you can see, users can reveal as much or as little of themselves as they choose.

<BR></P>

<P>If your computer is on a network and you know another person's e-mail address, you can display information about that person by issuing a command such as the following:

<BR></P>

<PRE>$ finger holsberg@pilot.njin.net</PRE>

<P>The finger command provides many options that can suppress one or more fields of the normal, long output. However, because finger responds so quickly, simply disregarding that extra information when it appears onscreen is easier than learning the 
appropriate option.

<BR></P>

<H4 ALIGN="CENTER">

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

<FONT SIZE=3><B>The </B><B><I>id</I></B><B> Command</B>

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

<P>The id command reports four things: the user ID number, login name, group ID number, and group name of the person who invokes it. If the real and effective IDs (see Chapter 44, &quot;System Security&quot;) are not the same, id prints both sets of 
values.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="note.gif" WIDTH = 35 HEIGHT = 35><B>NOTE:</B> id is often used in shell scripts to restart the use of a shell by a certain user or group of users.

<BR>

<BR>When a system administrator creates an account for a user, that user is given a login ID and also placed in a group. This is important because UNIX provides access to files according to whether the user is the owner of the file and whether the user 
belongs to the group that has been granted access to the file.

<BR></NOTE>

<HR ALIGN=CENTER>

<P>In the following example, the user ID is 102, the login name is pjh, and the user belongs to the root group, which is group number 0:

<BR></P>

<PRE>$ id

uid=102(pjh) gid=0(root)</PRE>

<H3 ALIGN="CENTER">

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

<FONT SIZE=4><B>Switching Accounts with </B><B><I>su</I></B>

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

<P>If you have more than one account on a system, you need not log out of one and then log into the second to use the second account. Instead, you can simply use the su (switch user) command. The system administrator uses su frequently to check a user's 
complaint, because su enables the administrator to become that user and run the programs that were causing problems.

<BR></P>

<P>The usual su command syntax is

<BR></P>

<PRE>su - <I>userID</I></PRE>

<P>The minus sign tells su to cause the current user to take on the identity, <I>userID</I>. To do this, su executes the user's shell&#151;as specified in the shell field of /etc/passwd&#151;and invokes /etc/profile and that user's .profile file. The su 
command then displays the user's normal environment. If the user omits the minus sign, su invokes the user's shell, but the environment is the same as before. Of course, before you can switch to another user, you must know that user's password&#151;unless 

you are the system administrator, in which case your privileges enable you to assume identities without using passwords.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="note.gif" WIDTH = 35 HEIGHT = 35><B>NOTE:</B> /etc/profile and .profile are files that control the working environment of each user.

<BR></NOTE>

<HR ALIGN=CENTER>

<P>Suppose, the system administrator wishes to become user lam:

<BR></P>

<PRE>#su - lam

$</PRE>

<P>To reassume identity as sysadm, he merely logs out of lam's account.

<BR></P>

<H3 ALIGN="CENTER">

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

<FONT SIZE=4><B>Learnig More About Commands with </B><B><I>man</I></B>

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

<P>UNIX supplies information about its commands in two forms: reference manuals (printed documentation called man pages) and online files. To use the man pages, you simply find the appropriate reference manual and look up the command. However, reference 
manuals seem to have lives of their own and are never to be found where you last put them. That's when online man pages&#151;and the man command&#151;become useful.

<BR></P>

<P>The simplest form of the man command takes a single argument: the name of the command in which you are interested. For example, here's the man page for man:

<BR></P>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产不卡视频一区| 风间由美性色一区二区三区| 国产精品成人免费在线| 欧美电影免费观看高清完整版在| 91丨porny丨国产| 久久精品国产77777蜜臀| 亚洲亚洲精品在线观看| 日本一区二区视频在线观看| 91精品国产一区二区三区| 92精品国产成人观看免费| 激情成人综合网| 蜜桃一区二区三区在线| 亚洲国产一区二区视频| 亚洲欧美日韩国产手机在线| 久久久国产精华| 精品久久久三级丝袜| 欧美一区二区三区免费观看视频 | 91美女片黄在线观看91美女| 久久精品国产在热久久| 午夜电影网亚洲视频| 亚洲精品日产精品乱码不卡| 中文字幕av一区二区三区高| 精品福利一二区| 欧美一区二区观看视频| 777奇米成人网| 欧美精品1区2区| 欧美日韩国产系列| 欧美色电影在线| 欧美日韩一卡二卡三卡| 欧美亚洲综合一区| 欧美三片在线视频观看| 欧美调教femdomvk| 欧美日韩免费一区二区三区| 欧美午夜一区二区三区免费大片| 91啪亚洲精品| 欧洲日韩一区二区三区| 欧美亚洲高清一区| 欧美狂野另类xxxxoooo| 欧美精品电影在线播放| 91精品国产欧美日韩| 日韩视频中午一区| 精品国产乱码久久久久久老虎 | 国产欧美日韩不卡免费| 中文在线一区二区| 亚洲人成在线播放网站岛国| 日韩伦理av电影| 亚洲卡通欧美制服中文| 一区二区三区四区在线播放| 成人一道本在线| 91免费在线播放| 欧美视频在线观看一区二区| 91精品国产福利| 精品久久国产老人久久综合| 国产亚洲欧美中文| 最新日韩av在线| 夜色激情一区二区| 美国毛片一区二区| 成人免费高清视频在线观看| 色94色欧美sute亚洲线路二| 91麻豆精品久久久久蜜臀| 精品精品欲导航| 中文字幕成人网| 亚洲五码中文字幕| 久久99久久99精品免视看婷婷| 国产美女精品在线| 一本久道中文字幕精品亚洲嫩| 在线播放91灌醉迷j高跟美女| 欧美成人精品3d动漫h| 中文字幕不卡的av| 亚洲一区二区在线播放相泽| 久久精品国产精品亚洲红杏| av一区二区三区四区| 欧美日韩在线播放三区| 精品粉嫩超白一线天av| 国产精品久久久久久久岛一牛影视 | 久久精品视频网| 亚洲精品国产精华液| 日韩高清在线观看| 成人性视频免费网站| 欧美猛男gaygay网站| 久久精品视频网| 性感美女久久精品| 国产精品中文字幕一区二区三区| 91香蕉国产在线观看软件| 欧美一区二区三区视频在线 | 欧洲精品在线观看| 欧美精品一区二区三区在线| 亚洲欧美日韩电影| 国内精品在线播放| 在线区一区二视频| 国产日产精品1区| 三级成人在线视频| 高清不卡一二三区| 91精品国产欧美一区二区| 成人欧美一区二区三区1314| 蜜桃视频在线观看一区二区| 日本韩国一区二区| 国产日韩亚洲欧美综合| 午夜在线电影亚洲一区| 成人v精品蜜桃久久一区| 日韩一区二区不卡| 亚洲图片欧美一区| 91在线视频播放| 日本一区二区三区久久久久久久久不| 日韩二区三区四区| 欧洲av一区二区嗯嗯嗯啊| 国产精品美女www爽爽爽| 久久激情综合网| 欧美精品tushy高清| 一区二区三区四区亚洲| 成人激情综合网站| 久久久精品综合| 精品一区二区三区免费| 欧美一区二区三区在线观看视频 | 国产精品一区二区三区四区| 这里只有精品免费| 午夜免费久久看| 欧美三片在线视频观看| 国产精品美女久久福利网站| 欧美午夜精品久久久久久孕妇| 久久久久久免费网| 久久99热99| 51精品秘密在线观看| 国产精品 日产精品 欧美精品| 日韩丝袜情趣美女图片| 男女性色大片免费观看一区二区| 欧洲av在线精品| 亚洲一二三级电影| 欧美日韩一级视频| 亚洲国产你懂的| 欧美日韩免费观看一区三区| 亚洲成人一区二区在线观看| 欧美日韩中文精品| 亚洲chinese男男1069| 6080亚洲精品一区二区| 热久久一区二区| 欧美电视剧免费观看| 极品少妇一区二区| 久久久亚洲国产美女国产盗摄 | 蜜芽一区二区三区| 日韩一卡二卡三卡国产欧美| 麻豆国产一区二区| 久久婷婷一区二区三区| 国产福利电影一区二区三区| 日本一区二区动态图| 91视频.com| 亚洲一区二区高清| 91麻豆精品国产无毒不卡在线观看 | 日本最新不卡在线| 26uuu久久天堂性欧美| 国产成人av在线影院| 亚洲欧美日韩在线| 欧美日韩综合一区| 蜜桃精品视频在线观看| 久久久久久免费网| 色综合网色综合| 亚洲成a天堂v人片| 精品不卡在线视频| 99精品一区二区| 午夜精品福利久久久| 久久午夜老司机| 99久久精品免费看国产| 亚洲国产成人91porn| 精品久久久久久久久久久久包黑料| 国产精品一卡二| 国产精品高潮呻吟久久| 欧美日韩一级视频| 国产精品一区二区黑丝| 亚洲自拍欧美精品| 26uuu精品一区二区| 91黄色在线观看| 麻豆91精品视频| 亚洲视频在线观看三级| 91精品国产免费久久综合| 成人午夜电影小说| 丝袜美腿亚洲一区二区图片| 久久精品亚洲精品国产欧美kt∨| 色婷婷亚洲精品| 黄色日韩三级电影| 亚洲午夜视频在线观看| 久久久久久久久久久99999| 欧洲国内综合视频| 国产成人亚洲综合a∨婷婷| 亚洲一区二区三区免费视频| 精品国产一区久久| 欧美国产欧美综合| 欧美一区二视频| 一本色道**综合亚洲精品蜜桃冫| 九色综合狠狠综合久久| 亚洲一本大道在线| 中文字幕不卡一区| 欧美一级日韩免费不卡| 91亚洲资源网| 国产毛片精品视频| 日韩福利电影在线| 又紧又大又爽精品一区二区| 久久精品人人爽人人爽| 91精品国模一区二区三区| 在线视频国内一区二区| 成人高清视频在线观看|