0253-0254.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 322 行

HTML
322
字号
<HTML>



<HEAD>

<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>

</HEAD>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311046 //-->

<!-- TITLE=Linux Complete Command Reference//-->

<!-- AUTHOR=Red Hat//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=01 //-->

<!-- PAGES=0001-0736 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="0251-0252.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0255-0256.html">Next</A></CENTER></P>







<A NAME="PAGENUM-253"><P>Page 253</P></A>







<P><B>

DESCRIPTION

</B></P>



<P>The gzexe utility enables you to compress executables in place and have them automatically uncompress and execute

when you run them (at a penalty in performance). For example if you execute

gzexe /bin/cat, it will create the following two FILES:

</P>



<!-- CODE SNIP //-->

<PRE>

-r-xr-xr-x 1 root bin 9644 Feb 11 11:16 /bin/cat

-r-xr-xr-x 1 bin bin 24576 Nov 23 13:21 /bin/cat~

</PRE>

<!-- END CODE SNIP //-->



<P>/bin/cat~ is the original file and /bin/cat is the self-uncompressing executable file. You can remove

/bin/cat~ when you are sure that /bin/cat works properly.

</P>



<P>This utility is most useful on systems with very small disks.

</P>



<P><B>

OPTIONS

</B></P>



<TABLE>



<TR><TD>

_d

</TD><TD>

Decompress the given executables instead of compressing them

</TD></TR></TABLE>

<P><B>

SEE ALSO

</B></P>



<P>gzip(1), znew(1), zmore(1), zcmp(1), zforce(1)

</P>



<P><B>

CAVEATS

</B></P>



<P>The compressed executable is a shell script. This may create some security holes. In particular, the compressed

executable relies on the PATH ENVIRONMENT variable to find

gzip and some other utilities (tail, chmod, ln,

sleep).

</P>



<P><B>

BUGS

</B></P>



<P>gzexe attempts to retain the original file attributes on the compressed executable, but you may have to fix them manually

in some cases, using chmod or chown.

</P>



<H3><A NAME="ch01_ 109">

head

</A></H3>



<P>head&#151;Output the first part of FILES

</P>



<P><B>

SYNOPSIS

</B></P>



<!-- CODE SNIP //-->

<PRE>

head [_c N[bkm]] [_n N] [_qv] [--bytes=N[bkm]] [--lines=N] [--quiet] [--silent]

[--verbose] [--help] [--version] [file...]



head [_Nbcklmqv] [file...]

</PRE>

<!-- END CODE SNIP //-->



<P><B>

DESCRIPTION

</B></P>



<P>This manual page documents the GNU version of

head. head prints the first part (10 lines by default) of each given file;

it reads from standard input if no FILES are given or when a filename of

_ is encountered. If more than one file is given, it

prints a header consisting of the file's name enclosed in

==&gt; and &lt;== before the output for each file.

</P>



<P><B>

OPTIONS

</B></P>



<P>head accepts two option FORMATS: the new one, in which numbers are arguments to the option letters; and the old one,

in which the number precedes any option letters.

</P>



<TABLE>



<TR><TD>

_c N, --bytes N

</TD><TD>

Print first N bytes. N is a nonzero integer, optionally followed by one of the following characters

to specify a different unit.

</TD></TR></TABLE>



<TBL>

<COLS=3>

<C>

<C>

b

<C>

512-byte blocks.

<C>

<C>

k

<C>

1-kilobyte blocks.

<C>

<C>

m

<C>

1-megabyte blocks.





<TBL>

<COLS=2>

<C>

_l, _n N, --lines N

<C>

Print first N lines.

<C>

_q, --quiet, --silent

<C>

Never print filename headers.



<A NAME="PAGENUM-254"><P>Page 254</P></A>





<TABLE>



<TR><TD>

_v, --verbose

</TD><TD>

Always print filename headers.

</TD></TR><TR><TD>

--help

