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

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

?? unx05.htm

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

<HEAD>

<TITLE>UNIX Unleashed unx05.htm</TITLE>

<LINK REL="ToC" HREF="index.htm">

<LINK REL="Next" HREF="unx06.htm">

<LINK REL="Previous" HREF="unx04.htm"></HEAD>

<BODY TEXT="#000000" LINK="#0000FF" VLINK="#800080" bgcolor=white>

<P><A HREF="unx04.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="unx06.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><UL>

<LI>

<A HREF="#I1">5</A></LI>

<UL>

<LI>

<A HREF="#I2">Popular Tools</A></LI>

<UL>

<UL>

<UL>

<LI>

<A HREF="#I3">By Pete Holsberg</A></LI></UL></UL>

<LI>

<A HREF="#I5">Making Calculations with dc and bc</A></LI>

<UL>

<LI>

<A HREF="#I6">Calculating with bc</A></LI>

<LI>

<A HREF="#I7">Calculating with dc</A></LI></UL>

<LI>

<A HREF="#I8">Finding the Date and Time</A></LI>

<LI>

<A HREF="#I9">Displaying a Monthly or Yearly Calendar with cal</A></LI>

<LI>

<A HREF="#I10">Getting Information About Users</A></LI>

<UL>

<LI>

<A HREF="#I11">The who Command</A></LI>

<LI>

<A HREF="#I12">The id Command</A></LI></UL>

<LI>

<A HREF="#I13">Switching Accounts with su</A></LI>

<LI>

<A HREF="#I14">Learnig More About Commands with man</A></LI>

<LI>

<A HREF="#I15">Finding Information About Disk Utilization with du and df</A></LI>

<UL>

<LI>

<A HREF="#I16">Summarizing Disk Usage with du</A></LI>

<LI>

<A HREF="#I17">Reporting Blocks and Files with df</A></LI></UL>

<LI>

<A HREF="#I18">Summary</A></LI></UL></UL></UL>



<H1 ALIGN="CENTER">

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

<BR>

<FONT SIZE=5><B>5</B>

<BR></FONT></A></CENTER></H1>

<H2 ALIGN="CENTER">

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

<FONT SIZE=5><B>Popular Tools</B>

<BR></FONT></A></CENTER></H2>

<H5 ALIGN="CENTER">

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

<FONT SIZE=3><B>By Pete Holsberg</B>

<BR></FONT></A></CENTER></H5>

<P><A ID="I4" NAME="I4"></A>UNIX is known not only for its longevity and versatility as an operating system, but also for the variety and number of utility programs that UNIX publishers provide. UNIX users have long called these programs tools because of 
the neat little things each one does and for their capability to be combined into more specialized utilities. (See Chapters 11, 12, and 13 for information on shell programming.)

<BR></P>

<P>Tools usually provide information or manipulate files and their contents. This chapter deals with the most general of information-provider tools&#151;a pocketful of handy things that you use all the time and those special few that you keep at hand for 
certain special jobs. These tools enable you to do mathematical calculations without your pocket or desk calculator, check the time and date, get information about yourself and other users, find out details about commands on your system, and check your 
disk space. After dealing with these tools for a while, you'll find yourself using them without thinking, just as you might use one of the attachments on your Swiss Army knife.

<BR></P>

<H3 ALIGN="CENTER">

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

<FONT SIZE=4><B>Making Calculations with </B><B><I>dc</I></B><B> and </B><B><I>bc</I></B>

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

<P>UNIX has two calculator programs that you can use from the command line: dc and bc. The dc (desk calculator) program uses Reverse Polish Notation (RPN), familiar to everyone who has used Hewlett-Packard pocket calculators, and the bc (basic calculator) 

program uses the more familiar algebraic notation. Both programs perform essentially the same calculations.

<BR></P>

<H4 ALIGN="CENTER">

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

<FONT SIZE=3><B>Calculating with </B><B><I>bc</I></B>

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

<P>The basic calculator, bc, can do calculations to any precision that you specify. Therefore, if you know how to calculate pi and want to know its value to 20, 50, or 200 places, for example, use bc. This tool can add, subtract, multiply, divide, and 
raise a number to a power. It can take square roots, compute sines and cosines of angles, calculate exponentials and logarithms, and handle arctangents and Bessel functions. In addition, it contains a programming language whose syntax looks much like that 

of the C programming language (see Chapter 17, &quot;C Language&quot;). This means that you can use the following:

<BR></P>

<UL>

<LI>Simple and array variables

<BR>

<BR></LI>

<LI>Expressions

<BR>

<BR></LI>

