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

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

?? unx06.htm

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

<HEAD>

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

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

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

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

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

<P><A HREF="unx05.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="unx07.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">6 &#151; Popular File Tools</A></LI>

<UL>

<UL>

<UL>

<UL>

<LI>

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

<LI>

<A HREF="#I4">Determing the Nature of a File's Contents with file</A></LI>

<LI>

<A HREF="#I5">Browsing Through Text Files with more (page), and pg</A></LI>

<LI>

<A HREF="#I6">Searching for Stringswith the grep Family</A></LI>

<UL>

<LI>

<A HREF="#I7">Regular Expressions</A></LI>

<UL>

<LI>

<A HREF="#I8">Regular Expression Characters</A></LI>

<LI>

<A HREF="#I9">A Regular Expression with No Special Characters</A></LI>

<LI>

<A HREF="#I10">Special Characters</A></LI>

<LI>

<A HREF="#I11">Regular Expression Examples</A></LI>

<LI>

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

<LI>

<A HREF="#I13">The egrep Command</A></LI>

<LI>

<A HREF="#I14">The fgrep Command</A></LI></UL></UL>

<LI>

<A HREF="#I15">Compressing Files&#151;compress, uncompress, and zcat</A></LI>

<UL>

<LI>

<A HREF="#I16">Printing with pr</A></LI></UL>

<LI>

<A HREF="#I17">Printing Hard Copy Output</A></LI>

<UL>

<LI>

<A HREF="#I18">Requesting To Print</A></LI>

<UL>

<LI>

<A HREF="#I19">The lp Command</A></LI>

<LI>

<A HREF="#I20">The cancel Command</A></LI></UL>

<LI>

<A HREF="#I21">Getting Printer and Print Request Status</A></LI></UL>

<LI>

<A HREF="#I22">Comparing Directories with dircmp</A></LI>

<LI>

<A HREF="#I23">Encrypting a File with the crypt Command</A></LI>

<LI>

<A HREF="#I24">Printing the Beginning or End of a File with head and tail</A></LI>

<LI>

<A HREF="#I25">Pipe Fitting with tee</A></LI>

<LI>

<A HREF="#I26">Updating a File's Time and Date with touch</A></LI>

<LI>

<A HREF="#I27">Splitting Files with split and csplit</A></LI>

<LI>

<A HREF="#I28">Comparing Files with cmp and diff</A></LI>

<UL>

<LI>

<A HREF="#I29">The cmp Command</A></LI>

<LI>

<A HREF="#I30">The dif command</A></LI></UL>

<LI>

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



<H1 ALIGN="CENTER">

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

<BR>

<FONT SIZE=5><A ID="I2" NAME="I2"></A><B>6 &#151; Popular File Tools</B>

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

<H5 ALIGN="CENTER">

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

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

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

<P>Files are the heart of UNIX. Unlike most other operating systems, UNIX was designed with a simple, yet highly sophisticated, view of files: Everything is a file. Information stored in an area of a disk or memory is a file; a directory is a file; the 
keyboard is a file; the screen is a file.

<BR></P>

<P>This single-minded view makes it easy to write tools that manipulate files, because files have no structure&#151;UNIX sees every file merely as a simple stream of bytes. This makes life much simpler for both the UNIX programmer and the UNIX user. The 
user benefits from being able to send the contents of a file to a command without having to go through a complex process of opening the file. In a similar way, the user can capture the output of a command in a file without having previously created that 
file. And perhaps most importantly, the user can send the output of one command directly to the input of another, using memory as a temporary storage device or file. Finally, users benefit from UNIX's unstructured files because they are simply easier to 
use than files that must conform to one of several highly structured formats.

<BR></P>

<H3 ALIGN="CENTER">

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

<FONT SIZE=4><B>Determing the Nature of a File's Contents with </B><B><I>file</I></B>

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

<P>A user&#151;especially a power user&#151;must take a closer look at a file before manipulating it. If you've ever sent a binary file to a printer, you're aware of the mess that can result. Murphy's Law assures that every binary file includes a string of 

bytes that does one or more of the following:

<BR></P>

<UL>

<LI>Spew a ream of paper through the printer before you can shut it off, printing just enough on each page to render the paper fit only for the recycling bin

<BR>

<BR></LI>

<LI>Put the printer into a print mode that prints all characters at 1/10 their intended size

<BR>

<BR></LI>

<LI>Lock your keyboard

<BR>

<BR></LI>

<LI>Dump core&#151;that is, create a file consisting of whatever was in memory at that instant of time!

<BR>

<BR></LI></UL>

<P>In a similar way, sending a binary file to the screen can lock the keyboard, put the screen in a mode that changes the displayed character set to one that is clearly not English, dump core, and so on.