</TD><TD>

Print a usage message and exit with a nonzero status.

</TD></TR><TR><TD>

--version

</TD><TD>

Print version information on standard output, then exit.

</TD></TR></TABLE>



<!-- CODE SNIP //-->

<P>

                                              GNU Text Utilities

</P>

<!-- END CODE SNIP //-->



<H3><A NAME="ch01_ 110">

hexdump

</A></H3>



<P>hexdump&#151;ASCII, decimal, hexadecimal, octal dump

</P>



<P><B>

SYNOPSIS

</B></P>



<!-- CODE SNIP //-->

<PRE>

hexdump [-bcdovx] [-e format_string] [-f format_file] [-n length] [-s skip] [file ...]

</PRE>

<!-- END CODE SNIP //-->



<P><B>

DESCRIPTION

</B></P>



<P>The hexdump utility is a filter that displays the specified FILES, or the standard input, if no FILES are specified, in a

user-specified format.

</P>



<P>The OPTIONS are as follows:

</P>



<TABLE>



<TR><TD>

-b

</TD><TD>

One-byte octal display. Display the input offset in hexadecimal, followed by sixteen

space-separated, three-column, zero-filled bytes of input data, in octal, per line.

</TD></TR><TR><TD>

-c

</TD><TD>

One-byte character display. Display the input offset in hexadecimal, followed by sixteen

space-separated, three-column, space-filled, characters of input data per line.

</TD></TR><TR><TD>

-d

</TD><TD>

Two-byte decimal display. Display the input offset in hexadecimal, followed by eight

space-separated, five-column, zero-filled, two-byte units of input data, in unsigned decimal, per line.

</TD></TR><TR><TD>

-e format_string

</TD><TD>

Specify a format string to be used for displaying data.

</TD></TR><TR><TD>

-f format_file

</TD><TD>

Specify a file that contains one or more newline separated format strings. Empty lines and

lines whose first nonblank character is a hash mark

(#) are ignored.

</TD></TR><TR><TD>

-n length

</TD><TD>

Interpret only length bytes of input.

</TD></TR><TR><TD>

-o

</TD><TD>

Two-byte octal display. Display the input offset in hexadecimal, followed by eight

space-separated, six-column, zero-filled, two-byte quantities of input data, in octal, per line.

</TD></TR><TR><TD>

-s offset

</TD><TD>

Skip offset bytes from the beginning of the input. By default,

offset is interpreted as a decimal number. With a leading

0x or 0X, offset is interpreted as a hexadecimal number; otherwise, with

a leading 0, offset is interpreted as an octal number. Appending the character

b, k, or m to offset causes it to be interpreted as a multiple of 512, 1024, or 1048576, respectively.

</TD></TR><TR><TD>

-v

</TD><TD>

The -v option causes hexdump to display all input data. Without the

-v option, any number of groups of output lines, which would be identical to the immediately preceding group of

output lines (except for the input offsets), are replaced with a line comprised of a single asterisk.

</TD></TR><TR><TD>

-x

</TD><TD>

Two-byte hexadecimal display. Display the input

offset in hexadecimal, followed by eight, space-separated, four-column, zero-filled, two-byte quantities of input data, in hexadecimal, per line.

</TD></TR></TABLE>





<P>For each input file, hexdump sequentially copies the input to standard output, transforming the data according to the

format strings specified by the -e and -f OPTIONS, in the order that they were specified.

</P>



<P><B>

FORMATS

</B></P>



<P>A format string contains any number of format units, separated by whitespace. A format unit contains up to three items:

an iteration count, a byte count, and a format.

</P>



<P>The iteration count is an optional positive integer, which defaults to one. Each format is applied iteration count times.

</P>



<P>The byte count is an optional positive integer. If specified, it defines the number of bytes to be interpreted by each

iteration of the format.

</P>







<P><CENTER>

<a href="0251-0252.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0255-0256.html">Next</A></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?