<LI>Tests and loops

<BR>

<BR></LI>

<LI>Functions that you define

<BR>

<BR></LI></UL>

<P>Also, bc can take input from the keyboard, from a file, or from both.

<BR></P>

<P>Here are some examples of bc receiving input from the keyboard:

<BR></P>

<PRE>$ <B>bc</B>

2*3

6</PRE>

<P>To do multiplication, all you have to do is enter the two values with an asterisk between them. To exit from bc, just type <B>Ctrl+d</B>. However, you can also continue giving bc more calculations to do.

<BR></P>

<P>Here's a simple square root calculation (as a continuation of the original bc command):

<BR></P>

<PRE>sqrt(11)

3</PRE>

<P>Oops! The default behavior of bc is to treat all numbers as integers. To get floating-point numbers (that is, numbers with decimal points in them), use the scale command. For example, the following input tells bc that you want it to set four decimal 
places and then try the square root example again:

<BR></P>

<PRE>scale=4

sqrt(11)

3.3166</PRE>

<P>In addition to setting the number of decimal places with scale, you can set the number of significant digits with length.

<BR></P>

<P>You need not always use base-10 for all your calculations, either. For example, suppose that you want to calculate the square root of the base-8 (octal) number, 11. First change the input base to 8 and then enter the same square root command as before 
to do the calculation:

<BR></P>

<PRE>ibase=8

sqrt(11)

3.0000

Ctrl+D

$</PRE>

<P>This result is correct because octal 11 is decimal 9 and the square root of 9 is 3 in both octal and decimal.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="imp.gif" WIDTH = 68 HEIGHT = 35><B>TIP: </B>If you want to change back to base 10, you must supply the octal value of 10 to the ibase command. It's simpler to exit from bc&#151;by pressing <B>Ctrl+D</B>&#151;and then restart the program.

<BR></NOTE>

<HR ALIGN=CENTER>

<P>You can use a variable even without a program:

<BR></P>

<PRE>$ <B>bc</B>

x=5

10*x

50</PRE>

<P>Here's a simple loop in bc's C-like syntax:

<BR></P>

<PRE>y=1

while(y&lt;5){

y^2

y=y+1

}

1

4

9

16</PRE>

<P>The first line sets y to the value 1. The next four lines establish a loop: the middle two lines repeat as long as the value of y is less than 5 (while(y&lt;5)). Those two repeated lines cause bc to print the value of y-squared and then add one to the 
value of y. Note that bc doesn't display the value of a variable when it's on a line with an equals sign (or a while statement). Also, note the positions of the braces.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="caution.gif" WIDTH = 37 HEIGHT = 35><B>CAUTION: </B>Because bc is fussy about spaces and the placement of parentheses and braces, you may not get what you want the first time that you enter it. Unfortunately, the bc tool that you have and the one 

used for the examples in this book may differ.

<BR></NOTE>

<HR ALIGN=CENTER>

<P>Here's another, more compact kind of loop. It sets the initial value for y, tests the value of y, and adds one to the value of y, all on one line:

<BR></P>

<PRE>for (y = 1; y &lt;= 5; y = y + 1){

3*y

}

3

6

9

12

15</PRE>

<P>Initially, y is set to 1. Then the loop tests whether the variable is less than or equal to 5. Because it is, bc performs the calculation 3*y and prints 3. Next, 1 is added to the present value of y, making it 2. That's also less than 5, so bc performs 

the 3*y calculation, which results in 6 being printed. y is incremented to 3, which is then tested; because 3 is less than 5, 3*y is calculated again. At some point, bc increments y to 6, which is neither less than 5 nor equal to it, so that the loop 
terminates with no further calculation or display.

<BR></P>

<P>You can define and use new functions for the bc program. A bc function is a device that can take in one or more numbers and calculate a result. For example, the following function, s, adds three numbers:

<BR></P>

<PRE>define s(x,y,z){

return(x+y+z)

}</PRE>

<P>To use the s function, you enter a command such as the following:

<BR></P>

<PRE>s(5,9,22)

36</PRE>

<P>Each variable name and each function name must be a single lowercase letter. If you are using the math library, bc -l, (discussed below), the letters a, c, e, j, l, and s are already used.

<BR></P>

<P>If you have many functions that you use fairly regularly, you can type them into a text file and start bc by entering bc myfile.bc (where myfile is the name of text file). The bc program then knows those functions and you can invoke them without having 

to type their definitions again. If you use a file to provide input to bc, you can put comments in that file. When bc reads the file, it ignores anything that you type between /* and */.

<BR></P>