<BR></P>

<P>While it's true that many files already stored on the system&#151;and certainly every file you create with a text editor (see Chapter 7)&#151;are text files, many are not. UNIX provides a command, file, that attempts to determine the nature of the 
contents of files when you supply their file names as arguments. You can invoke the file command in one of two ways:

<BR></P>

<PRE>file [-h] [-m <I>mfile</I>] [-f <I>ffile</I>] <I>arg(s)</I>

file [-h] [-m <I>mfile</I>] -f <I>ffile</I></PRE>

<P>The file command performs a series of tests on each file in the list of <I>arg(s)</I> or on the list of files whose names are contained in the file <I>ffile</I>. If the file being tested is a text file, file examines the first 512 bytes and tries to 
determine the language in which it is written. The identification is worded by means of the contents of a file called /etc/magic. If you don't like what's in the file, you can use the -m mfile option, replacing mfile with the name of the &quot;magic 
file&quot; you'd like to use. (Consult your local magician for suitable spells and potions!) Here are the kinds of text files that Unixware Version 1.0's file command can identify:

<BR></P>

<UL>

<LI>Empty files

<BR>

<BR></LI>

<LI>SCCS files

<BR>

<BR></LI>

<LI>troff (typesetter runoff) output files

<BR>

<BR></LI>

<LI>Data files

<BR>

<BR></LI>

<LI>C program text files (with or without garbage)

<BR>

<BR></LI>

<LI>FORTRAN program text files (with or without garbage)

<BR>

<BR></LI>

<LI>Assembler program text files (with or without garbage)

<BR>

<BR></LI>

<LI>[nt]roff, tbl, or eqn input text (with or without garbage)

<BR>

<BR></LI>

<LI>Command text files (with or without garbage)

<BR>

<BR></LI>

<LI>English text files (with or without garbage)

<BR>

<BR></LI>

<LI>ASCII text files (with or without garbage)

<BR>

<BR></LI>

<LI>PostScript program text files (with or without garbage)

<BR>

<BR></LI></UL>

<P>Don't be concerned if you're not familiar with some of these kinds of text. Many of them are peculiar to UNIX and are explained in later chapters.

<BR></P>

<P>If the file is not text, file looks near the beginning of the file for a magic number&#151;a number or string that is associated with a file type; an arbitrary value that is couple with a descriptive phrase. Then file uses /etc/magic, which provides a 
database of magic numbers and kinds of files, or the file specified as <I>mfile</I> to determine the file's contents. If the file being tested is a symbolic link, file follows the link and tries to determine the nature of the contents of the file to which 

it is linked. The -h option causes file to ignore symbolic links.

<BR></P>

<P>The /etc/magic file contains the table of magic numbers and their meanings. For example, here is an excerpt from Unixware Version 1.0's /etc/magic file. The number following uxcore: is the magic number, and the phrase that follows is the file type. The 

other columns tell file how and where to look for the magic number:

<BR></P>

<PRE>&gt;16  short    2        uxcore:231     executable

0    string            uxcore:648     expanded ASCII cpio archive

0    string            uxcore:650     ASCII cpio archive

&gt;1   byte     0235     uxcore:571     compressed data

0    string            uxcore:248     current ar archive

0    short    0432     uxcore:256     Compiled Terminfo Entry

0    short    0434     uxcore:257     Curses screen image

0    short    0570     uxcore:259     vax executable

0    short    0510     uxcore:263     x86 executable

0    short    0560     uxcore:267     WE32000 executable

0    string   070701   uxcore:565     DOS executable (EXE)

0    string   070707   uxcore:566     DOS built-in

0    byte     0xe9     uxcore:567     DOS executable (COM)

0    short    0520     uxcore:277     mc68k executable

0    string            uxcore:569     core file (Xenix)

0    byte     0x80     uxcore:280     8086 relocatable (Microsoft)</PRE>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="caution.gif" WIDTH = 37 HEIGHT = 35><B>CAUTION:</B> Human beings cannot read any of the files listed in this excerpt, so you should not send any of these files to the screen or the printer. The same is true for any of the previously listed text 
files that have garbage.

<BR></NOTE>

<HR ALIGN=CENTER>

<H3 ALIGN="CENTER">

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

<FONT SIZE=4><B>Browsing Through Text Files with </B><B><I>more (page)</I></B><B>, and </B><B><I>pg</I></B>

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

<P>After you identify a file as being a text file that humans can read, you may want to read it. The cat command streams the contents of a file to the screen, but you must be quick with the Scroll Lock (or equivalent) key so that the file content does not 

flash by so quickly that you cannot read it (your speed-reading lessons notwithstanding). UNIX provides a pair of programs that present the contents of a file one screen at a time.

