亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
91国产免费看| 国产一区二区三区视频在线播放| 久久麻豆一区二区| 精品国产91亚洲一区二区三区婷婷| 在线一区二区三区四区五区| 日本精品裸体写真集在线观看 | 一本色道a无线码一区v| 91视频在线观看免费| 在线视频国内自拍亚洲视频| 欧洲色大大久久| 欧美蜜桃一区二区三区| 国产亚洲欧美色| 久久久99精品免费观看不卡| 中文字幕一区二区三区乱码在线| 国产欧美一二三区| 亚洲人妖av一区二区| 亚洲人被黑人高潮完整版| 亚洲午夜视频在线| 亚洲18女电影在线观看| 轻轻草成人在线| 从欧美一区二区三区| 色综合天天综合狠狠| 欧美精品第一页| 日韩欧美色电影| 国产精品国产三级国产普通话99 | 九色综合国产一区二区三区| 久久激情五月激情| 一区二区激情小说| 久久国产视频网| 国产中文一区二区三区| 日本黄色一区二区| 欧美日韩情趣电影| 久久青草国产手机看片福利盒子| 久久久久国产精品人| 国产精品国产三级国产a | 日本一区二区免费在线| 国产欧美一区二区三区在线看蜜臀 | 首页亚洲欧美制服丝腿| 国产米奇在线777精品观看| 懂色av一区二区三区免费观看| 99久久er热在这里只有精品66| 欧美人妇做爰xxxⅹ性高电影| 国产欧美日本一区视频| 亚洲成人av福利| 色综合久久综合中文综合网| 欧美电视剧在线观看完整版| 亚洲成a人v欧美综合天堂| 国产精品综合在线视频| 欧美日韩小视频| 成人免费视频在线观看| 国产自产v一区二区三区c| 欧美午夜电影在线播放| 中文字幕在线观看一区| 经典一区二区三区| 在线亚洲一区观看| 亚洲国产电影在线观看| 久久国产人妖系列| 欧美影院午夜播放| 91福利在线观看| 丰满少妇久久久久久久| 麻豆国产欧美日韩综合精品二区 | 亚洲一区av在线| 美女网站色91| 欧美私模裸体表演在线观看| 中文无字幕一区二区三区| 国产精品天美传媒沈樵| 久久超级碰视频| 日韩精品专区在线影院重磅| 日本中文字幕一区| 欧美性猛交一区二区三区精品| 亚洲欧美一区二区三区久本道91| 一本色道综合亚洲| 欧美激情中文字幕一区二区| 国内外精品视频| 555夜色666亚洲国产免| 一区二区三区.www| 91麻豆国产在线观看| 国产农村妇女精品| 粉嫩欧美一区二区三区高清影视 | 婷婷中文字幕综合| 国产一区二区三区电影在线观看| 欧美三级日韩在线| 一级特黄大欧美久久久| 国产成人综合自拍| 精品国产麻豆免费人成网站| 蜜桃精品视频在线观看| 91精品福利在线一区二区三区| 免费观看一级特黄欧美大片| 欧美喷潮久久久xxxxx| 亚洲一区二区3| 69堂国产成人免费视频| 美腿丝袜在线亚洲一区 | 国产日韩欧美在线一区| 国产成人在线视频播放| 精品久久久久99| 麻豆精品一区二区综合av| 欧美网站大全在线观看| 亚洲一区二区高清| 欧美日韩在线精品一区二区三区激情| 亚洲日本韩国一区| 91在线视频在线| 国产精品免费观看视频| 91成人免费在线| 久久超碰97中文字幕| 亚洲视频一二区| 91麻豆免费看| 久久综合狠狠综合久久激情| 日本中文一区二区三区| 日韩欧美专区在线| 国产精品国产三级国产普通话99| 国产精品一区二区免费不卡 | 亚洲伦在线观看| 久久99久久99精品免视看婷婷 | 国产精品久久久久久久午夜片| 粉嫩久久99精品久久久久久夜| 欧美日韩在线播放| 亚洲成人精品在线观看| 一本色道久久综合亚洲aⅴ蜜桃| 中文成人综合网| 91论坛在线播放| 国产在线精品一区二区三区不卡| 国产一区二区三区在线观看免费| 国产免费成人在线视频| 午夜欧美在线一二页| 精品播放一区二区| 国产99一区视频免费| 中文字幕精品—区二区四季| 欧美日韩国产高清一区二区三区| 国产亚洲欧美日韩日本| 日韩在线一二三区| 青青草原综合久久大伊人精品优势| 欧美日韩成人一区| 白白色 亚洲乱淫| 韩国理伦片一区二区三区在线播放| 久久久综合激的五月天| 日韩av网站在线观看| 日韩一卡二卡三卡四卡| 亚洲成人免费电影| 7777女厕盗摄久久久| 成人一级片在线观看| 日韩美女视频一区| 国产精品国产三级国产aⅴ中文 | 欧美日韩三级一区| 国产精品欧美一区二区三区| 国产精品 日产精品 欧美精品| 欧美激情一区不卡| 亚洲视频一区在线观看| 欧美日韩成人一区二区| 色综合久久天天| 丰满岳乱妇一区二区三区| 国产91精品露脸国语对白| 九九国产精品视频| 香蕉久久一区二区不卡无毒影院 | 欧美成人aa大片| 国产91精品免费| 欧美电影精品一区二区| 椎名由奈av一区二区三区| 不卡的av在线| 国产欧美一区二区精品秋霞影院 | 精品系列免费在线观看| 国产日产精品1区| 97久久精品人人爽人人爽蜜臀| 久久99精品国产91久久来源| 亚洲国产精品一区二区尤物区| 欧美一区三区四区| 91精品国产欧美一区二区成人| 欧美专区日韩专区| 91一区在线观看| 亚洲成a人片在线观看中文| 一区二区三区精品在线| 日韩成人免费看| 日韩中文字幕不卡| 国产精品午夜免费| 精品国产亚洲一区二区三区在线观看| 99精品久久99久久久久| 中文字幕欧美日韩一区| 久久久久久久久久久久久夜| 国产日产欧美一区二区视频| 中文字幕一区二区视频| 国产精品免费视频一区| 国产精品九色蝌蚪自拍| 亚洲美女区一区| 亚洲v中文字幕| 蜜桃一区二区三区在线观看| 精品一区二区三区免费视频| 老司机免费视频一区二区三区| 国产丶欧美丶日本不卡视频| 91免费观看国产| 91精品国产综合久久久久久久| 日韩欧美亚洲一区二区| 久久精品水蜜桃av综合天堂| 中文字幕一区日韩精品欧美| 午夜视频在线观看一区二区| 精品一区二区三区影院在线午夜 | 亚洲精品美腿丝袜| 日韩电影免费在线观看网站| 午夜精品视频一区| 国产sm精品调教视频网站| 一本色道久久综合亚洲精品按摩| 91激情在线视频|