<P>If scale is 0, the bc program does modulus division (using the % symbol), which provides the remainder that results from the division of two integers, as in the following example:

<BR></P>

<PRE>scale=4

5/2

2.5000

5%2

0

scale=0

5/2

2

5%2

1</PRE>

<P>If scale is not 0, the numbers are treated as floating point even if they are typed as integers.

<BR></P>

<P>In addition to including C's increment operators (++ and &#151;), bc also provides some special assignment operators: +=, -=, *=, /=, and ^=. See Chapter 17, &quot;C Language,&quot; for further explanation.

<BR></P>

<P>The built-in math functions include the following:

<BR></P>

<TABLE BORDER>

<TR>

<TD>

<PRE><I>Function</I>

<BR></PRE>

<TD>

<PRE><I>Returns</I>

<BR></PRE>

<TR>

<TD>

<P>a(<I>x</I>)</P>

<TD>

<P>The arc tangent of x</P>

<TR>

<TD>

<P>c(<I>x</I>)</P>

<TD>

<P>The cosine of x</P>

<TR>

<TD>

<P>e(<I>x</I>)</P>

<TD>

<P>e raised to the x power</P>

<TR>

<TD>

<P>j(n,<I>x</I>)</P>

<TD>

<P>The Bessel function of n and x, where n is an integer and x is any real number</P>

<TR>

<TD>

<P>l(<I>x</I>)</P>

<TD>

<P>The natural logarithm of x</P>

<TR>

<TD>

<P>s(<I>x</I>)</P>

<TD>

<P>The sine of x</P></TABLE>

<P>To use these math functions, you must invoke bc with the -l option, as follows:

<BR></P>

<PRE>$ bc -l</PRE>

<H4 ALIGN="CENTER">

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

<FONT SIZE=3><B>Calculating with </B><B><I>dc</I></B>

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

<P>As mentioned earlier, the desk calculator, dc, uses RPN, so unless you're comfortable with that notation, you should stick with bc. Also, dc does not provide a built-in programming language, built-in math functions, or the capability to define 
functions. It can, however, take its input from a file.

<BR></P>

<P>If you are familiar with stack-oriented calculators, you'll find that dc is an excellent tool. It can do all the calculations that bc can and it also lets you manipulate the stack directly.

<BR></P>

<P>To display values, you must enter the p command. For example, to add and print the sum of 5 and 9, enter

<BR></P>

<PRE>5

9

+p

14</PRE>

<P>See your UNIX reference manual (different versions use different titles), or if you have them, view the on-line man pages for details on dc.