<BR></P>

<P>The more(page) programs are almost identical, and will be discussed as if they were a simple program. The only differences are the following:

<BR></P>

<UL>

<LI>page clears the screen automatically between pages, but more does not.

<BR>

<BR></LI>

<LI>more provides a two-line overlap from one screen to the next, while page provides only a one-line overlap.

<BR>

<BR></LI></UL>

<P>Both more and page have several commands, many of which take a numerical argument that controls the number of times the command is actually executed. You can issue these commands while using the more or page program (see the syntax below), and none of 
these commands are echoed to the screen. Table 6.1 lists the major commands.

<BR></P>

<PRE><B>more</B> [-<B>cdflrsuw</B>] [-<I>lines</I>] [+<I>linenumber</I>] [+/<I>pattern</I>] [<I>file(s)</I>]

<B>page</B> [-<B>cdflrsuw</B>] [-<I>lines</I>] [+<I>linenumber</I>] [+/<I>pattern</I>] [<I>file(s)</I>]</PRE>

<UL>

<LH><B>Table 6.1. Commands for </B><B>more(page)</B>

<BR></LH></UL>

<TABLE BORDER>

<TR>

<TD>

<PRE><I>Command</I>

<BR></PRE>

<TD>

<PRE><I>Meaning</I>

<BR></PRE>

<TR>

<TD>

<P><I>n</I>Spacebar</P>

<TD>

<P>If no positive number is entered, display the next screenfull. If an <I>n</I> value is entered, display <I>n</I> more lines.</P>

<TR>

<TD>

<P><I>n</I>Return</P>

<TD>

<P>If no positive number is entered, display another line. If an <I>n</I> value is entered, display <I>n</I> more lines. (Depending on your keyboard, you can press either the Return or Enter key.)</P>

<TR>

<TD>

<P>n^D, nd</P>

<TD>

<P>If no positive number is entered, scroll down 11 more lines. If an n value is given, scroll the screen down n times.</P>

<TR>

<TD>

<P>nz</P>

<TD>

<P>Same as nSpacebar, except that if an n value is entered, it becomes the new number of lines per screenfull.</P>

<TR>

<TD>

<P><I>n</I>^B, <I>n</I>b</P>

<TD>

<P>Skip back <I>n</I> screensfull and then print a screenfull.</P>

<TR>

<TD>

<P>q, Q</P>

<TD>

<P>Exit from more or page.</P>

<TR>

<TD>

<P>=</P>