<BR></P>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合色一综合色88| 亚洲精品亚洲人成人网| 日本韩国精品一区二区在线观看| 国产经典欧美精品| 高清不卡一区二区| 99久久综合精品| 日本道在线观看一区二区| 91精品国产一区二区人妖| 911精品国产一区二区在线| 欧美日韩亚洲不卡| 精品国产乱码久久久久久图片 | 精品人在线二区三区| 精品日本一线二线三线不卡| 亚洲一区二区三区中文字幕在线| 日韩激情在线观看| 国产一区二三区好的| 成人精品鲁一区一区二区| 精品影视av免费| 不卡影院免费观看| 中文字幕国产精品一区二区| 亚洲影视在线播放| 91社区在线播放| 精品精品国产高清a毛片牛牛 | av在线不卡网| 久久久另类综合| 亚洲一区精品在线| 欧美视频在线一区二区三区 | 在线播放/欧美激情| 一区二区三区四区在线免费观看| 亚洲va中文字幕| 国产传媒久久文化传媒| 精品久久人人做人人爱| 国产一区二区在线电影| 国产日韩欧美精品一区| 蜜臀91精品一区二区三区| jizz一区二区| 亚洲激情自拍视频| 欧美日韩一区成人| 奇米888四色在线精品| 99久久伊人精品| 欧美成人伊人久久综合网| 国内精品国产成人国产三级粉色| 91黄色激情网站| 亚洲国产aⅴ成人精品无吗| 成人精品视频一区二区三区| 国产精品美女www爽爽爽| 久久精品国产一区二区三区免费看 | 国产黄色成人av| 国产精品久久久99| 国产乱一区二区| 日韩欧美电影一二三| 午夜精品久久久久久久99樱桃| 成人app在线| 亚洲综合成人网| 欧美一级国产精品| 五月婷婷综合网| 欧美精品一区二区三区蜜臀| 成人av第一页| 亚洲3atv精品一区二区三区| 久久婷婷一区二区三区| 91在线播放网址| 蜜臀va亚洲va欧美va天堂| 久久久久久久综合日本| 色婷婷综合五月| 亚洲欧美电影院| 色婷婷av一区| 国产揄拍国内精品对白| 亚洲人成影院在线观看| 欧美一区二区三区在| 99久久精品国产导航| 麻豆久久久久久久| 亚洲另类中文字| 国产三级精品在线| 欧美网站大全在线观看| 国产高清精品在线| 日韩和欧美的一区| 亚洲欧洲成人精品av97| 色琪琪一区二区三区亚洲区| 麻豆传媒一区二区三区| 日韩毛片一二三区| 91理论电影在线观看| 精品综合免费视频观看| 亚洲中国最大av网站| 中日韩av电影| 精品粉嫩aⅴ一区二区三区四区| 91在线视频免费观看| 国产精品12区| 毛片av中文字幕一区二区| 亚洲精品国产第一综合99久久| 久久精品一区二区| 成人午夜看片网址| 美女性感视频久久| 视频在线观看一区二区三区| 亚洲三级电影全部在线观看高清| 久久影院午夜论| 日韩亚洲欧美成人一区| 欧美日韩精品一区二区三区| 奇米一区二区三区av| 亚洲国产一区在线观看| 亚洲色图都市小说| 亚洲色图丝袜美腿| 国产精品福利在线播放| 日本一区二区三区高清不卡| 欧美精品一区二区精品网| 日韩午夜精品视频| 在线播放一区二区三区| 成人一区二区三区视频在线观看| 另类小说视频一区二区| 日本不卡一二三| 日韩不卡一区二区三区| 国产精品久久久久久久久动漫| 久久久亚洲欧洲日产国码αv| 日韩欧美一级片| 精品国产99国产精品| www久久久久| 国产午夜精品久久| 国产精品久久久久久久久免费桃花 | 久久女同互慰一区二区三区| 精品久久久久久最新网址| 日韩精品中文字幕一区二区三区 | 欧美成人vps| 欧美tk—视频vk| 久久久国产精品麻豆| 欧美激情中文不卡| 亚洲日本在线看| 亚洲成av人片观看| 奇米四色…亚洲| 国产精品一卡二| 99国产精品国产精品久久| 欧美视频在线观看一区二区| 欧美高清你懂得| 久久久精品免费免费| 自拍偷拍欧美精品| 日日欢夜夜爽一区| 激情综合五月天| 99久久婷婷国产综合精品| 欧美色窝79yyyycom| 精品久久一二三区| 亚洲欧洲成人精品av97| 午夜精品久久久久久久99樱桃| 另类中文字幕网| 91丨porny丨首页| 欧美精品高清视频| 2020国产精品| 一区二区三区四区乱视频| 日韩电影免费在线看| 成人高清免费在线播放| 欧美色大人视频| 国产调教视频一区| 午夜欧美视频在线观看| 韩国成人精品a∨在线观看| 99精品一区二区三区| 欧美一区二区三区免费视频| 中文字幕日韩欧美一区二区三区| 婷婷综合五月天| 99久久国产综合色|国产精品| 日韩一区二区电影| 亚洲人成伊人成综合网小说| 久久精品国内一区二区三区| 色狠狠一区二区| 久久久久亚洲蜜桃| 亚洲成a人片在线不卡一二三区| 国产一区二区三区视频在线播放| 色8久久精品久久久久久蜜| 国产亚洲欧洲997久久综合 | 久久99精品国产91久久来源| 91捆绑美女网站| 久久久久97国产精华液好用吗| 日韩精品电影在线| 色悠悠亚洲一区二区| 日本一区二区在线不卡| 热久久国产精品| 欧美日韩免费电影| 亚洲蜜臀av乱码久久精品蜜桃| 国产美女娇喘av呻吟久久| 欧美一区二区精品久久911| 一区二区欧美视频| 99久久国产免费看| 久久精品亚洲国产奇米99| 丝袜美腿亚洲一区二区图片| 欧美一区欧美二区| 五月天激情综合| 91福利国产成人精品照片| 中文字幕一区二区日韩精品绯色| 国精产品一区一区三区mba视频| 91麻豆精品国产91久久久久久久久| 亚洲美女屁股眼交| 99久久伊人精品| 亚洲欧洲国产专区| 91色婷婷久久久久合中文| 中文字幕免费观看一区| 国产一区二区中文字幕| 久久久亚洲精品石原莉奈| 国产一区二区三区综合| 久久久国际精品| 国产成人免费高清| 中文字幕在线观看不卡| 成年人网站91| 亚洲欧美成aⅴ人在线观看| 99精品视频一区二区三区|