<TD>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩免费高清一区色橹橹 | 视频一区欧美精品| 99久久777色| 亚洲女女做受ⅹxx高潮| 99久久亚洲一区二区三区青草| 久久九九久久九九| 成人免费视频app| 亚洲免费av在线| 欧美日韩三级视频| 久久国产精品无码网站| 久久免费看少妇高潮| 成人免费毛片a| 一区二区三区欧美在线观看| 欧美精品一二三| 九九精品视频在线看| 欧美国产禁国产网站cc| 色综合久久精品| 麻豆91在线看| 国产精品久久久久久久久久久免费看| 欧美精品一区二区三区蜜桃视频 | 一本在线高清不卡dvd| 亚洲国产精品久久不卡毛片| 91精品一区二区三区久久久久久| 美女诱惑一区二区| 国产女同性恋一区二区| 在线视频你懂得一区二区三区| 日韩av电影免费观看高清完整版 | 最新高清无码专区| 91精品国产综合久久久蜜臀粉嫩| 国产乱理伦片在线观看夜一区| 国产精品高潮呻吟久久| 日韩一二三区视频| 色综合天天做天天爱| 麻豆精品在线播放| 一级特黄大欧美久久久| 久久综合九色综合97_久久久| 99久久久无码国产精品| 麻豆精品视频在线观看视频| 中文字幕中文字幕在线一区| 日韩手机在线导航| 色综合天天综合网天天狠天天 | 国产一区二区三区在线看麻豆| 亚洲欧美韩国综合色| www欧美成人18+| 欧美日韩国产首页在线观看| 成人免费视频国产在线观看| 蜜臀99久久精品久久久久久软件 | 国产欧美日韩在线视频| 欧美另类z0zxhd电影| 97久久超碰国产精品| 国产在线一区二区| 日日摸夜夜添夜夜添精品视频| 国产精品国产自产拍在线| 欧美一级片在线| 欧美午夜精品免费| 成人的网站免费观看| 国产一区二区三区在线看麻豆| 日韩av电影免费观看高清完整版 | 欧美性猛交xxxxxxxx| 成人av一区二区三区| 国产一区在线看| 蜜桃一区二区三区在线观看| 午夜精品影院在线观看| 亚洲精品免费电影| 中文字幕一区二区5566日韩| 久久精品欧美日韩精品| 日韩免费福利电影在线观看| 欧美一区二区三区在线电影| 欧美视频一区二区在线观看| 色av综合在线| 日本精品一区二区三区高清| av中文一区二区三区| 播五月开心婷婷综合| 国产成人在线网站| 国产一区二区三区免费在线观看| 麻豆中文一区二区| 精品一区二区三区在线观看| 久久电影网站中文字幕| 麻豆精品视频在线| 经典三级视频一区| 国产一区二区导航在线播放| 国产一区二区成人久久免费影院 | 欧美成人伊人久久综合网| 91精品国产综合久久香蕉的特点| 欧美制服丝袜第一页| 色88888久久久久久影院野外| 色综合中文字幕国产 | 91久久线看在观草草青青 | 高清国产一区二区三区| 高清国产一区二区| 91麻豆国产福利在线观看| 91影院在线观看| 日本韩国精品在线| 欧美人伦禁忌dvd放荡欲情| 欧美一区二区成人6969| 六月丁香婷婷久久| 亚洲综合激情另类小说区| 精品成a人在线观看| 亚洲三级免费电影| 制服.丝袜.亚洲.中文.综合 | 国产99久久久国产精品| 成人黄色小视频| 欧美主播一区二区三区| 日韩精品一区二区三区蜜臀| 久久女同互慰一区二区三区| 中文字幕一区二区三区在线不卡| 亚洲一区免费在线观看| 青青草97国产精品免费观看无弹窗版 | 国产在线精品一区二区三区不卡 | 在线视频综合导航| 欧美一区午夜视频在线观看| 久久精品一级爱片| 亚洲精品欧美综合四区| 另类的小说在线视频另类成人小视频在线 | a4yy欧美一区二区三区| 欧美日韩一区高清| 久久精品亚洲麻豆av一区二区| 国产精品对白交换视频| 午夜不卡在线视频| 成人高清免费观看| 91精品国产免费| 国产精品福利一区| 久久综合狠狠综合久久激情 | 亚洲第四色夜色| 美女性感视频久久| 99久久免费视频.com| 日韩限制级电影在线观看| 中文字幕精品一区| 日韩高清一级片| 91丨porny丨最新| 精品国产不卡一区二区三区| 亚洲黄一区二区三区| 国产一区二区视频在线播放| 欧美日韩和欧美的一区二区| 国产欧美一区二区在线| 亚洲成av人在线观看| 成人精品gif动图一区| 日韩欧美一级二级| 亚洲大尺度视频在线观看| 不卡在线观看av| 久久综合九色综合欧美亚洲| 日韩制服丝袜av| 91传媒视频在线播放| 国产一区二区三区久久久| 欧美一a一片一级一片| 国产精品丝袜在线| 国产精品中文欧美| 日韩欧美色电影| 天天操天天干天天综合网| 91看片淫黄大片一级在线观看| 国产日韩av一区| 国产福利视频一区二区三区| 日韩美女视频一区二区在线观看| 亚洲一区二区av电影| 99久久精品一区| 国产精品麻豆网站| 成人免费精品视频| 亚洲国产精华液网站w| 国内精品国产成人国产三级粉色| 6080国产精品一区二区| 亚洲自拍偷拍九九九| 亚洲欧美另类久久久精品| 久久久久久久国产精品影院| 久久精品亚洲乱码伦伦中文| 激情文学综合网| 欧美大度的电影原声| 免费观看在线综合色| 欧美性色黄大片| 亚洲成人自拍偷拍| 欧美日韩高清一区二区三区| 亚洲午夜成aⅴ人片| 91久久线看在观草草青青| 亚洲一区中文在线| 欧美日韩大陆在线| 日本亚洲视频在线| 日韩精品中午字幕| 国产一区二区伦理片| 国产精品久久久久国产精品日日 | 国产乱子轮精品视频| 久久蜜桃av一区精品变态类天堂 | 99久久婷婷国产精品综合| 最新热久久免费视频| 一本色道久久综合亚洲精品按摩| 亚洲激情五月婷婷| 欧美精品在线观看播放| 日韩av中文在线观看| 精品久久国产老人久久综合| 国产精品亚洲午夜一区二区三区 | 久久夜色精品一区| 国产成人鲁色资源国产91色综| 国产精品三级久久久久三级| av一区二区三区在线| 亚洲图片有声小说| 91精品国产乱| 盗摄精品av一区二区三区| 亚洲精品日韩专区silk| 日韩精品资源二区在线| 不卡一区二区在线| 午夜久久久影院| 国产亚洲成年网址在线观看|