diff --git a/COPYING b/COPYING new file mode 100644 index 00000000..d1e3b79e --- /dev/null +++ b/COPYING @@ -0,0 +1,397 @@ + GNU Free Documentation License + Version 1.2, November 2002 + + + Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (Thus, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +A section "Entitled XYZ" means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as "Acknowledgements", +"Dedications", "Endorsements", or "History".) To "Preserve the Title" +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. +O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. diff --git a/DOCS/00TRANSLATED b/DOCS/00TRANSLATED new file mode 100644 index 00000000..edb1584d --- /dev/null +++ b/DOCS/00TRANSLATED @@ -0,0 +1,743 @@ +man1/:.1 +man1/..1 +man1/[.1 +man1/a2p.1 +man1/ab.1 +man1/ac.1 +man1/access.1 +man1/ali.1 +man1/alias.1 +man1/apm.1 +man1/apropos.1 +man1/ar.1 +man1/arch.1 +man1/at.1 +man1/autorun.1 +man1/basename.1 +man1/bash.1 +man1/bg.1 +man1/biff.1 +man1/bind.1 +man1/break.1 +man1/builtin.1 +man1/builtins.1 +man1/bunzip2.1 +man1/bzcat.1 +man1/bzip2.1 +man1/bzip2recover.1 +man1/cal.1 +man1/cat.1 +man1/cce.1 +man1/cd.1 +man1/charset.1 +man1/chattr.1 +man1/chfn.1 +man1/chgrp.1 +man1/chmod.1 +man1/chown.1 +man1/chroot.1 +man1/chsh.1 +man1/chvt.1 +man1/cksum.1 +man1/clear.1 +man1/clusterdb.1 +man1/col.1 +man1/comm.1 +man1/command.1 +man1/compgen.1 +man1/complete.1 +man1/continue.1 +man1/cp.1 +man1/cpio.1 +man1/createdb.1 +man1/createlang.1 +man1/createuser.1 +man1/cut.1 +man1/date.1 +man1/dd.1 +man1/deallocvt.1 +man1/declare.1 +man1/df.1 +man1/diff.1 +man1/dig.1 +man1/dircolor.1 +man1/dircolors.1 +man1/dirname.1 +man1/dirs.1 +man1/disown.1 +man1/dnskeygen.1 +man1/dnsquery.1 +man1/dropdb.1 +man1/droplang.1 +man1/dropuser.1 +man1/du.1 +man1/dumpkeys.1 +man1/echo.1 +man1/ecpg.1 +man1/egrep.1 +man1/eject.1 +man1/emacs.1 +man1/enable.1 +man1/env.1 +man1/eval.1 +man1/ex.1 +man1/exec.1 +man1/exit.1 +man1/expand.1 +man1/export.1 +man1/false.1 +man1/fc.1 +man1/fg.1 +man1/fgrep.1 +man1/file.1 +man1/find.1 +man1/findsmb.1 +man1/finger.1 +man1/fmt.1 +man1/fold.1 +man1/free.1 +man1/ftp.1 +man1/gcc.1 +man1/gedit.1 +man1/getopts.1 +man1/git.1 +man1/gnroff.1 +man1/grep.1 +man1/groff.1 +man1/groups.1 +man1/gunzip.1 +man1/gview.1 +man1/gvim.1 +man1/gzip.1 +man1/hash.1 +man1/head.1 +man1/help.1 +man1/history.1 +man1/host.1 +man1/hostid.1 +man1/hostname.1 +man1/iconv.1 +man1/id.1 +man1/info.1 +man1/initdb.1 +man1/initex.1 +man1/initlocation.1 +man1/install.1 +man1/install-info.1 +man1/intro.1 +man1/ipcclean.1 +man1/jobs.1 +man1/kbd_mode.1 +man1/kill.1 +man1/killall.1 +man1/last.1 +man1/ld.1 +man1/ldd.1 +man1/let.1 +man1/listalias.1 +man1/ln.1 +man1/loadkeys.1 +man1/local.1 +man1/lockfile.1 +man1/logname.1 +man1/logout.1 +man1/ls.1 +man1/lsattr.1 +man1/mail.1 +man1/mailto.1 +man1/makeinfo.1 +man1/make_smbcodepage.1 +man1/man.1 +man1/md5sum.1 +man1/mencoder.1 +man1/mesg.1 +man1/minicom.1 +man1/mirror.1l +man1/mkdir.1 +man1/mkfifo.1 +man1/mknod.1 +man1/mkpasswd.1 +man1/mktemp.1 +man1/mode.1 +man1/more.1 +man1/mpg123.1 +man1/mplayer.1 +man1/mv.1 +man1/newgrp.1 +man1/nice.1 +man1/nmblookup.1 +man1/nohup.1 +man1/nroff.1 +man1/octave.1 +man1/octave-bug.1 +man1/octave-config.1 +man1/paste.1 +man1/perl.1 +man1/perlbook.1 +man1/perlboot.1 +man1/perlcn.1 +man1/perlcompile.1 +man1/perldata.1 +man1/perlfaq.1 +man1/perlfaq1.1 +man1/perlfaq2.1 +man1/perlfaq3.1 +man1/perlfaq7.1 +man1/perlfaq8.1 +man1/perlfaq9.1 +man1/perlform.1 +man1/perlfunc.1 +man1/perlnumber.1 +man1/perlsec.1 +man1/perlstyle.1 +man1/perltw.1 +man1/pg_config.1 +man1/pg_controldata.1 +man1/pg_ctl.1 +man1/pg_dump.1 +man1/pg_dumpall.1 +man1/pg_resetxlog.1 +man1/pg_restore.1 +man1/pgtclsh.1 +man1/pgtksh.1 +man1/popd.1 +man1/postgres.1 +man1/postmaster.1 +man1/printf.1 +man1/psfaddtable.1 +man1/psfgettable.1 +man1/psfstriptable.1 +man1/psql.1 +man1/pushd.1 +man1/pwd.1 +man1/quota.1 +man1/read.1 +man1/readonly.1 +man1/return.1 +man1/rgview.1 +man1/rgvim.1 +man1/rlogin.1 +man1/rm.1 +man1/rmdir.1 +man1/rvi.1 +man1/rview.1 +man1/rvim.1 +man1/scp.1 +man1/set.1 +man1/setleds.1 +man1/setmetamode.1 +man1/sh.1 +man1/shift.1 +man1/shopt.1 +man1/showfont.1 +man1/showkey.1 +man1/size.1 +man1/sleep.1 +man1/smbclient.1 +man1/smbcontrol.1 +man1/smbrun.1 +man1/smbsh.1 +man1/smbstatus.1 +man1/smbtar.1 +man1/sort.1 +man1/source.1 +man1/split.1 +man1/sq.1 +man1/ssh.1 +man1/stat.1 +man1/strings.1 +man1/stty.1 +man1/su.1 +man1/subst.1 +man1/sum.1 +man1/suspend.1 +man1/svn.1 +man1/svnadmin.1 +man1/svndumpfilter.1 +man1/svnlook.1 +man1/svnversion.1 +man1/sync.1 +man1/tac.1 +man1/tail.1 +man1/tar.1 +man1/tclsh.1 +man1/tcpdump.1 +man1/tee.1 +man1/testparm.1 +man1/testprns.1 +man1/tex.1 +man1/texi2dvi.1 +man1/texindex.1 +man1/times.1 +man1/touch.1 +man1/trap.1 +man1/troff.1 +man1/true.1 +man1/tty.1 +man1/type.1 +man1/typeset.1 +man1/ulimit.1 +man1/umask.1 +man1/unalias.1 +man1/uname.1 +man1/unicode_start.1 +man1/unicode_stop.1 +man1/uniq.1 +man1/unset.1 +man1/unsq.1 +man1/uptime.1 +man1/usleep.1 +man1/uuencode.1 +man1/vacuumdb.1 +man1/vi.1 +man1/view.1 +man1/vim.1 +man1/vimtutor.1 +man1/virtex.1 +man1/vt-is-UTF8.1 +man1/w.1 +man1/wait.1 +man1/wall.1 +man1/wbinfo.1 +man1/wc.1 +man1/whatis.1 +man1/who.1 +man1/wish.1 +man1/xargs.1 +man1/xmodmap.1 +man1/xpdf.1 +man1/xxd.1 +man1/yacc.1 +man1/yes.1 +man1/ypchfn.1 +man1/ypchsh.1 +man1/yppasswd.1 +man1/zcat.1 +man1/zipinfo.1 +man1/zless.1 +man2/accept.2 +man2/bind.2 +man2/close.2 +man2/create_module.2 +man2/execve.2 +man2/init_module.2 +man2/listen.2 +man2/open.2 +man2/query_module.2 +man2/read.2 +man2/send.2 +man2/write.2 +man3/basename.3 +man3/bindtextdomain.3 +man3/bzero.3 +man3/clearerr.3 +man3/exec.3 +man3/exit.3 +man3/fclose.3 +man3/fcloseall.3 +man3/fdopen.3 +man3/feof.3 +man3/ferror.3 +man3/fflush.3 +man3/fileno.3 +man3/flockfile.3 +man3/fopen.3 +man3/freopen.3 +man3/iconv_close.3 +man3/iconv_open.3 +man3/Object.3 +man3/setbuf.3 +man3/setbuffer.3 +man3/setlinebuf.3 +man3/setlocale.3 +man3/setvbuf.3 +man3/stderr.3 +man3/stdin.3 +man3/stdio.3 +man3/stdout.3 +man3/strcoll.3 +man3/strxfrm.3 +man3/ulimit.3 +man3/unlocked_stdio.3 +man4/console_codes.4 +man4/fifo.4 +man4/hd.4 +man5/acct.5 +man5/aliases.5 +man5/environ.5 +man5/fs.5 +man5/ftpaccess.5 +man5/group.5 +man5/host.conf.5 +man5/info.5 +man5/inittab.5 +man5/ipc.5 +man5/issue.5 +man5/keymaps.5 +man5/lilo.conf.5 +man5/lmhosts.5 +man5/locale.5 +man5/man.conf.5 +man5/man.config.5 +man5/motd.5 +man5/nologin.5 +man5/nscd.conf.5 +man5/nsswitch.5 +man5/passwd.5 +man5/proc.5 +man5/protocols.5 +man5/resolver.5 +man5/rpc.5 +man5/securetty.5 +man5/services.5 +man5/shells.5 +man5/smb.conf.5 +man5/smbpasswd.5 +man5/svnserve.conf.5 +man5/termcap.5 +man5/texinfo.5 +man5/ttytype.5 +man5/tzfile.5 +man5/utmp.5 +man6/zic2xpm.6 +man7/abort.7 +man7/alter_aggregate.7 +man7/alter_conversion.7 +man7/alter_database.7 +man7/alter_domain.7 +man7/alter_function.7 +man7/alter_group.7 +man7/alter_language.7 +man7/alter_operator_class.7 +man7/alter_schema.7 +man7/alter_sequence.7 +man7/alter_table.7 +man7/alter_trigger.7 +man7/alter_user.7 +man7/analyze.7 +man7/arp.7 +man7/ascii.7 +man7/begin.7 +man7/bootparam.7 +man7/charsets.7 +man7/checkpoint.7 +man7/close.7 +man7/cluster.7 +man7/comment.7 +man7/commit.7 +man7/copy.7 +man7/create_aggregate.7 +man7/create_cast.7 +man7/create_constraint_trigger.7 +man7/create_conversion.7 +man7/create_database.7 +man7/create_domain.7 +man7/create_function.7 +man7/create_group.7 +man7/create_index.7 +man7/create_language.7 +man7/create_operator.7 +man7/create_operator_class.7 +man7/create_rule.7 +man7/create_schema.7 +man7/create_sequence.7 +man7/create_table.7 +man7/create_table_as.7 +man7/create_trigger.7 +man7/create_type.7 +man7/create_user.7 +man7/create_view.7 +man7/deallocate.7 +man7/declare.7 +man7/delete.7 +man7/drop_aggregate.7 +man7/drop_cast.7 +man7/drop_conversion.7 +man7/drop_database.7 +man7/drop_domain.7 +man7/drop_function.7 +man7/drop_group.7 +man7/drop_index.7 +man7/drop_language.7 +man7/drop_operator.7 +man7/drop_operator_class.7 +man7/drop_rule.7 +man7/drop_schema.7 +man7/drop_sequence.7 +man7/drop_table.7 +man7/drop_trigger.7 +man7/drop_type.7 +man7/drop_user.7 +man7/drop_view.7 +man7/end.7 +man7/execute.7 +man7/explain.7 +man7/fetch.7 +man7/glob.7 +man7/grant.7 +man7/hier.7 +man7/icmp.7 +man7/insert.7 +man7/ip.7 +man7/LDP.7 +man7/lilyfaq.7 +man7/listen.7 +man7/load.7 +man7/locale.7 +man7/lock.7 +man7/mailaddr.7 +man7/man.7 +man7/mdoc.samples.7 +man7/move.7 +man7/netdevice.7 +man7/netlink.7 +man7/notify.7 +man7/packet.7 +man7/prepare.7 +man7/raw.7 +man7/regex.7 +man7/reindex.7 +man7/reset.7 +man7/revoke.7 +man7/roff.7 +man7/rollback.7 +man7/samba.7 +man7/select.7 +man7/select_into.7 +man7/set.7 +man7/set_constraints.7 +man7/set_session_authorization.7 +man7/set_transaction.7 +man7/show.7 +man7/signal.7 +man7/socket.7 +man7/start_transaction.7 +man7/suffix.7 +man7/tcp.7 +man7/truncate.7 +man7/udp.7 +man7/unicode.7 +man7/unix.7 +man7/unlisten.7 +man7/update.7 +man7/utf-8.7 +man7/vacuum.7 +man7/x25.7 +man8/badblocks.8 +man8/bdflush.8 +man8/blockdev.8 +man8/chat.8 +man8/chpasswd.8 +man8/convertquota.8 +man8/cron.8 +man8/dmesg.8 +man8/edquota.8 +man8/exportfs.8 +man8/fdisk.8 +man8/fsck.8 +man8/groupadd.8 +man8/groupdel.8 +man8/groupmod.8 +man8/halt.8 +man8/hdparm.8 +man8/ifconfig.8 +man8/imapd.8 +man8/inetd.8 +man8/init.8 +man8/iptables.8 +man8/iptables-restore.8 +man8/iptables-save.8 +man8/lilo.8 +man8/losetup.8 +man8/lspci.8 +man8/mailstats.8 +man8/MAKEDEV.8 +man8/makemap.8 +man8/mingetty.8 +man8/mkfs.8 +man8/mkswap.8 +man8/modinfo.8 +man8/named-bootconf.8 +man8/netstat.8 +man8/nmbd.8 +man8/ntsysv.8 +man8/ping.8 +man8/pppd.8 +man8/printcap.8 +man8/quotacheck.8 +man8/quotaoff.8 +man8/quotaon.8 +man8/quotastats.8 +man8/ramsize.8 +man8/rdev.8 +man8/repquota.8 +man8/rootflags.8 +man8/route.8 +man8/rpm.8 +man8/setclock.8 +man8/setquota.8 +man8/setserial.8 +man8/showmount.8 +man8/shutdown.8 +man8/smbd.8 +man8/smbmnt.8 +man8/smbmount.8 +man8/smbpasswd.8 +man8/smbspool.8 +man8/smbumount.8 +man8/svnserve.8 +man8/swapoff.8 +man8/swapon.8 +man8/swat.8 +man8/sync.8 +man8/tcpdump.8 +man8/tzselect.8 +man8/umount.8 +man8/useradd.8 +man8/userdel.8 +man8/usermod.8 +man8/vidmode.8 +man8/vmstat.8 +man8/xinetd.8 +man8/zdump.8 +man8/zic.8 +man9/cmanexample.9 +man9/cmanformat.9 +manl/cbdsqr.l +manl/lapack.l +manl/zdrot.l +manl/zdrscl.l +mann/after.n +mann/append.n +mann/array.n +mann/ArrowButton.n +mann/bell.n +mann/bgerror.n +mann/binary.n +mann/bindtags.n +mann/break.n +mann/Button.n +mann/catch.n +mann/cd.n +mann/chooseColor.n +mann/chooseDirectory.n +mann/ckalloc.n +mann/ckfree.n +mann/clipboard.n +mann/clock.n +mann/close.n +mann/ComboBox.n +mann/concat.n +mann/continue.n +mann/cursors.n +mann/dde.n +mann/destroy.n +mann/Dialog.n +mann/encoding.n +mann/eof.n +mann/error.n +mann/eval.n +mann/exec.n +mann/exit.n +mann/expr.n +mann/fblocked.n +mann/fconfigure.n +mann/fcopy.n +mann/fileevent.n +mann/file.n +mann/filename.n +mann/flush.n +mann/focusNext.n +mann/foreach.n +mann/format.n +mann/for.n +mann/gets.n +mann/global.n +mann/glob.n +mann/history.n +mann/html.n +mann/Http.n +mann/if.n +mann/incr.n +mann/info.n +mann/interp.n +mann/join.n +mann/keysyms.n +mann/LabelFrame.n +mann/lappend.n +mann/library.n +mann/lindex.n +mann/linsert.n +mann/list.n +mann/llength.n +mann/load.n +mann/loadTk.n +mann/lower.n +mann/lrange.n +mann/lreplace.n +mann/lsearch.n +mann/lsort.n +mann/MainFrame.n +mann/memory.n +mann/messageBox.n +mann/msgcat.n +mann/namespace.n +mann/Notebook.n +mann/open.n +mann/optionMenu.n +mann/option.n +mann/package.n +mann/packagens.n +mann/PagesManager.n +mann/palette.n +mann/PanedWindow.n +mann/pid.n +mann/pkgMkIndex.n +mann/popup.n +mann/proc.n +mann/ProgressBar.n +mann/puts.n +mann/pwd.n +mann/raise.n +mann/read.n +mann/regexp.n +mann/registry.n +mann/regsub.n +mann/rename.n +mann/resource.n +mann/re_syntax.n +mann/return.n +mann/safe.n +mann/scan.n +mann/ScrollableFrame.n +mann/ScrolledWindow.n +mann/seek.n +mann/selection.n +mann/send.n +mann/set.n +mann/socket.n +mann/source.n +mann/SpinBox.n +mann/split.n +mann/string.n +mann/subst.n +mann/switch.n +mann/Tcl.n +mann/tclvars.n +mann/tell.n +mann/time.n +mann/TitleFrame.n +mann/tk_dialog.n +mann/tkerror.n +mann/tk.n +mann/tkvars.n +mann/tkwait.n +mann/trace.n +mann/unknown.n +mann/unset.n +mann/update.n +mann/uplevel.n +mann/upvar.n +mann/variable.n +mann/vwait.n +mann/while.n diff --git a/DOCS/ChangeLog b/DOCS/ChangeLog new file mode 100644 index 00000000..b4ee0bf7 --- /dev/null +++ b/DOCS/ChangeLog @@ -0,0 +1,216 @@ +20040615 整理了一些 perl 文档 + +这些 perl 文档主要来自 linuxforum 的翻译计划,以及两只老虎工作室(台湾)的翻译工作 + +20031220 将原始文档加入raw目录 + + 1、将原始文档加入raw目录,以便修改和更新 + +20031205 打包工作基本完成 + + 1、现在有了520余篇手册页可用 + 2、已有的文档做了一些重新排版,主要是署名和NAME格式做了统一 + 3、tcl 文档全部转为 man 格式 + 4、samba 文档整理完毕 + 5、在http://sf.linuxforum.net 上发布了man-pages-zh_CN(rpm) 和manpages-zh(deb) + +20031025 打包工作进行中 + + 1、按照redhat rpm包命名规则,命名为man-pages-zh_CN,编码默\ + 认采用UTF-8。相应的GB编码的包命名为man-pages-zh_CN-gb。由\ + man文档转化为html 文件用于网络发布和浏览,打包名称为\ + man-pages-zh_CN-html + 2、按照debian deb包命名规则,命名为manpages-zh。繁体部分尚未完成。 + +200205 0.3发布 + +2001/10/27 0.2 发布 + [概述] +和上次发布有三个月的距离了让大家久等了.但是着三个月中 CMPP +发生的变化是非常大的,首先,CMPP 继续扩展到更多的发布版本中. +希望能有更多人能够分享到 CMPP 各个参与成员的劳动.同时也能因为 +CMPP 的一点菲薄之力而受益,我们的口号是,使用它就是对我们最好的支持! + +在这个版本里最显著的变化就是发生在 mann 里,在那里,mhss +先生为大家几乎贡献了所有 Tcl 的手册!这也可以说是 CMPP 迄 +今为止最大规模的手册系列了.这对许多喜爱Tcl 这种语言的朋友 +肯定是个大帮助.相信对 Tcl 在国内的普及和发展也有很大帮助. + +同时,我们保持了恒定的 man1 内容的更新,越有 30 多篇 +man1 的内容转化成了中文. + +还有一个进步是有网友已经开始着手 man2, man3 的内容了,这 +样,多所有的程序员朋友将是一个新的开端.这些手册页将给所 +有程序员朋友更多帮助!请尽情使用吧! + +2001/07/21 0.1 发布, +[概述] +经过一段时间的工作,我们很骄傲地宣布 cman 0.1.0 的发布, +这个版本是完全可以胜任一般日常工作的一个版本,我们新增加 +了近 50 个条目,覆盖了大部分系统日常使用和维护的范畴. +同时,我们增加了许多一起合作的朋友,象 Tony, Su Yong, +Anthony Fork 等等,同时 cman 也进入了 Debian, 中软 Linux, +Happy Linux 等发布中,感谢大家的努力,并为大家取得的成就 +欢呼! +0.1 的推出标志着 CMPP 的又一个坚实的足迹,同时也是对所有 +爱好者和使用者的感谢,对所有有怀疑态度的人的回答.在这里, +我代表所有 CMPP 的成员向整个互联网宣布: +我们一直在前进! +2001/06/30 更新了 FAQs +2001/06/11 我们的 CVS 换到 202.204.24.8 了. +2001/05/20 修改了版权声明,实际上采用了 FDL 的版权声明. +2001/05/01 增加了 sampes 目录,以后的各种例子和 +代码片段将放在这里. +2001/04/12 +MAINTAINER 文件完成。现在 Man Page 用户可以通过此文件 +找到每一手册页的维护者,欢迎报告错误和提供建议。 + +2001/03/19 +[概述] +我们目前已经全部改用 CVS 和邮递列表,进行版本和进度等 +管理工作了,并且我们已经初步形成了一支比较稳定的维护人员队伍. +在这个期间我们又新增加和校对了一批新手册页,无论数量 +还是质量上我们都有了极大的提高. + +主要增加的内容包括 man1,man5,man7,和 man8 中的许多 +新内容,覆盖的范围包括基本命令,系统维护和配置,以及 +网络配置和使用等,同时我们的提交人员则进一步地开始了 +更新的内容提交,一些标准 man-1.31 之外的手册页也开始出现 +在我们的 CMPP 的发行包中,比如 samba 和 tcpdump,openssh +等内容.并且随着我们新的认领办法的使用,我相信以后的 +cman 将会覆盖更广泛的内容和更深层次的内涵. + +在这个新版本里,我们建立了新的 people 用户,从而使每位 +CVS 维护人员有了自己的工作区间,也使 CMPP 能够更加有效 +地兼顾各个方向.保持 cman 的平衡发展. + +同时,我们修改了以前并不完善的认领办法,采用了标准的替换 +法,也就是我们把所有合适的英文手册页都放到我们的 CVS 服务器 +上,任何网友只要看到是英文的手册页就可以拿下来翻译,完成后 +提交到 cmpp@yahoogroups.com 邮递列表.这样,就更加方便广大 +网友观察进度,共同参与.更详细的相关信息,请参阅 FAQs. + +另外,我们还进一步完善了一些相关的工具,比如,在 /contrib +目录下就新增加了用于 windows 中查看 man pages 的工具,winmanviewer, +以及一些处理 man 到不同格式的工具,大家可以把手册页转换成更 +丰富的格式了. + +相信这个新版本的 cman 在许多网友的努力下能够给更多的自由软件 +爱好者和使用者带来方便,同时也希望有更多的网友能参与这个庞大的 +计划.所有手册页总共的字数超过 550 万,只有更多的网友齐参与, +共努力,发样蚂蚁啃骨头的精神,把无数零碎的时间汇集成一股洪流, +才能真正实现这样的目标. + +各位朋友,如果您正在寻找有趣的事情做,如果您希望在学习的过程中 +同时为他人做一些贡献,如果您还是自由软件使用或爱好者,那么, +请参与到 CMPP 计划中来,让我们一起推进我们整个社区的发展,并最终 +在历史的长河中留下您的足迹! + +[增加] +大量增加,不计其数,您只能通过 CVS LOG 机制才能看到详细的情况. + +[修补] +对 CVS 结构,目录结构做了大量调整和修改. + +[说明] +CMPP 的网站是: www.cmpp.net +CMPP 的邮递列表是: cmpp@yahoogroups.com +更详细的信息请参阅网站和 FAQs. +欢迎任何意见和建议. +意见和建议请发往邮递列表. + +2001/03/19 +[概括] +man1 源文件引入完成,基本上是 RH6.2 的 man1. +2001/01/31 0.0.5 +2000/12/27 0.0.4 +[概括] +今天我们正式把所有 cman 的内容放到 CVS 服务器上, +这样大家就可以更快地看到我们的成果和进度了. +2000/12/22 0.0.3 +[概况]这是一个过渡版本,我们准备把工作移到 CVS +上去,在这之前,我们把所有收集到的内容先做一个包, +发布出来,供大家参考. +2000/12/05 0.0.2 release +[概况] +完成了全部现有的 man1,man5,man7,man8 的工作. +为了更好地反映我们的进度,我们决定放弃 alpha,beta,阶段, +把所有未校对的东西放在 uncheck 子目录,当完成校对,将其移 +至正式的 man[1-9,n] 目录下.同时力争每周一个版本. +man8 中 fdisk.8,init.8,sync.8 以及与时区相关的几条手册页 +给我们提供了非常丰富的系统知识和系统配置线索, +相信对所有用户都是一些非常好的帮助和学习/认识起点. +同时在 man1 中增加 kill 和 killall 两条手册页. + +0.0.2 版本可以说是一个比较完善的包了,它的内容现在已经 +可以为大多数系统管理员以及许多使用系统接口的程序员提供 +广泛的帮助(主要覆盖 INET 方面).与 0.0.1 相比,我们的 +材料有了进一步的积累,合格的内容有了长足的增长,感谢所有 +奉献自己时间的参与者,也感谢所有使用和查找问题的用户. +希望大家继续支持这个计划,也希望大家能进一步宣传她,参与她, +为更多更广泛的用户提供更丰富更实用的资料. + +"这是一项可以利用许多人的零碎时间的事业, +许多个零碎的时间汇集起来,就是一股强大的力量, +就可以为我们大家创造出更好的世界." + +任何意见或建议,请 mailto: laserhenry@263.net + + +[增加] +增加了MAINTAINERS,目前这个文件尚未完全完成,感谢 wangdong! +[修补] +所有 man8,man1部分 +[声明] +我们校对的时候修改了大量的内容,请各相关译者参照和阅读, +如果有异议,请及时向我们反映:laserhenry@263.net + +Laser + +2000/11/26 +经过近两天的工作,我把现有 man5 部分全部校对完成, +并且增加了 mapping 先生翻的 proc.5,现在的 man5 部分 +是完全可以信赖的并且非常有参考价值.其中 +environ.5 对于了解 Unix 体系的环境变量非常有帮助, +fs.5 可以帮助您了解 Linux 所支持的文件系统, +host.conf.5 将帮助您对 Unix 体系的域名和主机名系统极其配置有初步认识 +并且是获取相关帮助的源头, +passwd.5 为你解释了 Unix 系统的认证和登录体系, +proc.5 则对于所有需要管理和认识 Linux 系统,以及学习 Linux 内核的朋友 +都是一个非常好的参考资料.您可以利用 proc.5 里面的内容更好地配置和管理 +Linux 内核,同时它也是切入 Linux 内核的一个入口,与 man7 中的 inet 系列 +man pages 相结合,相信现在对 Linux 内核的管理将更加有条理和有理论基础. +shells.5 则告诉我们更多关于用户 shell 管理的知识. +另外还完成的有 man8 的一部分,可以检查我的 ChangeLog. + +其他的修改包括对制作脚本进行了修改,以及修改了所有的站点联接等. +至此,正式升级为 0.0.2-alpha,将在 beta 中主要完成 man8 的工作. + +-Laser + +2000/11/22 +准备 0.0.2-alpha +目标是把 man5 的部分全部校对完成, + + +2000/11/10 +崭新的 cman 0.0.1 + +我校对了现有 man1 和 man7 的绝大部分内容, +尤其是 man7,因为实在关系到准确性问题, +耗费了我将近一周的时间. + +现在可以告诉大家,如果有人对配置,优化系统, +尤其是系统网络性能,对书写更强大的 tcp/ip socket 程序感兴趣, +那么 man7 里的 +arp.7,ip.7, packet.7, tcp.7, icmp.7, +netdevice.7, netlink.7, raw.7,unix.7,udp.7 +是绝对不可不看的. + +如果您对本地化感兴趣,请参考 man7 中的 +locale.7, unicode.7, utf-8.7, charsets.7 +将是您的很好的帮手. + + + + diff --git a/DOCS/ChangeLog.GB b/DOCS/ChangeLog.GB new file mode 100644 index 00000000..8ab71495 --- /dev/null +++ b/DOCS/ChangeLog.GB @@ -0,0 +1,216 @@ +20040615 һЩ perl ĵ + +Щ perl ĵҪ linuxforum ķƻԼֻϻ(̨)ķ빤 + +20031220 ԭʼĵrawĿ¼ + + 1ԭʼĵrawĿ¼Ա޸ĺ͸ + +20031205 + + 1520ƪֲҳ + 2еĵһЩŰ棬ҪNAMEʽͳһ + 3tcl ĵȫתΪ man ʽ + 4samba ĵ + 5http://sf.linuxforum.net Ϸman-pages-zh_CN(rpm) manpages-zh(deb) + +20031025 + + 1redhat rpmΪman-pages-zh_CN,Ĭ\ + ϲUTF-8ӦGBİΪman-pages-zh_CN-gb\ + manĵתΪhtml ļ緢Ϊ\ + man-pages-zh_CN-html + 2debian debΪmanpages-zh岿δɡ + +200205 0.3 + +2001/10/27 0.2 + [] +ϴηµľôҾõˣ CMPP +ı仯ǷdzģȣCMPP չķ汾У +ϣиܹ CMPP ԱͶͬʱҲΪ +CMPP һƱ֮棬ǵĿںǣʹǶõ֧! + +汾ı仯Ƿ mann mhss +ΪҼ Tcl ֲᣡҲ˵ CMPP +ΪֹģֲϵˣϲTcl Ե +϶ǸŶ Tcl ڹڵռͷչҲкܴ + +ͬʱDZ˺㶨 man1 ݵĸ£Խ 30 ƪ +man1 תģ + +һѾʼ man2, man3 ˣ +еijԱѽһµĿˣЩֲҳ +гԱѸ뾡ʹðɣ + +2001/07/21 0.1 +[] +һʱĹǺܽ cman 0.1.0 ķ +汾ȫʤһճһ汾 +˽ 50 Ŀ˴󲿷ϵͳճʹúάķ룮 +ͬʱһѣ Tony, Su Yong, +Anthony Fork ȵȣͬʱ cman Ҳ Debian, Linux, +Happy Linux ȷУлҵŬΪȡõijɾ + +0.1 Ƴ־ CMPP һʵ㼣ͬʱҲǶ +ߺʹߵĸлл̬ȵ˵Ļش +Ҵ CMPP ijԱ +һֱǰ +2001/06/30 FAQs +2001/06/11 ǵ CVS 202.204.24.8 ˣ +2001/05/20 ޸˰Ȩʵϲ FDL İȨ +2001/05/01 sampes Ŀ¼ԺĸӺ +Ƭν +2001/04/12 +MAINTAINER ļɡ Man Page ûͨļ +ҵÿһֲҳάߣӭṩ顣 + +2001/03/19 +[] +ĿǰѾȫ CVS ʵба汾ͽȵ +ˣѾγһ֧ȽȶάԱ飮 +ڼӺУһֲҳ +Ƕ˼ߣ + +Ҫӵݰ man1man5man7 man8 е +ݣǵķΧϵͳάãԼ +úʹõȣͬʱǵύԱһؿʼ +µύһЩ׼ man-1.31 ֲ֮ҳҲʼ +ǵ CMPP ķаУ samba tcpdumpopenssh +ݣµ취ʹãԺ +cman ḲǸ㷺ݺ͸εں + +°汾ǽµ people ûӶʹÿλ +CVS άԱԼĹ䣬Ҳʹ CMPP ܹЧ +ؼ˸򣮱 cman ƽⷢչ + +ͬʱ޸ǰƵ취˱׼滻 +ҲǰкʵӢֲҳŵǵ CVS +ϣκֻҪӢĵֲҳͿ룬ɺ +ύ cmpp@yahoogroups.com ʵб͸ӷ +ѹ۲ȣͬ룮ϸϢ FAQs + +⣬ǻһһЩصĹߣ磬 /contrib +Ŀ¼¾ windows в鿴 man pages Ĺߣwinmanviewer +ԼһЩ man ͬʽĹߣҿ԰ֲҳתɸ +ḻĸʽˣ + +°汾 cman ѵŬܹ +ߺʹߴ㣬ͬʱҲϣиܲӴ +ƻֲҳܹ 550 ֻи룬 +ŬϿйͷľ񣬰ʱ㼯һɺ +ʵĿ꣮ + +λѣѰȤϣѧϰĹ +ͬʱΪһЩףʹû򰮺ߣô +뵽 CMPP ƻһƽķչ +ʷij㼣! + +[] +ӣֻͨ CVS LOG Ʋܿϸ + +[޲] + CVS ṹĿ¼ṹ˴޸ģ + +[˵] +CMPP վ: www.cmpp.net +CMPP ʵб: cmpp@yahoogroups.com +ϸϢվ FAQs +ӭκͽ飮 +ͽ뷢ʵб + +2001/03/19 +[] +man1 Դļɣ RH6.2 man1. +2001/01/31 0.0.5 +2000/12/27 0.0.4 +[] +ʽ cman ݷŵ CVS ϣ +ҾͿԸؿǵijɹͽˣ +2000/12/22 0.0.3 +[ſ]һɰ汾׼ѹƵ CVS +ȥ֮ǰǰռһ +Ҳο +2000/12/05 0.0.2 release +[ſ] +ȫе man1man5man7man8 Ĺ +Ϊ˸õطӳǵĽȣǾ alphabeta׶Σ +δУԵĶ uncheck Ŀ¼Уԣ +ʽ man[1-9,n] Ŀ¼£ͬʱÿһ汾 +man8 fdisk.8init.8sync.8 Լʱصļֲҳ +ṩ˷dzḻϵͳ֪ʶϵͳ +ŶûһЩdzõİѧϰ/ʶ㣮 +ͬʱ man1 kill killall ֲҳ + +0.0.2 汾˵һȽƵİˣѾ +ΪϵͳԱԼʹϵͳӿڵijԱṩ +㷺İҪ INET 棩 0.0.1 ȣǵ +˽һĻۣϸ˳л +ԼʱIJߣҲлʹúͲû +ϣҼ֧ƻҲϣܽһ +Ϊ㷺ûṩḻʵõϣ + +"һ˵ʱҵ +ʱ㼯һǿ +ͿΪǴҴõ磮" + +κ飬 mailto: laserhenry@263.net + + +[] +MAINTAINERSĿǰļδȫɣл wangdong +[޲] + man8man1 +[] +УԵʱ޸˴ݣ߲պĶ +飬뼰ʱǷӳlaserhenry@263.net + +Laser + +2000/11/26 +ĹҰ man5 ȫУɣ + mapping proc.5ڵ man5 +ȫIJҷdzвοֵ +environ.5 ˽ Unix ϵĻdzа +fs.5 ԰˽ Linux ֵ֧ļϵͳ +host.conf.5 Unix ϵϵͳгʶ +ǻȡذԴͷ +passwd.5 Ϊ Unix ϵͳ֤͵¼ϵ +proc.5 Ҫʶ Linux ϵͳԼѧϰ Linux ں˵ +һdzõIJοϣ proc.5 ݸõú͹ +Linux ںˣͬʱҲ Linux ں˵һڣ man7 е inet ϵ +man pages ϣڶ Linux ں˵Ĺۻ +shells.5 Ǹû shell ֪ʶ +⻹ɵ man8 һ֣Լҵ ChangeLog + +޸İű޸ģԼ޸еվӵȣ +ˣʽΪ 0.0.2-alpha beta Ҫ man8 Ĺ + +-Laser + +2000/11/22 +׼ 0.0.2-alpha +Ŀǰ man5 IJȫУɣ + + +2000/11/10 +ոµ cman 0.0.1 + +У man1 man7 ľ󲿷ݣ + man7Ϊʵڹϵ׼ȷ⣬ +ķҽһܵʱ䣮 + +ڿԸߴң˶ãŻϵͳ +ϵͳܣдǿ tcp/ip socket Ȥ +ô man7 +arp.7,ip.7, packet.7, tcp.7, icmp.7, +netdevice.7, netlink.7, raw.7,unix.7,udp.7 +ǾԲɲģ + +ԱػȤο man7 е +locale.7, unicode.7, utf-8.7, charsets.7 +ĺܺõİ֣ + + + + diff --git a/DOCS/FAQ b/DOCS/FAQ new file mode 100644 index 00000000..56878dcc --- /dev/null +++ b/DOCS/FAQ @@ -0,0 +1,200 @@ +CMPP 常见问题(FAQ) +当前维护人员:徐明 +最后更新:2003 年 12 月 05 日 01:53:11 CST +本文档的最新版本可以在 http://cmpp.linuxforum.net 找到。 + +目录 + + +1,什么是 CMPP? +2,为什么要发起 CMPP 手册页计划? +3,这个计划相关站点在哪里? +4,如何参与该计划? +5,如何支持该计划? +6,如何认领手册页翻译? +7,CMPP 翻译的手册页的要求是什么? +8,troff 格式是什么样的? +9,如何提交您的翻译或者补丁? +10,本计划的协调人是谁? +11,如何使用 CVS? +12, 手册页断行错误和乱码? +13,如何使用中文手册页? + + + +1,什么是 CMPP? + +CMPP 是“中文手册页计划”( Chinese Man Pages Project )的缩写。 +这个计划的目的是把英文的 manual pages (手册页)翻译成中文的手册页, +让更多的人能够受益于手册页详实丰富的内容。降低学习 Linux 系统的难度。 + + + +2,为什么要发起 CMPP 手册页计划? + +手册页是 Unix 体系里最为权威和丰富的技术资料, Linux 作为自由软件 +的 Unix 版本和其他所有相关工具和软件一起,其手册页的质量和数量都 +非常高,为了帮助广大网友学习和使用这些自由软件,linuxforum.net 发起 +了这个本身也是自由软件项目之一的翻译工程。 + + + +3,这个计划相关站点在哪里? + +http://cmpp.linuxforum.net +CMPP 主页 +我们在这个站点上发布与 CMPP 相关的所有信息。 +http://sf.linuxforum.net/projects/cmpp +目前 CMPP 计划在sf.linuxforum 上的项目地址 +请到这里来获得cmpp 发行的文件打包 +http://cmpp.linuxforum.net/cvs? +从这里可以直接查看cvs 中的文档。 + + + +4,如何参与该计划? + +您可以通过共同参与翻译、校对手册页,也可以通过您合适的途径传播 +CMPP 计划,让更多的人认识、参与并最终从 CMPP 计划中受益。 + + + +5,如何支持该计划? + +第一,您可以亲身参与该计划,见“如何参与该计划”; +第二,您可以赞助该计划,您可以提供各种翻译相关资料、资源、甚至是书籍、 +金钱等赞助,赞助事宜可以和本计划协调人或 linuxforum.net 的管理人联系 +(见“本计划协调人”); +第三,使用我们的中文手册页!只有更多的人使用,才能真正推动 CMPP 的 +发展和进步。 + + + +6,如何认领手册页翻译? + +请先确认文档没有被翻译,或者没有人正在翻译。 +如果翻译正在进行,但是译者比较忙以至于无法提交结果,也可以自己动手。 + +如果您对某些东西感兴趣,那么您可以浏览CVSWeb,在里面的那些非中文的 +手册页都是可以/应当翻译的项目。具体方法是: +第一,登录 CVSWeb:http://cmpp.linuxforum.net +第二,点击 cman 浏览 CVSWeb 里的 cman 内容,寻找您感兴趣的手册页, +如果找到,那么: +第三,点击该文件的链接,进入下一个页面,里面有一个 download 链接。 +用鼠标右键点击,在弹出菜单中选择“目标另存为”,在新弹出的 +菜单中选择保存路径和文件名(最好不要更改文件名),然后点“确认”即可, +然后您就可以在它上面进行翻译了。 + +也可以用cvs 来检查是否已经翻译了。已翻译的文档一般都会加入 +man-pages-zh_CN 目录当中。可以使用cvs export -r HEAD 命令来导出这个 +文件。小心,这要求你比较精通cvs工具 + + + +7,CMPP 翻译的手册页的要求是什么? + +因为手册页的格式是 troff 格式,所以我们建议在做翻译的时候最好也使用 +troff 格式,简单说就是保留源文件的格式,覆盖翻译。推荐使用emacs 来做 +翻译时的编辑器,使用它的语法高亮功能来避免错误。文件编码建议使用 +utf8. 请参阅讨论版上关于翻译要求的说明,有很多用词规则和署名规则。 + + + +8,troff 格式是什么样的? + +troff 格式是手册页的基本格式,它是由一些标记对文本进行标记,然后通过 +专门的软件进行分析实现的。其符号和标记的详细信息可以参阅 man7 目录中 +的roff.7, mdoc.samples.7, man.7;man9 目录中的cmanexample.9, cmanformat.9 + + + +9,如何提交您的翻译或者补丁? + +请在讨论版上张贴,标题是您翻译的文档名,内容是原始的roff 文件。 +注意应当使用[pre] [/pre]标记,使原始文件内容以原样显示出来。 +然后,请回复两次您自己的帖子,内容分别是使用man2html工具得到的 +中文和英文的html 文件在浏览器中的显示效果。这样有助于即时的讨论. +man2html 工具包含在 cman/contrib/man2html 目录中 +如果有条件限制,也可以只提交原始 roff 文件,请版主完成html 文件。 +这种情况下,请将翻译结果用电子邮件寄给版主/协调人 + + + +10,本计划的协调人是谁? + +徐明 +何伟平 +冼景彬 +如果您有与 CMPP 相关的事项协商或者希望参与到经常性提交者的行列中, +请与他们联系。 + + + +11,如何使用 CVS? + +首先,如果您使用的是 Linux,那么您可以先把 CVS 软件安装上, +大部分 linux 版本里都有 cvs 包,阅读您的系统的文档,安装上这个软件。 +如果您的系统里没有这个软件,您可以到下面的站点下载安装,具体的安装 +方法和步骤请参阅它自己的文档。 + +然后,您可以执行下面的命令: +$ cvs -d:pserver:anonymous@sf.linuxforum.net:/cvsroot/cmpp login +这时候 CVS 系统会向您提示输入口令,您只需要按回车就可以了。这时候 +cvs 会把口令保存在 .cvspass,这样您以后就不再用输入了。 +您可以把所有 CMPP 源文件都下载下来,命令是: +$cvs -z3 -PAd co cman +但是,由于man 文档数量巨大(>120M),所以最好不要这样做。如果你感兴趣的 +是中文手册页,可以用 +$cvs -z3 -PAd export -r HEAD man-pages-zh_CN +来下载用于制作rpm 或 deb 的所有文件。 +第一次下载需要比较长的时间,但以后如果您再需要更新,就不需要下载那么 +多的东西了,只需要进入 cman 的目录里,执行: +$cvs -z3 -PAd update + +如果您的平台是 windows,那么您可以有两种使用 CVS 的方法,第一种是到 +www.cygwin.com 下载 cygwin 包,安装到系统中,运行 cygwin 之后的所有 +方法都是和在 linux 或者 unix 里一样的,这里就不多说了。如果您使用的 +是 cvs 的 windows 客户端软件 WinCVS 的话,那么您可以按照下面步骤: +(命令中的 “->”表示菜单级联): +第一,Admin->preferenes->General->Enter the CVSROOT,输入 +:pserver:anonymous@202.204.24.8:/home/cvsroot +第二,登陆 CVS 服务器 +Admin->login... +第三,抓取所有 cman 文件: +Create->Chechout module->checkout settings->enter the.. +输入cman(或者某个手册页的内容) +Local folder checkout to处输入:你的工作目录(本地目录) +使用压缩选项 Golbals->Use tcp/ip compression +第四,以后更新手册页的时候可以: +Modify->Update selection... + +总之,不推荐使用windows 来操作。 + + + +12, 为什么我的手册页一行中有时空白很大;有时没有空白,反而出现断行错 +误和乱码? + +troff 格式是通过 groff/troff 程序过滤产生输出的。而某些版本的 groff +是按英文习惯断行。它使用英文空白符 (ASCII 值 0x20) 和英文断词法决定 +断行的位置,然后把每行英文重新排版,使之两边对齐。 +可是中文词与词之间是没有空格的,断行要求与英文也大不相同。因为通常在 +中英文交替时加个空格, groff/troff 只能依靠这些有限的空格断行了。一 +句中间无空格的中文句会被看作一个英文词(而且是无法用断词法断词的)。 +如果中文句很短, groff/troff 会认为一行只有很少几个词,拉伸使之两边 +对齐,就出现了较大的空白;如果中文句很长, groff/troff 会报告 +"warning: can't break line" ,无法断行,而一直排下去,到行尾时若处于 +一个汉字中间(一个汉字被视为两个英文字符),强行断开,下一行就会出现 +乱码。 + +最新版本groff 中没有这些问题。 + + +13,如何使用中文手册页? + +请查看README 文件来获得安装帮助 +请到讨论版查看不同的系统的默认语言环境,相应的查看中文手册页的办法。 +一般说来,yelp (版本2.4 以后)总是可以用的,man 可能有问题,konqueror +也可能有问题。如果语言环境是zh_CN.GB* 那么应当使用cman 命令. +终端下使用zhcon + cman 没有问题 + diff --git a/DOCS/FAQ.GB b/DOCS/FAQ.GB new file mode 100644 index 00000000..774e8fad --- /dev/null +++ b/DOCS/FAQ.GB @@ -0,0 +1,200 @@ +CMPP ⣨FAQ +ǰάԱ +£2003 12 05 01:53:11 CST +ĵ°汾 http://cmpp.linuxforum.net ҵ + +Ŀ¼ + + +1ʲô CMPP +2ΪʲôҪ CMPP ֲҳƻ +3ƻվ +4βüƻ +5ָ֧üƻ +6ֲҳ룿 +7CMPP ֲҳҪʲô +8troff ʽʲôģ +9ύķ߲ +10ƻЭ˭ +11ʹ CVS +12, ֲҳд룿 +13ʹֲҳ + + + +1ʲô CMPP + +CMPP ǡֲҳƻ Chinese Man Pages Project д +ƻĿǰӢĵ manual pages ֲҳĵֲҳ +øֲܹҳʵḻݡѧϰ Linux ϵͳѶȡ + + + +2ΪʲôҪ CMPP ֲҳƻ + +ֲҳ Unix ϵΪȨͷḻļϣ Linux Ϊ + Unix 汾عߺһֲҳ +dzߣΪ˰ѧϰʹЩlinuxforum.net +ҲĿ֮һķ빤̡ + + + +3ƻվ + +http://cmpp.linuxforum.net +CMPP ҳ +վϷ CMPP صϢ +http://sf.linuxforum.net/projects/cmpp +Ŀǰ CMPP ƻsf.linuxforum ϵĿַ +뵽cmpp еļ +http://cmpp.linuxforum.net/cvs? +ֱӲ鿴cvs еĵ + + + +4βüƻ + +ͨͬ뷭롢УֲҳҲͨʵ; +CMPP ƻøʶ벢մ CMPP ƻ档 + + + +5ָ֧üƻ + +һüƻβüƻ +ڶüƻṩַϡԴ鼮 +Ǯ˿ԺͱƻЭ˻ linuxforum.net Ĺϵ +ƻЭˡ +ʹǵֲҳֻиʹãƶ CMPP +չͽ + + + +6ֲҳ룿 + +ȷĵûб룬ûڷ롣 +ڽУ߱Ƚæ޷ύҲԼ֡ + +ijЩȤôCVSWebЩĵ +ֲҳǿ/ӦĿ巽ǣ +һ¼ CVSWebhttp://cmpp.linuxforum.net +ڶ cman CVSWeb cman ݣѰȤֲҳ +ҵô +ļӣһҳ棬һ download ӡ +Ҽڵ˵ѡĿΪµ +˵ѡ񱣴·ļòҪļȻ㡰ȷϡɣ +ȻͿзˡ + +Ҳcvs ǷѾˡѷĵһ㶼 +man-pages-zh_CN Ŀ¼Сʹcvs export -r HEAD +ļСģҪȽϾͨcvs + + + +7CMPP ֲҳҪʲô + +Ϊֲҳĸʽ troff ʽǽʱҲʹ +troff ʽ˵DZԴļĸʽǷ롣Ƽʹemacs +ʱı༭ʹ﷨ļ뽨ʹ +utf8. ۰ϹڷҪ˵кܶôʹ + + + +8troff ʽʲôģ + +troff ʽֲҳĻʽһЩǶıбǣȻͨ +רŵзʵֵġźͱǵϸϢԲ man7 Ŀ¼ +roff.7, mdoc.samples.7, man.7man9 Ŀ¼еcmanexample.9, cmanformat.9 + + + +9ύķ߲ + +۰ĵԭʼroff ļ +עӦʹ[pre] [/pre]ǣʹԭʼļԭʾ +ȻظԼӣݷֱʹman2htmlߵõ +ĺӢĵhtml ļеʾЧڼʱ. +man2html ߰ cman/contrib/man2html Ŀ¼ +ƣҲֻύԭʼ roff ļhtml ļ +£뽫õʼĸ/Э + + + +10ƻЭ˭ + + +ΰƽ + + CMPP صЭ̻ϣ뵽ύߵУ +ϵ + + + +11ʹ CVS + +ȣʹõ LinuxôȰ CVS װϣ +󲿷 linux 汾ﶼ cvs Ķϵͳĵװ +ϵͳûԵվذװİװ +ͲԼĵ + +Ȼִ +$ cvs -d:pserver:anonymous@sf.linuxforum.net:/cvsroot/cmpp login +ʱ CVS ϵͳʾֻҪسͿˡʱ +cvs ѿ .cvspassԺͲˡ +԰ CMPP Դļǣ +$cvs -z3 -PAd co cman +ǣman ĵ޴(>120M)òҪȤ +ֲҳ +$cvs -z3 -PAd export -r HEAD man-pages-zh_CN +rpm deb ļ +һҪȽϳʱ䣬ԺҪ£ͲҪô +ĶˣֻҪ cman Ŀ¼ִУ +$cvs -z3 -PAd update + +ƽ̨ windowsôʹ CVS ķһǵ +www.cygwin.com cygwin װϵͳУ cygwin ֮ +Ǻ linux unix һģͲ˵ˡʹõ + cvs windows ͻ WinCVS Ļô԰沽裺 +е ->ʾ˵ +һAdmin->preferenes->General->Enter the CVSROOT +:pserver:anonymous@202.204.24.8:/home/cvsroot +ڶ½ CVS +Admin->login... +ץȡ cman ļ +Create->Chechout module->checkout settings->enter the.. +cmanijֲҳݣ +Local folder checkout to룺ĹĿ¼Ŀ¼ +ʹѹѡ Golbals->Use tcp/ip compression +ģԺֲҳʱԣ +Modify->Update selection... + +֮Ƽʹwindows + + + +12, Ϊʲôҵֲҳһʱհ׺ܴʱûпհףֶд +룿 + +troff ʽͨ groff/troff ˲ġijЩ汾 groff +ǰӢϰ߶СʹӢĿհ׷ (ASCII ֵ 0x20) ӢĶϴʷ +еλãȻÿӢŰ棬ʹ֮߶롣 +Ĵ֮ûпոģҪӢҲͬΪͨ +ӢĽʱӸո groff/troff ֻЩ޵Ŀոˡһ +м޿ոľᱻһӢĴʣ޷öϴʷϴʵģ +ḷ̌ܶ groff/troff Ϊһֻкټʣʹ֮ +룬ͳ˽ϴĿհףľܳ groff/troff ᱨ +"warning: can't break line" ޷Уһֱȥβʱ +һм䣨һֱΪӢַǿжϿһоͻ +롣 + +°汾groff ûЩ⡣ + + +13ʹֲҳ + +鿴README ļðװ +뵽۰鿴ͬϵͳĬԻӦIJ鿴ֲҳİ취 +һ˵yelp (汾2.4 Ժ)ǿõģman ⣬konqueror +Ҳ⡣Իzh_CN.GB* ôӦʹcman . +նʹzhcon + cman û + diff --git a/DOCS/THANKS b/DOCS/THANKS new file mode 100644 index 00000000..962b587f --- /dev/null +++ b/DOCS/THANKS @@ -0,0 +1,50 @@ +Julian.Ch 提供了一个详细的命令参考 +best163 的念青(nianqing@163.net)提供了很多手册页的html版本 +redcandle 提供了html2man 和htmlcharfix +萧百龄,两只老虎工作室 提供了 perlfaq* + +译者 +Adadxb +Hzwww +Joechl +Mousedong +Timebob timebob@21cn.com +Wenicu +Wyd +Xyb +Zeo +Zfqjcl + +本站翻译小组 +范逊 +胡二刀 +若智 +唐志波 tmounth@sina.com +赵如飞 slimzhao@21cn.com +409 +laser +mhss jijingzhisheng@up369.com +Scorpions rawk@chinese.com +meaculpa meaculpa@21cn.com + +Liu JingSong js-liu@263.net +苏勇 ysu@gnocis.org +所罗门(Soloman) solomen@email.com.cn +王炎 wyd@263.net +riser boomer@ccidnet.com +徐明 xuming@bigfoot.com +袁乙钧 bbbush@163.com +Surran +liguoping liguoping_11@sina.com +Astonia astonia@bigfoot.com +Alan Yao Alan_Yao@163.net +Mirnshi Mirnshi@263.net +Wang Dong doomwang@263.net +mapping mapping@263.net +Hunter77 tzb@kali.com.cn +晓寒 xiaohan@sina.com +RedCandle redcandle51@chinaren.com +billpan billpan@yeah.net +LetBright letbright@netease.com +zou8li14 zou8li14@sina.com +Viamu diff --git a/DOCS/THANKS.GB b/DOCS/THANKS.GB new file mode 100644 index 00000000..24b91b6b --- /dev/null +++ b/DOCS/THANKS.GB @@ -0,0 +1,50 @@ +Julian.Ch ṩһϸο +best163 ࣨnianqing@163.netṩ˺ֲܶҳhtml汾 +redcandle ṩhtml2man htmlcharfix +䣬ֻϻ ṩ perlfaq* + + +Adadxb +Hzwww +Joechl +Mousedong +Timebob timebob@21cn.com +Wenicu +Wyd +Xyb +Zeo +Zfqjcl + +վС +ѷ + + +־ tmounth@sina.com + slimzhao@21cn.com +409 +laser +mhss jijingzhisheng@up369.com +Scorpions rawk@chinese.com +meaculpa meaculpa@21cn.com + +Liu JingSong js-liu@263.net + ysu@gnocis.org +(Soloman) solomen@email.com.cn + wyd@263.net +riser boomer@ccidnet.com + xuming@bigfoot.com +ԬҾ bbbush@163.com +Surran +liguoping liguoping_11@sina.com +Astonia astonia@bigfoot.com +Alan Yao Alan_Yao@163.net +Mirnshi Mirnshi@263.net +Wang Dong doomwang@263.net +mapping mapping@263.net +Hunter77 tzb@kali.com.cn + xiaohan@sina.com +RedCandle redcandle51@chinaren.com +billpan billpan@yeah.net +LetBright letbright@netease.com +zou8li14 zou8li14@sina.com +Viamu diff --git a/DOCS/VOCABULARY b/DOCS/VOCABULARY new file mode 100644 index 00000000..c3fa34c9 --- /dev/null +++ b/DOCS/VOCABULARY @@ -0,0 +1,151 @@ +关键词 v 0.2 还没有zh_TW 的版本 +建议在翻译时使用标准词汇 + +.SH 标题的翻译应当这样将英文放在后面的括号中,比较美观。 +----------------------------------------------------------- +SYNOPSIS 总览 (SYNOPSIS) +NAME NAME +COPYRIGHT 版权所有 (COPYRIGHT) +COPYING 版权 (COPYING) +DESCRIPTION 描述 (DESCRIPTION) +OPTIONS 选项 (OPTIONS) +ARGUMENTS 参数 (ARGUMENTS) +INVOCATION 执行 (INVOCATION) +DEFINITIONS 定义 (DEFINITIONS) +RESERVED WORDS 保留字 (RESERVED WORDS) +GRAMMAR 语法 (GRAMMAR) +COMMENTS 注释 (COMMENTS) +QUOTING 引用 (QUOTING) +PARAMETERS 参数 (PARAMETERS) +EXPANSION 扩展 (EXPANSION) +REDIRECTION 重定向 (REDIRECTION) +ALIASES 别名 (ALIASES) +FUNCTIONS 函数 (FUNCTIONS) +ARITHMETIC EVALUATION 数学运算 (ARITHMETIC EVALUATION) +CONDITIONAL EXPRESSION 条件表达式 (CONDITIONAL EXPRESSION) +COMMAND EXECUTION 命令执行 (COMMAND EXECUTION) +ENVIRONMENT 环境 (ENVIRONMENT) +EXIT STATUS 退出状态 (EXIT STATUS) +SIGNALS 信号 (SIGNALS) +JOB CONTROL 作业控制 (JOB CONTROL) +PROMPTING 提示符 (PROMPTING) +HISTORY 历史 (HISTORY) +SEE ALSO 参见 (SEE ALSO) +FILES 文件 (FILES) +AUTHORS 作者 (AUTHORS) +BUGS BUGS +WARNING 警告 (WARNING) +DIAGNOSTICS 诊断 (DIAGNOSTICS) +----------------------------------------------------------- + + + +下面是一般的词汇 +========================================================== + Abort | 放弃 | + Aborting | 正在退出 | + Alert | 警报 | + ARGUMENTS | 参数 | + AUTHOR | 作者 | + Aviability | 可用性,可得性 | + block | 阻塞 | + BrowseClusters | 流览集群 | + BUGS | BUGS | + cache | 缓存 | + callback | 回调 | + Clear | 清除 | + COMMENT | 注释 | + CONFORMING TO | 遵循 | + DEBUG | 调试 | + DECLARATION | 声明 | + default | 缺省 | + DEFINITION | 定义 | + DESCRIPTION | 描述 | + Destination | 目的地 | + DIAGNOSTICS | 诊断 | + disable | 关闭 | + disk | 磁盘 | + enable | 打开 | + entity | 记录 | + entry | 记录 | + ENVIRONMENT | 环境 | + ERROR HANDLING | 错误处理 | + ERRORS | 常见错误 | + EXAMPLE | 例子 | + EXIT STATUS | 退出状态 | + Expand | 扩展 | + FILES | 相关文件 | + forward | 转发 | + Gateway | 网关 | + Grid | 网格 | + HISTORY | 历史 | + hit | 命中 | + Host | 主机 | + interface | 接口 | + INVOCATION | 激活/调用 | + key | 键 | + keyword | 关键字 | + LITERAL | 文本 | + mask | 掩码 | + metric | 步跳 | + miss | 脱靶 | + modifier | 修饰词 | + mount | 装配,装载 | + NAME | 名字 | + named pipe | 命名管道 | + number | 号码,数字 | + NOTES | 注意 | + OPTIONS | 选项 | + OUTPUT | 输出 | + packet | 包,报文 | + PARAMETER | 参数 | + pipe | 管道 | + Port | 移植 | + Portable | 可移植的 | + privileges | 权限 | + PROMPT | 提示符 | + quota | 限额,配额 | + RESERVED WORD | 保留字 | + RETURN VALUE | 返回值 | + Route | 路由 | + Sectors | 扇区 | + SECURITY | 安全 | + SEE ALSO | 另见 | + SEGMENT | 段 | + specification | 规范,声明 | + stderr | 标准错误 | + stdin | 标准输入 | + stdout | 标准输出 | + switch | 开关 | + SYNOPSIS | 总览 | + Task | 任务 | + thread | 线程 | + TIP | 小技巧 | + token | 记号 | + umask | umask | + umount | 卸载 | + unrestricted | 无限制 | + USAGE | 用法 | + value | 值 | + verbose | 冗长 | + work | 运转 | +===================================================== + + +文件应保留原来作者和版权的信息,不能随意删掉。 +在文件的最后是翻译者署名,应当是这样的格式(可以将这六行复制到你翻译的文件中,加以修改): +.SH "[中文版维护人]" +.B 姓名 +.SH "[中文版最新更新]" +.BR yyyy.mm.dd +.SH "[中国linux论坛中文手册页翻译计划]" +.BI http://cmpp.linuxforum.net + +============================================= + +其他约定 +电子邮件应当是 的形式 + +示例 +请查看man9/cmanexample.9 示例文档 + diff --git a/DOCS/VOCABULARY.GB b/DOCS/VOCABULARY.GB new file mode 100644 index 00000000..45ca6de0 --- /dev/null +++ b/DOCS/VOCABULARY.GB @@ -0,0 +1,151 @@ +ؼ v 0.2 ûzh_TW İ汾 +ڷʱʹñ׼ʻ + +.SH ķӦӢķںУȽۡ +----------------------------------------------------------- +SYNOPSIS (SYNOPSIS) +NAME NAME +COPYRIGHT Ȩ (COPYRIGHT) +COPYING Ȩ (COPYING) +DESCRIPTION (DESCRIPTION) +OPTIONS ѡ (OPTIONS) +ARGUMENTS (ARGUMENTS) +INVOCATION ִ (INVOCATION) +DEFINITIONS (DEFINITIONS) +RESERVED WORDS (RESERVED WORDS) +GRAMMAR ﷨ (GRAMMAR) +COMMENTS ע (COMMENTS) +QUOTING (QUOTING) +PARAMETERS (PARAMETERS) +EXPANSION չ (EXPANSION) +REDIRECTION ض (REDIRECTION) +ALIASES (ALIASES) +FUNCTIONS (FUNCTIONS) +ARITHMETIC EVALUATION ѧ (ARITHMETIC EVALUATION) +CONDITIONAL EXPRESSION ʽ (CONDITIONAL EXPRESSION) +COMMAND EXECUTION ִ (COMMAND EXECUTION) +ENVIRONMENT (ENVIRONMENT) +EXIT STATUS ˳״̬ (EXIT STATUS) +SIGNALS ź (SIGNALS) +JOB CONTROL ҵ (JOB CONTROL) +PROMPTING ʾ (PROMPTING) +HISTORY ʷ (HISTORY) +SEE ALSO μ (SEE ALSO) +FILES ļ (FILES) +AUTHORS (AUTHORS) +BUGS BUGS +WARNING (WARNING) +DIAGNOSTICS (DIAGNOSTICS) +----------------------------------------------------------- + + + +һĴʻ +========================================================== + Abort | | + Aborting | ˳ | + Alert | | + ARGUMENTS | | + AUTHOR | | + Aviability | ,ɵ | + block | | + BrowseClusters | Ⱥ | + BUGS | BUGS | + cache | | + callback | ص | + Clear | | + COMMENT | ע | + CONFORMING TO | ѭ | + DEBUG | | + DECLARATION | | + default | ȱʡ | + DEFINITION | | + DESCRIPTION | | + Destination | Ŀĵ | + DIAGNOSTICS | | + disable | ر | + disk | | + enable | | + entity | ¼ | + entry | ¼ | + ENVIRONMENT | | + ERROR HANDLING | | + ERRORS | | + EXAMPLE | | + EXIT STATUS | ˳״̬ | + Expand | չ | + FILES | ļ | + forward | ת | + Gateway | | + Grid | | + HISTORY | ʷ | + hit | | + Host | | + interface | ӿ | + INVOCATION | / | + key | | + keyword | ؼ | + LITERAL | ı | + mask | | + metric | | + miss | Ѱ | + modifier | δ | + mount | װ,װ | + NAME | | + named pipe | ܵ | + number | 룬 | + NOTES | ע | + OPTIONS | ѡ | + OUTPUT | | + packet | , | + PARAMETER | | + pipe | ܵ | + Port | ֲ | + Portable | ֲ | + privileges | Ȩ | + PROMPT | ʾ | + quota | ޶, | + RESERVED WORD | | + RETURN VALUE | ֵ | + Route | · | + Sectors | | + SECURITY | ȫ | + SEE ALSO | | + SEGMENT | | + specification | 淶 | + stderr | ׼ | + stdin | ׼ | + stdout | ׼ | + switch | | + SYNOPSIS | | + Task | | + thread | ߳ | + TIP | С | + token | Ǻ | + umask | umask | + umount | ж | + unrestricted | | + USAGE | ÷ | + value | ֵ | + verbose | ߳ | + work | ת | +===================================================== + + +ļӦԭߺͰȨϢɾ +ļǷӦĸʽ(ԽиƵ㷭ļУ޸ģ +.SH "[İά]" +.B +.SH "[ݸ]" +.BR yyyy.mm.dd +.SH "[йlinuxֲ̳ҳƻ]" +.BI http://cmpp.linuxforum.net + +============================================= + +Լ +ʼӦ ʽ + +ʾ +鿴man9/cmanexample.9 ʾĵ + diff --git a/DOCS/banner1.gif b/DOCS/banner1.gif new file mode 100644 index 00000000..85222a24 Binary files /dev/null and b/DOCS/banner1.gif differ diff --git a/DOCS/clf.gif b/DOCS/clf.gif new file mode 100644 index 00000000..2d0b35b1 Binary files /dev/null and b/DOCS/clf.gif differ diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..c4e204bc --- /dev/null +++ b/Makefile @@ -0,0 +1,62 @@ +NAME=man-pages-zh_CN +DESTDIR=/usr/share +CONFDIR=/etc +TRANSLATED=DOCS/00TRANSLATED + +MAN=1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o 3pm 3perl +MAN=1 8 2 3 4 5 6 7 9 n l + +u8: + mkdir UTF-8 + cp -r src/man* UTF-8/ +gb: + for i in $(MAN) ; do \ + mkdir -p GB/man$$i ; \ + done + for f in `cat $(TRANSLATED)` ; do \ + iconv -f utf8 -t gb18030 src/$$f > GB/$$f ; \ + done + cp src/man.macros GB/ +html-gb: + mkdir html-gb + for i in $(MAN) ; do \ + mkdir -p html-gb/man$$i ; \ + done + export LC_ALL=zh_CN.GB18030 ;\ + for f in `cat $(TRANSLATED)` ; do \ + iconv -f utf8 -t gb18030 src/$$f | utils/man2html > html-gb/$$f.html ; \ + done +clean: + rm -rf UTF-8 GB BIG5 html-u8 html-gb html-b5 + find . -name *~ -type f | xargs rm -f + @rm -f *-stamp + @cd src && find man* -type f -path *.[1-9nlpo] -o -name *.tcl \ + -o -name *.1[ml] -o -name *.3t -o -name *.3pm -o -name *.3perl \ + -o -name *.3thr -o -name *.[357]ssl -o -name *.8c \ + -o -name *.3gl -o -name *.[13457]x -o -name *.[013]p \ + |sort > TRANSLATED && cd .. && mv src/TRANSLATED $(TRANSLATED) +install-doc: + rm -rf $(DESTDIR)/doc/$(NAME) + mkdir -p $(DESTDIR)/doc + cp -R DOCS $(DESTDIR)/doc/$(NAME) + cp README* $(DESTDIR)/doc/$(NAME) + cp COPYING $(DESTDIR)/doc/$(NAME) +install-u8: + rm -rf $(DESTDIR)/man/zh_CN.UTF-8 + mkdir -p $(DESTDIR)/man + cp -R UTF-8 $(DESTDIR)/man/zh_CN.UTF-8 +install-gb: + rm -rf $(DESTDIR)/man/zh_CN.GB* /usr/share/man/zh_CN.GB* + mkdir -p $(DESTDIR)/man + cp -R GB $(DESTDIR)/man/zh_CN.GB18030 + ln -s /usr/share/man/zh_CN.GB18030 $(DESTDIR)/man/zh_CN.GB2312 + ln -s /usr/share/man/zh_CN.GB18030 $(DESTDIR)/man/zh_CN.GBK + ln -s /usr/share/man/zh_CN.GB18030 $(DESTDIR)/man/zh_CN + mkdir -p $(CONFDIR)/profile.d + cp -f src/cman/cman.conf $(CONFDIR)/ + cp -pf src/cman/cman.sh $(CONFDIR)/profile.d/ + cp -pf src/cman/cman.csh $(CONFDIR)/profile.d/ +uninstall: + rm -rf $(DESTDIR)/doc/$(NAME) + rm -rf $(DESTDIR)/man/zh_CN* /usr/share/man/zh_CN* + rm -f $(CONFDIR)/cman.conf $(CONFDIR)/profile.d/cman.* diff --git a/README b/README new file mode 100644 index 00000000..6129be40 --- /dev/null +++ b/README @@ -0,0 +1,31 @@ +这是来自CMPP 的中文手册页。请到 http://sf.linuxforum.net/projects/cmpp 来查看项目的近况,取得最新的文件下载;到 http://www.linuxforum.net 的讨论版上来参与工作。 + +在安装之前,运行 locale 命令来查看自己的语言环境是什么,主要有影响的是 LC_ALL,LC_CTYPE 和 LANG 变量的值。如果语言环境是 zh_CN.UTF-8,可以运行 make u8 && make install-u8;如果语言环境是 GB2312,GBK 或者 GB18030,可以运行 make gb && make install-gb;或者,可以下载对应的rpm 包来安装,同样简单。对于 zh_CN.UTF-8,应当安装 man-pages-zh_CN-1.x,对于 GB2312,GBK,GB18030,应当安装 man-pages-zh_CN-gb-1.x。请参阅讨论版上关于不同发行版的系统与其默认中文编码的说明。 + +需要说明的是,同时安装所有 rpm 也是没有问题的,不会对系统造成什么影响,因为它们只是简单的文本文件。在安装 man-pages-zh_CN-gb-1.x 之后,应当注销退出,在重新登录之后才能继续使用手册页系统;而在安装适于 UTF-8 语言环境的 man-pages-zh_CN-1.x 之后,不必注销就可以用了。使用方法也有不同,对于 GB* 语言环境,应当使用 cman 命令来查看,例如 ``cman ls'';对于 UTF-8 语言环境的系统,例如 Fedora Core 2,只要使用 man 命令就可以了。 + +所有已翻译文档的版权属于其翻译者,或由翻译者指定。文档所有者没有另外说明的话,此软件包中的所有文档可以在遵循GNU FDL 的情况下重新发布。其他的文件如果没有另外的说明,则版权归于FSF,遵循GNU GPL 条款发布。建议翻译者放弃版权。 + +如有任何问题,请用电子邮件和本计划的协调人 + xuming联系 + +源代码目录结构的说明如下: +debian:存放制作debian打包需要的所有内容 +DOCS: 除了README 和README.GB, COPYING 之外的所有文档。 + 其中自动生成的00TRANSLATED 只有英文版本,其他文档都提供UTF-8 和GB 两种版本。 +raw: 原始的man文档,为便于校对而设立。要注意更新 +src: 存放着生成安装包需要的原始的man文档以及为GB包准备的cman配置文件。 + 从cman 的cvs中获得文档之后,应当将其转换为UTF-8 格式man文档,然后再复制到本目录的相应位置。转换需要的程序是iconv 和dos2unix,html格式也应转换为man格式再进入本目录。 +utils: 存放着各种有用的脚本。 +UTF-8, GB 目录中的内容是在执行make 时自动生成的。 +另外根目录还有Makefile 以及man-pages-zh_CN.spec 用来控制打包。 + +参与翻译的成员请注意DOCS 目录提供的词汇表,src/man9 提供的中文翻译的两个例子,还有以下内容: +1) 译者请将自己的信息放在署名中 (默认情况下译者是维护人)。如果译者不想管理自己的“产品”,也可以在署名中加以说明; +2) man手册中文版的署名的形式为 (一定要保留原英文作者名字,版权等信息,只要将下面一段复制粘贴到文档最后即可,注意空格): +.SH "[中文版维护人]" +.B 姓名 +.SH "[中文版最新更新]" +.BR yyyy.mm.dd +.SH "[中国linux论坛中文手册页翻译计划]" +.BI http://cmpp.linuxforum.net diff --git a/README.GB b/README.GB new file mode 100644 index 00000000..d0d45ef8 --- /dev/null +++ b/README.GB @@ -0,0 +1,31 @@ +CMPP ֲҳ뵽 http://sf.linuxforum.net/projects/cmpp 鿴ĿĽȡµļأ http://www.linuxforum.net ۰빤 + +ڰװ֮ǰ locale 鿴ԼԻʲôҪӰ LC_ALLLC_CTYPE LANG ֵԻ zh_CN.UTF-8 make u8 && make install-u8Ի GB2312GBK GB18030 make gb && make install-gbߣضӦrpm װͬ򵥡 zh_CN.UTF-8Ӧװ man-pages-zh_CN-1.x GB2312GBKGB18030Ӧװ man-pages-zh_CN-gb-1.x۰ϹڲͬаϵͳĬı˵ + +Ҫ˵ǣͬʱװ rpm ҲûģϵͳʲôӰ죬ΪֻǼ򵥵ıļڰװ man-pages-zh_CN-gb-1.x ֮Ӧע˳µ¼ܼ֮ʹֲҳϵͳڰװ UTF-8 Ի man-pages-zh_CN-1.x ֮󣬲עͿˡʹ÷Ҳвͬ GB* ԻӦʹ cman 鿴 ``cman ls'' UTF-8 Իϵͳ Fedora Core 2ֻҪʹ man Ϳˡ + +ѷĵİȨ䷭ߣɷָĵû˵ĻеĵѭGNU FDL ·ļû˵ȨFSFѭGNU GPL 鷭߷Ȩ + +κ⣬õʼͱƻЭ + xumingϵ + +ԴĿ¼ṹ˵£ +debiandebianҪ +DOCS README README.GB, COPYING ֮ĵ + Զɵ00TRANSLATED ֻӢİ汾ĵṩUTF-8 GB ְ汾 +raw: ԭʼmanĵΪУԶҪע +src ɰװҪԭʼmanĵԼΪGB׼cmanļ + cman cvsлĵ֮ӦתΪUTF-8 ʽmanĵȻٸƵĿ¼ӦλáתҪijiconv dos2unixhtmlʽҲӦתΪmanʽٽ뱾Ŀ¼ +utils ŸõĽű +UTF-8, GB Ŀ¼еִmake ʱԶɵġ +Ŀ¼Makefile Լman-pages-zh_CN.spec ƴ + +뷭ijԱעDOCS Ŀ¼ṩĴʻsrc/man9 ṩķӣݣ +1) 뽫ԼϢ (Ĭά)߲ԼġƷҲм˵; +2) manֲİʽΪ (һҪԭӢ֣ȨϢֻҪһθճĵ󼴿ɣעո): +.SH "[İά]" +.B +.SH "[ݸ]" +.BR yyyy.mm.dd +.SH "[йlinuxֲ̳ҳƻ]" +.BI http://cmpp.linuxforum.net diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..7bc9cd15 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,26 @@ +cman (1.4-7) unstable; urgency=low + + * Added some more translations and small bug fixes. + + -- bbbush Thu, 04 Mar 2004 12:30:00 +0800 + +cman (1.4-6) unstable; urgency=low + + * Added original documents in raw directory + + -- bbbush Sat, 20 Dec 2003 12:30:00 +0800 + +cman (1.4-5) unstable; urgency=low + + * Default file encoding is UTF-8 + * zh_TW is removed, hope somebody to add it one day + + -- bbbush Tue, 25 Nov 2003 15:17:08 +0800 + +cman (0.0.7-1) unstable; urgency=low + + * Initial Release. + * Added zh_TW man pages converted from zh_CN using zh-autoconvert + and my own conversion table. :-) + + -- Anthony Fok Fri, 1 Jun 2001 15:17:08 -0600 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..a4dc4b3c --- /dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: cman +Section: doc +Priority: optional +Maintainer: bbbush + +Package: manpages-zh +Architecture: any +Suggests: man-browser +Conflicts: zh-trans +Replaces: zh-trans +Provides: zh-trans +Description: Chinese manual pages + This package contains the Chinese manual pages translated by the + Chinese Manual Pages Project (CMPP). + Only zh_CN.UTF-8 and zh_CN.GB* are provided. Any body convert it to zh_TW ? + . + Home Page: http://cmpp.linuxforum.net diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..e69de29b diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..74284bfe --- /dev/null +++ b/debian/rules @@ -0,0 +1,55 @@ +#!/usr/bin/make -f +package := manpages-zh +prefix := $(shell pwd)/debian/$(package) +arch := $(shell dpkg --print-architecture) + +DESTDIR := $(prefix)/usr/share +CONFDIR := $(prefix)/etc + +binary: u8 gb install + +u8:u8-stamp +u8-stamp: + dh_testdir + dh_testroot + $(MAKE) u8 + touch u8-stamp +gb:gb-stamp +gb-stamp: + dh_testdir + dh_testroot + $(MAKE) gb + touch gb-stamp + +install:u8-stamp gb-stamp + dh_testdir + dh_testroot + dh_clean -k + $(MAKE) DESTDIR=$(DESTDIR) install-u8 + $(MAKE) DESTDIR=$(DESTDIR) CONFDIR=$(CONFDIR) install-gb + dh_installdirs + dh_installdocs DOCS/* README* + dh_installchangelogs + cp -R debian/$(package)/* debian/tmp/ + dh_link + dh_strip + dh_compress --exclude=man.macros + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +clean: + dh_testdir + dh_testroot + dh_clean -k + rm -f *-stamp + make clean + dh_clean + rm -rf debian/$(package) +uninstall: + dh_testdir + dh_testroot + dh_clean -k + make DESTDIR=$(DESTDIR) CONFDIR=$(CONFDIR) uninstall diff --git a/man-pages-zh_CN.spec b/man-pages-zh_CN.spec new file mode 100644 index 00000000..676ce4bb --- /dev/null +++ b/man-pages-zh_CN.spec @@ -0,0 +1,78 @@ +Name: man-pages-zh_CN +Version: 1.5 +Release: 1 +Summary: Chinese translation of man pages from the CMPP project +Summary(zh_CN): 来自CMPP 计划的中文手册页 + +Group: Documentation +Copyright: FDL +Vendor: CMPP project +URL: http://cmpp.linuxforum.net +Source: http://cmpp.linuxforum.net/download/%{name}-%{version}.tar.gz +Packager: bbbush +Prefix: %{_prefix} +BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildArch: noarch + +#========================== +%description +Chinese translation of man pages from the CMPP project. +%description -l zh_CN +来自CMPP 计划的中文手册页。 +请访问 http://cmpp.linuxforum.net 来获取更多信息。 +#========================== +%package gb +Summary: Chinese translation of man pages from the CMPP project, gb +Group: Documentation +%description gb +Chinese translation of man pages from the CMPP project. +Files are coded in zh_CN.GB18030 and you can use "cman" command to view them. +##========================== + +%prep +rm -rf $RPM_BUILD_ROOT +%setup -q + +%build +rm -rf $RPM_BUILD_ROOT +make u8 +make gb + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT%{_usr}/share install-doc +make DESTDIR=$RPM_BUILD_ROOT%{_usr}/share install-u8 +make DESTDIR=$RPM_BUILD_ROOT%{_usr}/share CONFDIR=$RPM_BUILD_ROOT%{_sysconfdir} install-gb + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%{_mandir}/zh_CN.UTF-8 +%{_usr}/share/doc/%{name} +%files gb +%{_mandir}/zh_CN +%{_mandir}/zh_CN.GB* +%{_sysconfdir}/cman.conf +%{_sysconfdir}/profile.d/cman.* +%{_usr}/share/doc/%{name} + +%changelog +* Mon May 24 2004 bbbush +- FedoraCore2 use zh_CN as an alias of zh_CN.GB2312, but default is zh_CN.UTF-8 + +* Sun Oct 26 2003 bbbush +- mainly for UTF-8 + +* Tue Jun 19 2001 Yangbotao +- first chinese manpages. + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Tue Jun 20 2000 Jeff Johnson +- rebuild to compress man pages. + +* Sun Jun 11 2000 Trond Eivind Glomsrød +- first build + diff --git a/raw/NOT_FOUND b/raw/NOT_FOUND new file mode 100644 index 00000000..0c961cab --- /dev/null +++ b/raw/NOT_FOUND @@ -0,0 +1,64 @@ +cp: stat‘/usr/share/man/man1/ac.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/ali.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/autorun.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/biff.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/cce.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/charset.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/dircolor.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/dnskeygen.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/dnsquery.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/git.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/gview.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/gvim.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/listalias.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/mailto.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/make_smbcodepage.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/mencoder.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/mirror.1l.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/mode.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/mplayer.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/perl.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/rgview.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/rgvim.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/showfont.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/smbrun.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/smbsh.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/sq.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/tcpdump.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/unsq.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/uuencode.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/vt-is-UTF8.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man1/xmodmap.1.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man5/ftpaccess.5.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man5/lilo.conf.5.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man5/man.conf.5.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man5/nsswitch.5.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man7/roff.7.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man7/suffix.7.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man8/bdflush.8.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man8/imapd.8.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man8/inetd.8.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man8/lilo.8.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man8/named-bootconf.8.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man8/printcap.8.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man8/quotaoff.8.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man8/quotastats.8.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man8/setclock.8.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man8/swat.8.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man9/cmanexample.9.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/man9/cmanformat.9.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/ArrowButton.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/Button.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/ComboBox.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/Dialog.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/LabelFrame.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/MainFrame.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/Notebook.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/PagesManager.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/PanedWindow.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/ProgressBar.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/ScrollableFrame.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/ScrolledWindow.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/SpinBox.n.gz’失败: 没有那个文件或目录 +cp: stat‘/usr/share/man/mann/TitleFrame.n.gz’失败: 没有那个文件或目录 +mpg123.1 diff --git a/raw/man.macros b/raw/man.macros new file mode 100644 index 00000000..5a625707 --- /dev/null +++ b/raw/man.macros @@ -0,0 +1,236 @@ +'\" The definitions below are for supplemental macros used in Tcl/Tk +'\" manual entries. +'\" +'\" .AP type name in/out ?indent? +'\" Start paragraph describing an argument to a library procedure. +'\" type is type of argument (int, etc.), in/out is either "in", "out", +'\" or "in/out" to describe whether procedure reads or modifies arg, +'\" and indent is equivalent to second arg of .IP (shouldn't ever be +'\" needed; use .AS below instead) +'\" +'\" .AS ?type? ?name? +'\" Give maximum sizes of arguments for setting tab stops. Type and +'\" name are examples of largest possible arguments that will be passed +'\" to .AP later. If args are omitted, default tab stops are used. +'\" +'\" .BS +'\" Start box enclosure. From here until next .BE, everything will be +'\" enclosed in one large box. +'\" +'\" .BE +'\" End of box enclosure. +'\" +'\" .CS +'\" Begin code excerpt. +'\" +'\" .CE +'\" End code excerpt. +'\" +'\" .VS ?version? ?br? +'\" Begin vertical sidebar, for use in marking newly-changed parts +'\" of man pages. The first argument is ignored and used for recording +'\" the version when the .VS was added, so that the sidebars can be +'\" found and removed when they reach a certain age. If another argument +'\" is present, then a line break is forced before starting the sidebar. +'\" +'\" .VE +'\" End of vertical sidebar. +'\" +'\" .DS +'\" Begin an indented unfilled display. +'\" +'\" .DE +'\" End of indented unfilled display. +'\" +'\" .SO +'\" Start of list of standard options for a Tk widget. The +'\" options follow on successive lines, in four columns separated +'\" by tabs. +'\" +'\" .SE +'\" End of list of standard options for a Tk widget. +'\" +'\" .OP cmdName dbName dbClass +'\" Start of description of a specific option. cmdName gives the +'\" option's name as specified in the class command, dbName gives +'\" the option's name in the option database, and dbClass gives +'\" the option's class in the option database. +'\" +'\" .UL arg1 arg2 +'\" Print arg1 underlined, then print arg2 normally. +'\" +'\" RCS: @(#) $Id: man.macros,v 1.1 2003/12/20 03:31:52 bbbush Exp $ +'\" +'\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +'\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +'\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +'\" # BS - start boxed text +'\" # ^y = starting y location +'\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +'\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +'\" # VS - start vertical sidebar +'\" # ^Y = starting y location +'\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +'\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +'\" # Special macro to handle page bottom: finish off current +'\" # box/sidebar if in box/sidebar mode, then invoked standard +'\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +'\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +'\" # DE - end display +.de DE +.fi +.RE +.sp +.. +'\" # SO - start of list of standard options +.de SO +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 4c 8c 12c +.ft B +.. +'\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\fBoptions\\fR manual entry for details on the standard options. +.. +'\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +'\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +'\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.de UL +\\$1\l'|0\(ul'\\$2 +.. diff --git a/raw/man1/..1 b/raw/man1/..1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/..1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/:.1 b/raw/man1/:.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/:.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/[.1 b/raw/man1/[.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/[.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/a2p.1 b/raw/man1/a2p.1 new file mode 100644 index 00000000..430c3d1c --- /dev/null +++ b/raw/man1/a2p.1 @@ -0,0 +1,298 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.13 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "A2P 1" +.TH A2P 1 "2003-09-02" "perl v5.8.1" "Perl Programmers Reference Guide" +.SH "NAME" +a2p \- Awk to Perl translator +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBa2p [options] filename\fR +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fIA2p\fR takes an awk script specified on the command line (or from +standard input) and produces a comparable \fIperl\fR script on the +standard output. +.Sh "Options" +.IX Subsection "Options" +Options include: +.IP "\fB\-D\fR" 5 +.IX Item "-D" +sets debugging flags. +.IP "\fB\-F\fR" 5 +.IX Item "-F" +tells a2p that this awk script is always invoked with this \fB\-F\fR +switch. +.IP "\fB\-n\fR" 5 +.IX Item "-n" +specifies the names of the input fields if input does not have to be +split into an array. If you were translating an awk script that +processes the password file, you might say: +.Sp +.Vb 1 +\& a2p -7 -nlogin.password.uid.gid.gcos.shell.home +.Ve +.Sp +Any delimiter can be used to separate the field names. +.IP "\fB\-\fR" 5 +.IX Item "-" +causes a2p to assume that input will always have that many fields. +.IP "\fB\-o\fR" 5 +.IX Item "-o" +tells a2p to use old awk behavior. The only current differences are: +.RS 5 +.IP "*" 5 +Old awk always has a line loop, even if there are no line +actions, whereas new awk does not. +.IP "*" 5 +In old awk, sprintf is extremely greedy about its arguments. +For example, given the statement +.Sp +.Vb 1 +\& print sprintf(some_args), extra_args; +.Ve +.Sp +old awk considers \fIextra_args\fR to be arguments to \f(CW\*(C`sprintf\*(C'\fR; new awk +considers them arguments to \f(CW\*(C`print\*(C'\fR. +.RE +.RS 5 +.RE +.ie n .Sh """Considerations""" +.el .Sh "``Considerations''" +.IX Subsection "Considerations" +A2p cannot do as good a job translating as a human would, but it +usually does pretty well. There are some areas where you may want to +examine the perl script produced and tweak it some. Here are some of +them, in no particular order. +.PP +There is an awk idiom of putting \fIint()\fR around a string expression to +force numeric interpretation, even though the argument is always +integer anyway. This is generally unneeded in perl, but a2p can't +tell if the argument is always going to be integer, so it leaves it +in. You may wish to remove it. +.PP +Perl differentiates numeric comparison from string comparison. Awk +has one operator for both that decides at run time which comparison to +do. A2p does not try to do a complete job of awk emulation at this +point. Instead it guesses which one you want. It's almost always +right, but it can be spoofed. All such guesses are marked with the +comment "\f(CW\*(C`#???\*(C'\fR". You should go through and check them. You might +want to run at least once with the \fB\-w\fR switch to perl, which will +warn you if you use == where you should have used eq. +.PP +Perl does not attempt to emulate the behavior of awk in which +nonexistent array elements spring into existence simply by being +referenced. If somehow you are relying on this mechanism to create +null entries for a subsequent for...in, they won't be there in perl. +.PP +If a2p makes a split line that assigns to a list of variables that +looks like (Fld1, Fld2, Fld3...) you may want to rerun a2p using the +\&\fB\-n\fR option mentioned above. This will let you name the fields +throughout the script. If it splits to an array instead, the script +is probably referring to the number of fields somewhere. +.PP +The exit statement in awk doesn't necessarily exit; it goes to the \s-1END\s0 +block if there is one. Awk scripts that do contortions within the \s-1END\s0 +block to bypass the block under such circumstances can be simplified +by removing the conditional in the \s-1END\s0 block and just exiting directly +from the perl script. +.PP +Perl has two kinds of array, numerically-indexed and associative. +Perl associative arrays are called \*(L"hashes\*(R". Awk arrays are usually +translated to hashes, but if you happen to know that the index is +always going to be numeric you could change the {...} to [...]. +Iteration over a hash is done using the \fIkeys()\fR function, but iteration +over an array is \s-1NOT\s0. You might need to modify any loop that iterates +over such an array. +.PP +Awk starts by assuming \s-1OFMT\s0 has the value %.6g. Perl starts by +assuming its equivalent, $#, to have the value %.20g. You'll want to +set $# explicitly if you use the default value of \s-1OFMT\s0. +.PP +Near the top of the line loop will be the split operation that is +implicit in the awk script. There are times when you can move this +down past some conditionals that test the entire record so that the +split is not done as often. +.PP +For aesthetic reasons you may wish to change the array base $[ from 1 +back to perl's default of 0, but remember to change all array +subscripts \s-1AND\s0 all \fIsubstr()\fR and \fIindex()\fR operations to match. +.PP +Cute comments that say \*(L"# Here is a workaround because awk is dumb\*(R" +are passed through unmodified. +.PP +Awk scripts are often embedded in a shell script that pipes stuff into +and out of awk. Often the shell script wrapper can be incorporated +into the perl script, since perl can start up pipes into and out of +itself, and can do other things that awk can't do by itself. +.PP +Scripts that refer to the special variables \s-1RSTART\s0 and \s-1RLENGTH\s0 can +often be simplified by referring to the variables $`, $& and $', as +long as they are within the scope of the pattern match that sets them. +.PP +The produced perl script may have subroutines defined to deal with +awk's semantics regarding getline and print. Since a2p usually picks +correctness over efficiency. it is almost always possible to rewrite +such code to be more efficient by discarding the semantic sugar. +.PP +For efficiency, you may wish to remove the keyword from any return +statement that is the last statement executed in a subroutine. A2p +catches the most common case, but doesn't analyze embedded blocks for +subtler cases. +.PP +ARGV[0] translates to \f(CW$ARGV0\fR, but ARGV[n] translates to \f(CW$ARGV\fR[$n]. A +loop that tries to iterate over ARGV[0] won't find it. +.SH "ENVIRONMENT" +.IX Header "ENVIRONMENT" +A2p uses no environment variables. +.SH "AUTHOR" +.IX Header "AUTHOR" +Larry Wall <\fIlarry@wall.org\fR> +.SH "FILES" +.IX Header "FILES" +.SH "SEE ALSO" +.IX Header "SEE ALSO" +.Vb 1 +\& perl The perl compiler/interpreter +.Ve +.PP +.Vb 1 +\& s2p sed to perl translator +.Ve +.SH "DIAGNOSTICS" +.IX Header "DIAGNOSTICS" +.SH "BUGS" +.IX Header "BUGS" +It would be possible to emulate awk's behavior in selecting string +versus numeric operations at run time by inspection of the operands, +but it would be gross and inefficient. Besides, a2p almost always +guesses right. +.PP +Storage for the awk syntax tree is currently static, and can run out. diff --git a/raw/man1/ab.1 b/raw/man1/ab.1 new file mode 100644 index 00000000..cc39de43 --- /dev/null +++ b/raw/man1/ab.1 @@ -0,0 +1,127 @@ +.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +.\" DO NOT EDIT! Generated from XML source. +.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +.de Sh \" Subsection +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Ip \" List item +.br +.ie \\n(.$>=3 .ne \\$3 +.el .ne 3 +.IP "\\$1" \\$2 +.. +.TH "AB" 8 "2003-04-29" "Apache HTTP Server" "ab" + +.SH NAME +ab \- Apache HTTP server benchmarking tool + +.SH "SYNOPSIS" + +.PP +\fBab\fR [ -\fBA\fR \fIauth-username\fR:\fIpassword\fR ] [ -\fBc\fR \fIconcurrency\fR ] [ -\fBC\fR \fIcookie-name\fR=\fIvalue\fR ] [ -\fBd\fR ] [ -\fBe\fR \fIcsv-file\fR ] [ -\fBg\fR \fIgnuplot-file\fR ] [ -\fBh\fR ] [ -\fBH\fR \fIcustom-header\fR ] [ -\fBi\fR ] [ -\fBk\fR ] [ -\fBn\fR \fIrequests\fR ] [ -\fBp\fR \fIPOST-file\fR ] [ -\fBP\fR \fIproxy-auth-username\fR:\fIpassword\fR ] [ -\fBq\fR ] [ -\fBs\fR ] [ -\fBS\fR ] [ -\fBt\fR \fItimelimit\fR ] [ -\fBT\fR \fIcontent-type\fR ] [ -\fBv\fR \fIverbosity\fR] [ -\fBV\fR ] [ -\fBw\fR ] [ -\fBx\fR \fI-attributes\fR ] [ -\fBX\fR \fIproxy\fR[:\fIport\fR] ] [ -\fBy\fR \fI-attributes\fR ] [ -\fBz\fR \fI
-attributes\fR ] [http://]\fIhostname\fR[:\fIport\fR]/\fIpath\fR + + +.SH "SUMMARY" + +.PP +ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server\&. It is designed to give you an impression of how your current Apache installation performs\&. This especially shows you how many requests per second your Apache installation is capable of serving\&. + + +.SH "OPTIONS" + +.RS + +.TP +-A \fIauth-username\fR:\fIpassword\fR +Supply BASIC Authentication credentials to the server\&. The username and password are separated by a single : and sent on the wire base64 encoded\&. The string is sent regardless of whether the server needs it (\fIi\&.e\&.\fR, has sent an 401 authentication needed)\&. +.TP +-c \fIconcurrency\fR +Number of multiple requests to perform at a time\&. Default is one request at a time\&. +.TP +-C \fIcookie-name\fR=\fIvalue\fR +Add a Cookie: line to the request\&. The argument is typically in the form of a \fIname\fR=\fIvalue\fR pair\&. This field is repeatable\&. +.TP +-d +Do not display the "percentage served within XX [ms] table"\&. (legacy support)\&. +.TP +-e \fIcsv-file\fR +Write a Comma separated value (CSV) file which contains for each percentage (from 1% to 100%) the time (in milli seconds) it took to serve that percentage of the requests\&. This is usually more useful than the 'gnuplot' file; as the results are already 'binned'\&. +.TP +-g \fIgnuplot-file\fR +Write all measured values out as a 'gnuplot' or TSV (Tab separate values) file\&. This file can easily be imported into packages like Gnuplot, IDL, Mathematica, Igor or even Excell\&. The labels are on the first line of the file\&. +.TP +-h +Display usage information\&. +.TP +-H \fIcustom-header\fR +Append extra headers to the request\&. The argument is typically in the form of a valid header line, containing a colon-separated field-value pair (\fIi\&.e\&.\fR, "Accept-Encoding: zip/zop;8bit")\&. +.TP +-i +Do HEAD requests instead of GET\&. +.TP +-k +Enable the HTTP KeepAlive feature, \fIi\&.e\&.\fR, perform multiple requests within one HTTP session\&. Default is no KeepAlive\&. +.TP +-n \fIrequests\fR +Number of requests to perform for the benchmarking session\&. The default is to just perform a single request which usually leads to non-representative benchmarking results\&. +.TP +-p \fIPOST-file\fR +File containing data to POST\&. +.TP +-P \fIproxy-auth-username\fR:\fIpassword\fR +Supply BASIC Authentication credentials to a proxy en-route\&. The username and password are separated by a single : and sent on the wire base64 encoded\&. The string is sent regardless of whether the proxy needs it (\fIi\&.e\&.\fR, has sent an 407 proxy authentication needed)\&. +.TP +-q +When processing more than 150 requests, ab outputs a progress count on stderr every 10% or 100 requests or so\&. The -q flag will suppress these messages\&. +.TP +-s +When compiled in (ab -h will show you) use the SSL protected https rather than the http protocol\&. This feature is experimental and \fIvery\fR rudimentary\&. You probably do not want to use it\&. +.TP +-S +Do not display the median and standard deviation values, nor display the warning/error messages when the average and median are more than one or two times the standard deviation apart\&. And default to the min/avg/max values\&. (legacy support)\&. +.TP +-t \fItimelimit\fR +Maximum number of seconds to spend for benchmarking\&. This implies a -n 50000 internally\&. Use this to benchmark the server within a fixed total amount of time\&. Per default there is no timelimit\&. +.TP +-T \fIcontent-type\fR +Content-type header to use for POST data\&. +.TP +-v \fIverbosity\fR +Set verbosity level - 4 and above prints information on headers, 3 and above prints response codes (404, 200, etc\&.), 2 and above prints warnings and info\&. +.TP +-V +Display version number and exit\&. +.TP +-w +Print out results in HTML tables\&. Default table is two columns wide, with a white background\&. +.TP +-x \fI-attributes\fR +String to use as attributes for
\&. Attributes are inserted
\&. +.TP +-X \fIproxy\fR[:\fIport\fR] +Use a proxy server for the requests\&. +.TP +-y \fI-attributes\fR +String to use as attributes for \&. +.TP +-z \fI
-attributes\fR +String to use as attributes for \&. +.RE + +.SH "BUGS" + +.PP +There are various statically declared buffers of fixed length\&. Combined with the lazy parsing of the command line arguments, the response headers from the server and other external inputs, this might bite you\&. + +.PP +It does not implement HTTP/1\&.x fully; only accepts some 'expected' forms of responses\&. The rather heavy use of strstr(3) shows up top in profile, which might indicate a performance problem; \fIi\&.e\&.\fR, you would measure the ab performance rather than the server's\&. + diff --git a/raw/man1/access.1 b/raw/man1/access.1 new file mode 100644 index 00000000..50600111 --- /dev/null +++ b/raw/man1/access.1 @@ -0,0 +1,64 @@ +.TH ACCESS 1 "4 January 1998" "Kpathsea 3.4.5" +.\"===================================================================== +.if n .ds MP MetaPost +.if t .ds MP MetaPost +.if n .ds MF Metafont +.if t .ds MF M\s-2ETAFONT\s0 +.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP +.if n .ds TX TeX +.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP\" for troff +.el .ds OX TeX\" for nroff +.\" the same but obliqued +.\" BX definition must follow TX so BX can use TX +.if t .ds BX \fRB\s-2IB\s0\fP\*(TX +.if n .ds BX BibTeX +.\" LX definition must follow TX so LX can use TX +.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX +.if n .ds LX LaTeX +.\"===================================================================== +.SH NAME +access \- determine whether a file can be accessed +.SH SYNOPSIS +.B access +.I -mode +.I file +.\"===================================================================== +.SH DESCRIPTION +Exit successfully if +.I file +can be accessed with the specified mode. +.I mode +is one or more letters of +.IR rwx , +where +.I r +is for readable, +.I w +is for writable, and +.I x +is for executable. +.PP +The difference between +.B access +and +.B test +is that the latter looks at the permission bits, while the former +checks using the +.BR access (2) +system call. This makes a difference when file systems have been +mounted read-only. +.\"===================================================================== +.SH OPTIONS +.B access +accepts the following additional options: +.TP +.B --help +.rb +Print help message and exit. +.TP +.B --version +.rb +Print version information and exit. +.\"===================================================================== +.SH "SEE ALSO" +.BR access (2) diff --git a/raw/man1/alias.1 b/raw/man1/alias.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/alias.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/apm.1 b/raw/man1/apm.1 new file mode 100644 index 00000000..e9dce695 --- /dev/null +++ b/raw/man1/apm.1 @@ -0,0 +1,86 @@ +.\" apm.1 -- +.\" Created: Wed Jan 10 14:54:03 1996 by r.faith@ieee.org +.\" Revised: Sun Apr 21 16:37:43 1996 by r.faith@ieee.org +.\" Copyright 1996 Rickard E. Faith (r.faith@ieee.org) +.\" +.\" Permission is granted to make and distribute verbatim copies of this +.\" manual provided the copyright notice and this permission notice are +.\" preserved on all copies. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" +.TH APM 1 "10 Jan 1996" "" "Linux Programmer's Manual" +.SH NAME +apm \- query Advanced Power Management (APM) BIOS +.SH SYNOPSIS +.B apm [ \-vVmsS ] +.SH DESCRIPTION +.B apm +reads +.I /proc/apm +and presents the output in a human-readable format. Since primarily +battery status information is provided, this command is most useful on +laptops with a compliant APM BIOS. +.B apm +also allows the machine to be put into standby or suspend mode. +.SH OPTIONS +.TP +.B \-V, \-\-version +Print the +.B apm +program version and exit immediately. +.TP +.B \-v, \-\-verbose +Print information about the APM BIOS version and Linux APM driver version. +.TP +.B \-m, \-\-minutes +Print total minutes remaining instead of using an hh:mm format. +.TP +.B \-s, \-\-suspend +Put the machine into suspend mode if possible. +.TP +.B \-S, \-\-standby +Put the machine into standby mode if possible. +.TP +.B \-i, \-\-ignore +Tell the system to ignore system-generated APM suspend and standby events +when on AC power. This may be useful to users who have laptops and want +APM events when on battery power, but not when on AC power. +.TP +.B \-n, \-\-noignore +Tell the system +.B not +to ignore system-generated APM suspend and standby events +when on AC power. This is the default mode; this option is provided as a +way to undo a prior "apm -i" call. +.TP +.SH BUGS +This program requires a post-1.3.57 kernel. This program will not work +with older kernels or with the APM patches, since the format for +.I /proc/apm +has changed radically. +.SH FILES +.I /proc/apm +.br +.I linux/drivers/char/apm_bios.c +.SH AUTHOR +This program was written by Rik Faith (faith@cs.unc.edu) and may be freely +distributed under the terms of the GNU General Public License. There is +ABSOLUTELY NO WARRANTY for this program. The current maintainer is Avery +Pennarun (apenwarr@worldvisions.ca). +.SH "SEE ALSO" +.BR xapm "(1), "apmd (8) diff --git a/raw/man1/apropos.1 b/raw/man1/apropos.1 new file mode 100644 index 00000000..7825a312 --- /dev/null +++ b/raw/man1/apropos.1 @@ -0,0 +1,31 @@ +.\" +.\" Generated automatically from apropos.1.in by the +.\" configure script. +.\" +.\" Man page for apropos +.\" +.\" Copyright (c) 1990, 1991, John W. Eaton. +.\" +.\" You may distribute under the terms of the GNU General Public +.\" License as specified in the README file that comes with the man 1.0 +.\" distribution. +.\" +.\" John W. Eaton +.\" jwe@che.utexas.edu +.\" Department of Chemical Engineering +.\" The University of Texas at Austin +.\" Austin, Texas 78712 +.\" +.TH apropos 1 "Jan 15, 1991" +.LO 1 +.SH NAME +apropos \- search the whatis database for strings +.SH SYNOPSIS +.BI apropos +keyword ... +.SH DESCRIPTION +apropos searches a set of database files containing short descriptions +of system commands for keywords and displays the result on the +standard output. +.SH "SEE ALSO" +whatis(1), man(1). diff --git a/raw/man1/ar.1 b/raw/man1/ar.1 new file mode 100644 index 00000000..f0671881 --- /dev/null +++ b/raw/man1/ar.1 @@ -0,0 +1,377 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.13 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "AR 1" +.TH AR 1 "2003-09-30" "binutils-2.14.90.0.6" "GNU Development Tools" +.SH "NAME" +ar \- create, modify, and extract from archives +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +ar [\fB\-X32_64\fR] [\fB\-\fR]\fIp\fR[\fImod\fR [\fIrelpos\fR] [\fIcount\fR]] \fIarchive\fR [\fImember\fR...] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +The \s-1GNU\s0 \fBar\fR program creates, modifies, and extracts from +archives. An \fIarchive\fR is a single file holding a collection of +other files in a structure that makes it possible to retrieve +the original individual files (called \fImembers\fR of the archive). +.PP +The original files' contents, mode (permissions), timestamp, owner, and +group are preserved in the archive, and can be restored on +extraction. +.PP +\&\s-1GNU\s0 \fBar\fR can maintain archives whose members have names of any +length; however, depending on how \fBar\fR is configured on your +system, a limit on member-name length may be imposed for compatibility +with archive formats maintained with other tools. If it exists, the +limit is often 15 characters (typical of formats related to a.out) or 16 +characters (typical of formats related to coff). +.PP +\&\fBar\fR is considered a binary utility because archives of this sort +are most often used as \fIlibraries\fR holding commonly needed +subroutines. +.PP +\&\fBar\fR creates an index to the symbols defined in relocatable +object modules in the archive when you specify the modifier \fBs\fR. +Once created, this index is updated in the archive whenever \fBar\fR +makes a change to its contents (save for the \fBq\fR update operation). +An archive with such an index speeds up linking to the library, and +allows routines in the library to call each other without regard to +their placement in the archive. +.PP +You may use \fBnm \-s\fR or \fBnm \-\-print\-armap\fR to list this index +table. If an archive lacks the table, another form of \fBar\fR called +\&\fBranlib\fR can be used to add just the table. +.PP +\&\s-1GNU\s0 \fBar\fR is designed to be compatible with two different +facilities. You can control its activity using command-line options, +like the different varieties of \fBar\fR on Unix systems; or, if you +specify the single command-line option \fB\-M\fR, you can control it +with a script supplied via standard input, like the \s-1MRI\s0 ``librarian'' +program. +.SH "OPTIONS" +.IX Header "OPTIONS" +\&\s-1GNU\s0 \fBar\fR allows you to mix the operation code \fIp\fR and modifier +flags \fImod\fR in any order, within the first command-line argument. +.PP +If you wish, you may begin the first command-line argument with a +dash. +.PP +The \fIp\fR keyletter specifies what operation to execute; it may be +any of the following, but you must specify only one of them: +.IP "\fBd\fR" 4 +.IX Item "d" +\&\fIDelete\fR modules from the archive. Specify the names of modules to +be deleted as \fImember\fR...; the archive is untouched if you +specify no files to delete. +.Sp +If you specify the \fBv\fR modifier, \fBar\fR lists each module +as it is deleted. +.IP "\fBm\fR" 4 +.IX Item "m" +Use this operation to \fImove\fR members in an archive. +.Sp +The ordering of members in an archive can make a difference in how +programs are linked using the library, if a symbol is defined in more +than one member. +.Sp +If no modifiers are used with \f(CW\*(C`m\*(C'\fR, any members you name in the +\&\fImember\fR arguments are moved to the \fIend\fR of the archive; +you can use the \fBa\fR, \fBb\fR, or \fBi\fR modifiers to move them to a +specified place instead. +.IP "\fBp\fR" 4 +.IX Item "p" +\&\fIPrint\fR the specified members of the archive, to the standard +output file. If the \fBv\fR modifier is specified, show the member +name before copying its contents to standard output. +.Sp +If you specify no \fImember\fR arguments, all the files in the archive are +printed. +.IP "\fBq\fR" 4 +.IX Item "q" +\&\fIQuick append\fR; Historically, add the files \fImember\fR... to the end of +\&\fIarchive\fR, without checking for replacement. +.Sp +The modifiers \fBa\fR, \fBb\fR, and \fBi\fR do \fInot\fR affect this +operation; new members are always placed at the end of the archive. +.Sp +The modifier \fBv\fR makes \fBar\fR list each file as it is appended. +.Sp +Since the point of this operation is speed, the archive's symbol table +index is not updated, even if it already existed; you can use \fBar s\fR or +\&\fBranlib\fR explicitly to update the symbol table index. +.Sp +However, too many different systems assume quick append rebuilds the +index, so \s-1GNU\s0 \fBar\fR implements \fBq\fR as a synonym for \fBr\fR. +.IP "\fBr\fR" 4 +.IX Item "r" +Insert the files \fImember\fR... into \fIarchive\fR (with +\&\fIreplacement\fR). This operation differs from \fBq\fR in that any +previously existing members are deleted if their names match those being +added. +.Sp +If one of the files named in \fImember\fR... does not exist, \fBar\fR +displays an error message, and leaves undisturbed any existing members +of the archive matching that name. +.Sp +By default, new members are added at the end of the file; but you may +use one of the modifiers \fBa\fR, \fBb\fR, or \fBi\fR to request +placement relative to some existing member. +.Sp +The modifier \fBv\fR used with this operation elicits a line of +output for each file inserted, along with one of the letters \fBa\fR or +\&\fBr\fR to indicate whether the file was appended (no old member +deleted) or replaced. +.IP "\fBt\fR" 4 +.IX Item "t" +Display a \fItable\fR listing the contents of \fIarchive\fR, or those +of the files listed in \fImember\fR... that are present in the +archive. Normally only the member name is shown; if you also want to +see the modes (permissions), timestamp, owner, group, and size, you can +request that by also specifying the \fBv\fR modifier. +.Sp +If you do not specify a \fImember\fR, all files in the archive +are listed. +.Sp +If there is more than one file with the same name (say, \fBfie\fR) in +an archive (say \fBb.a\fR), \fBar t b.a fie\fR lists only the +first instance; to see them all, you must ask for a complete +listing\-\-\-in our example, \fBar t b.a\fR. +.IP "\fBx\fR" 4 +.IX Item "x" +\&\fIExtract\fR members (named \fImember\fR) from the archive. You can +use the \fBv\fR modifier with this operation, to request that +\&\fBar\fR list each name as it extracts it. +.Sp +If you do not specify a \fImember\fR, all files in the archive +are extracted. +.PP +A number of modifiers (\fImod\fR) may immediately follow the \fIp\fR +keyletter, to specify variations on an operation's behavior: +.IP "\fBa\fR" 4 +.IX Item "a" +Add new files \fIafter\fR an existing member of the +archive. If you use the modifier \fBa\fR, the name of an existing archive +member must be present as the \fIrelpos\fR argument, before the +\&\fIarchive\fR specification. +.IP "\fBb\fR" 4 +.IX Item "b" +Add new files \fIbefore\fR an existing member of the +archive. If you use the modifier \fBb\fR, the name of an existing archive +member must be present as the \fIrelpos\fR argument, before the +\&\fIarchive\fR specification. (same as \fBi\fR). +.IP "\fBc\fR" 4 +.IX Item "c" +\&\fICreate\fR the archive. The specified \fIarchive\fR is always +created if it did not exist, when you request an update. But a warning is +issued unless you specify in advance that you expect to create it, by +using this modifier. +.IP "\fBf\fR" 4 +.IX Item "f" +Truncate names in the archive. \s-1GNU\s0 \fBar\fR will normally permit file +names of any length. This will cause it to create archives which are +not compatible with the native \fBar\fR program on some systems. If +this is a concern, the \fBf\fR modifier may be used to truncate file +names when putting them in the archive. +.IP "\fBi\fR" 4 +.IX Item "i" +Insert new files \fIbefore\fR an existing member of the +archive. If you use the modifier \fBi\fR, the name of an existing archive +member must be present as the \fIrelpos\fR argument, before the +\&\fIarchive\fR specification. (same as \fBb\fR). +.IP "\fBl\fR" 4 +.IX Item "l" +This modifier is accepted but not used. +.IP "\fBN\fR" 4 +.IX Item "N" +Uses the \fIcount\fR parameter. This is used if there are multiple +entries in the archive with the same name. Extract or delete instance +\&\fIcount\fR of the given name from the archive. +.IP "\fBo\fR" 4 +.IX Item "o" +Preserve the \fIoriginal\fR dates of members when extracting them. If +you do not specify this modifier, files extracted from the archive +are stamped with the time of extraction. +.IP "\fBP\fR" 4 +.IX Item "P" +Use the full path name when matching names in the archive. \s-1GNU\s0 +\&\fBar\fR can not create an archive with a full path name (such archives +are not \s-1POSIX\s0 complaint), but other archive creators can. This option +will cause \s-1GNU\s0 \fBar\fR to match file names using a complete path +name, which can be convenient when extracting a single file from an +archive created by another tool. +.IP "\fBs\fR" 4 +.IX Item "s" +Write an object-file index into the archive, or update an existing one, +even if no other change is made to the archive. You may use this modifier +flag either with any operation, or alone. Running \fBar s\fR on an +archive is equivalent to running \fBranlib\fR on it. +.IP "\fBS\fR" 4 +.IX Item "S" +Do not generate an archive symbol table. This can speed up building a +large library in several steps. The resulting archive can not be used +with the linker. In order to build a symbol table, you must omit the +\&\fBS\fR modifier on the last execution of \fBar\fR, or you must run +\&\fBranlib\fR on the archive. +.IP "\fBu\fR" 4 +.IX Item "u" +Normally, \fBar r\fR... inserts all files +listed into the archive. If you would like to insert \fIonly\fR those +of the files you list that are newer than existing members of the same +names, use this modifier. The \fBu\fR modifier is allowed only for the +operation \fBr\fR (replace). In particular, the combination \fBqu\fR is +not allowed, since checking the timestamps would lose any speed +advantage from the operation \fBq\fR. +.IP "\fBv\fR" 4 +.IX Item "v" +This modifier requests the \fIverbose\fR version of an operation. Many +operations display additional information, such as filenames processed, +when the modifier \fBv\fR is appended. +.IP "\fBV\fR" 4 +.IX Item "V" +This modifier shows the version number of \fBar\fR. +.PP +\&\fBar\fR ignores an initial option spelt \fB\-X32_64\fR, for +compatibility with \s-1AIX\s0. The behaviour produced by this option is the +default for \s-1GNU\s0 \fBar\fR. \fBar\fR does not support any of the other +\&\fB\-X\fR options; in particular, it does not support \fB\-X32\fR +which is the default for \s-1AIX\s0 \fBar\fR. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fInm\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR. +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, +2001, 2002, 2003 Free Software Foundation, Inc. +.PP +Permission is granted to copy, distribute and/or modify this document +under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 +or any later version published by the Free Software Foundation; +with no Invariant Sections, with no Front-Cover Texts, and with no +Back-Cover Texts. A copy of the license is included in the +section entitled ``\s-1GNU\s0 Free Documentation License''. diff --git a/raw/man1/arch.1 b/raw/man1/arch.1 new file mode 100644 index 00000000..3eaf4f38 --- /dev/null +++ b/raw/man1/arch.1 @@ -0,0 +1,34 @@ +.\" arch.1 -- +.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) +.\" Public domain: may be freely distributed. +.TH ARCH 1 "4 July 1997" "Linux 2.0" "Linux Programmer's Manual" +.SH NAME +arch \- print machine architecture +.SH SYNOPSIS +.B arch +.SH DESCRIPTION +.B arch +is equivalent to +.BR "uname -m" . + +On current Linux systems, +.B arch +prints things such as "i386", "i486", "i586", "alpha", "sparc", +"arm", "m68k", "mips", "ppc". +.SH SEE ALSO +.BR uname (1), +.BR uname (2) +.\" +.\" Details: +.\" arch prints the machine part of the system_utsname struct +.\" This struct is defined in version.c, and this field is +.\" initialized with UTS_MACHINE, which is defined as $ARCH +.\" in the main Makefile. +.\" That gives the possibilities +.\" alpha arm i386 m68k mips ppc sparc sparc64 +.\" +.\" If Makefile is not edited, ARCH is guessed by +.\" ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/) +.\" Then how come we get these i586 values? +.\" Well, the routine check_bugs() does system_utsname.machine[1] = '0' + x86; +.\" (called in init/main.c, defined in ./include/asm-i386/bugs.h) diff --git a/raw/man1/at.1 b/raw/man1/at.1 new file mode 100644 index 00000000..4e37dc99 --- /dev/null +++ b/raw/man1/at.1 @@ -0,0 +1,285 @@ +.TH AT 1 "Nov 1996" local "Linux Programmer's Manual" +.SH NAME +at, batch, atq, atrm \- queue, examine or delete jobs for later execution +.SH SYNOPSIS +.B at +.RB [ -V ] +.RB [ -q +.IR queue ] +.RB [ -f +.IR file ] +.RB [ -mldbv ] +.B TIME +.br +.B "at -c" +.I job +.RI [ job... ] +.br +.B atq +.RB [ -V ] +.RB [ -q +.IR queue ] +.br +.B atrm +.RB [ -V ] +.I job +.RI [ job... ] +.br +.B batch +.RB [ -V ] +.RB [ -q +.IR queue ] +.RB [ -f +.IR file ] +.RB [ -mv ] +.RB [ TIME ] +.SH DESCRIPTION +.B at +and +.B batch +read commands from standard input or a specified file which are to +be executed at a later time, using the shell set by the user's environment +variable +.BR SHELL +or +.BR /bin/sh . +.TP 8 +.BR at +executes commands at a specified time. +.TP 8 +.BR atq +lists the user's pending jobs, unless the user is the superuser; in that +case, everybody's jobs are listed. The format of the output lines (one +for each job) is: Job number, date, hour, job class. +.TP 8 +.BR atrm +deletes jobs, identified by their job number. +.TP 8 +.BR batch +executes commands when system load levels permit; in other words, when the load average +drops below 0.8, or the value specified in the invocation of +.BR atrun . +.PP +.B At +allows fairly complex time +specifications, extending the POSIX.2 standard. It accepts times +of the form +.B HH:MM +to run a job at a specific time of day. +(If that time is already past, the next day is assumed.) +You may also specify +.B midnight, +.B noon, +or +.B teatime +(4pm) +and you can have a time-of-day suffixed with +.B AM +or +.B PM +for running in the morning or the evening. +You can also say what day the job will be run, +by giving a date in the form +.B month-name +.B day +with an optional +.B year, +or giving a date of the form +.B MMDDYY +or +.B MM/DD/YY +or +.B DD.MM.YY. +The specification of a date +.I must +follow the specification of the time of day. +You can also give times like +.B now +.B \+ +.I count +.I time-units, +where the time-units can be +.B minutes, +.B hours, +.B days, +or +.B weeks +and you can tell +.B at +to run the job today by suffixing the time with +.B today +and to run the job tomorrow by suffixing the time with +.B tomorrow. +.PP +For example, to run a job at 4pm three days from now, you would do +.B at 4pm + 3 days, +to run a job at 10:00am on July 31, you would do +.B at 10am Jul 31 +and to run a job at 1am tomorrow, you would do +.B at 1am tomorrow. +.PP +The exact definition of the time specification can be found in +.IR /usr/share/doc/at-3.1.8/timespec . +.PP +For both +.BR at " and " batch , +commands are read from standard input or the file specified +with the +.B -f +option and executed. +The working directory, the environment (except for the variables +.BR TERM , +.BR DISPLAY +and +.BR _ ) +and the umask are retained from the time of invocation. +An +.BR "at " \- +or +.BR "batch "\- +command invoked from a +.B su(1) +shell will retain the current userid. +The user will be mailed standard error and standard output from his +commands, if any. +Mail will be sent using the command +.BR /usr/sbin/sendmail . +If +.B at +is executed from a +.B su(1) +shell, the owner of the login shell will receive the mail. +.PP +The superuser may use these commands in any case. +For other users, permission to use at is determined by the files +.I /etc/at.allow +and +.IR /etc/at.deny . +.PP +If the file +.I /etc/at.allow +exists, only usernames mentioned in it are allowed to use +.BR at . +.PP +If +.I /etc/at.allow +does not exist, +.I /etc/at.deny +is checked, every username not mentioned in it is then allowed +to use +.BR at . +.PP +If neither exists, only the superuser is allowed use of at. +.PP +An empty +.I /etc/at.deny +means that every user is allowed use these commands, this is the +default configuration. +.SH OPTIONS +.TP 8 +.B -V +prints the version number to standard error. +.TP 8 +.BI \-q " queue" +uses the specified queue. +A queue designation consists of a single letter; valid queue designations +range from +.B a +to +.BR z . +and +.B A +to +.BR Z . +The +.B a +queue is the default for +.B at +and the +.B b +queue for +.BR batch . +Queues with higher letters run with increased niceness. The special +queue "=" is reserved for jobs which are currently running. +.P +If a job is submitted to a queue designated with an uppercase letter, it +is treated as if it had been submitted to batch at that time. +If +.BR atq +is given a specific queue, it will only show jobs pending in that queue. +.TP 8 +.B \-m +Send mail to the user when the job has completed even if there was no +output. +.TP 8 +.BI \-f " file" +Reads the job from +.BI file +rather than standard input. +.TP 8 +.B \-l +Is an alias for +.B atq. +.TP +.B \-d +Is an alias for +.B atrm. +.TP +.TP +.B \-v +Shows the time the job will be executed. +.P +Times displayed will be in the format "1997-02-20 14:50" unless the +environment variable +.B POSIXLY_CORRECT +is set; then, it will be "Thu Feb 20 14:50:00 1996". +.TP +.B +\-c +cats the jobs listed on the command line to standard output. +.SH FILES +.I /var/spool/at +.br +.I /var/spool/at/spool +.br +.I /proc/loadavg +.br +.I /var/run/utmp +.br +.I /etc/at.allow +.br +.I /etc/at.deny +.SH SEE ALSO +.BR cron (1), +.BR nice (1), +.BR sh (1), +.BR umask (2), +.BR atd (8). +.SH BUGS +The correct operation of +.B batch +for Linux depends on the presence of a +.IR proc - +type directory mounted on +.IR /proc . +.PP +If the file +.I /var/run/utmp +is not available or corrupted, or if the user is not logged on at the +time +.B at +is invoked, the mail is sent to the userid found +in the environment variable +.BR LOGNAME . +If that is undefined or empty, the current userid is assumed. +.PP +.B At +and +.B batch +as presently implemented are not suitable when users are competing for +resources. +If this is the case for your site, you might want to consider another +batch system, such as +.BR nqs . +.SH AUTHOR +At was mostly written by Thomas Koenig, ig25@rz.uni-karlsruhe.de. diff --git a/raw/man1/basename.1 b/raw/man1/basename.1 new file mode 100644 index 00000000..3c33cb03 --- /dev/null +++ b/raw/man1/basename.1 @@ -0,0 +1,42 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH BASENAME "1" "October 2003" "GNU coreutils 5.0" FSF +.SH NAME +basename \- strip directory and suffix from filenames +.SH SYNOPSIS +.B basename +\fINAME \fR[\fISUFFIX\fR] +.br +.B basename +\fIOPTION\fR +.SH DESCRIPTION +.\" Add any additional description here +.PP +Print NAME with any leading directory components removed. +If specified, also remove a trailing SUFFIX. +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.SH AUTHOR +Written by FIXME unknown. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B basename +is maintained as a Texinfo manual. If the +.B info +and +.B basename +programs are properly installed at your site, the command +.IP +.B info basename +.PP +should give you access to the complete manual. diff --git a/raw/man1/bash.1 b/raw/man1/bash.1 new file mode 100644 index 00000000..e07a9f60 --- /dev/null +++ b/raw/man1/bash.1 @@ -0,0 +1,8368 @@ +.\" +.\" MAN PAGE COMMENTS to +.\" +.\" Chet Ramey +.\" Information Network Services +.\" Case Western Reserve University +.\" chet@ins.CWRU.Edu +.\" +.\" Last Change: Mon Jul 15 15:20:56 EDT 2002 +.\" +.\" bash_builtins, strip all but Built-Ins section +.if \n(zZ=1 .ig zZ +.if \n(zY=1 .ig zY +.TH BASH 1 "2002 July 15" "GNU Bash-2.05b" +.\" +.\" There's some problem with having a `@' +.\" in a tagged paragraph with the BSD man macros. +.\" It has to do with `@' appearing in the }1 macro. +.\" This is a problem on 4.3 BSD and Ultrix, but Sun +.\" appears to have fixed it. +.\" If you're seeing the characters +.\" `@u-3p' appearing before the lines reading +.\" `possible-hostname-completions +.\" and `complete-hostname' down in READLINE, +.\" then uncomment this redefinition. +.\" +.de }1 +.ds ]X \&\\*(]B\\ +.nr )E 0 +.if !"\\$1"" .nr )I \\$1n +.}f +.ll \\n(LLu +.in \\n()Ru+\\n(INu+\\n()Iu +.ti \\n(INu +.ie !\\n()Iu+\\n()Ru-\w\\*(]Xu-3p \{\\*(]X +.br\} +.el \\*(]X\h|\\n()Iu+\\n()Ru\c +.}f +.. +.\" +.\" File Name macro. This used to be `.PN', for Path Name, +.\" but Sun doesn't seem to like that very much. +.\" +.de FN +\fI\|\\$1\|\fP +.. +.SH NAME +bash \- GNU Bourne-Again SHell +.SH SYNOPSIS +.B bash +[options] +[file] +.SH COPYRIGHT +.if n Bash is Copyright (C) 1989-2002 by the Free Software Foundation, Inc. +.if t Bash is Copyright \(co 1989-2002 by the Free Software Foundation, Inc. +.SH DESCRIPTION +.B Bash +is an \fBsh\fR-compatible command language interpreter that +executes commands read from the standard input or from a file. +.B Bash +also incorporates useful features from the \fIKorn\fP and \fIC\fP +shells (\fBksh\fP and \fBcsh\fP). +.PP +.B Bash +is intended to be a conformant implementation of the IEEE +POSIX Shell and Tools specification (IEEE Working Group 1003\.2). +.SH OPTIONS +In addition to the single-character shell options documented in the +description of the \fBset\fR builtin command, \fBbash\fR +interprets the following options when it is invoked: +.PP +.PD 0 +.TP 10 +.BI \-c "\| string\^" +If the +.B \-c +option is present, then commands are read from +.IR string . +If there are arguments after the +.IR string , +they are assigned to the positional parameters, starting with +.BR $0 . +.TP +.B \-i +If the +.B \-i +option is present, the shell is +.IR interactive . +.TP +.B \-l +Make +.B bash +act as if it had been invoked as a login shell (see +.SM +.B INVOCATION +below). +.TP +.B \-r +If the +.B \-r +option is present, the shell becomes +.I restricted +(see +.SM +.B "RESTRICTED SHELL" +below). +.TP +.B \-s +If the +.B \-s +option is present, or if no arguments remain after option +processing, then commands are read from the standard input. +This option allows the positional parameters to be set +when invoking an interactive shell. +.TP +.B \-D +A list of all double-quoted strings preceded by \fB$\fP +is printed on the standard ouput. +These are the strings that +are subject to language translation when the current locale +is not \fBC\fP or \fBPOSIX\fP. +This implies the \fB\-n\fP option; no commands will be executed. +.TP +.B [\-+]O [\fIshopt_option\fP] +\fIshopt_option\fP is one of the shell options accepted by the +\fBshopt\fP builtin (see +.SM +.B SHELL BUILTIN COMMANDS +below). +If \fIshopt_option\fP is present, \fB\-O\fP sets the value of that option; +\fB+O\fP unsets it. +If \fIshopt_option\fP is not supplied, the names and values of the shell +options accepted by \fBshopt\fP are printed on the standard output. +If the invocation option is \fB+O\fP, the output is displayed in a format +that may be reused as input. +.TP +.B \-\- +A +.B \-\- +signals the end of options and disables further option processing. +Any arguments after the +.B \-\- +are treated as filenames and arguments. An argument of +.B \- +is equivalent to \fB\-\-\fP. +.PD +.PP +.B Bash +also interprets a number of multi-character options. +These options must appear on the command line before the +single-character options to be recognized. +.PP +.PD 0 +.TP +.B \-\-dump\-po\-strings +Equivalent to \fB\-D\fP, but the output is in the GNU \fIgettext\fP +\fBpo\fP (portable object) file format. +.TP +.B \-\-dump\-strings +Equivalent to \fB\-D\fP. +.TP +.B \-\-help +Display a usage message on standard output and exit successfully. +.TP +\fB\-\-init\-file\fP \fIfile\fP +.PD 0 +.TP +\fB\-\-rcfile\fP \fIfile\fP +.PD +Execute commands from +.I file +instead of the standard personal initialization file +.I ~/.bashrc +if the shell is interactive (see +.SM +.B INVOCATION +below). +.TP +.B \-\-login +Equivalent to \fB\-l\fP. +.TP +.B \-\-noediting +Do not use the GNU +.B readline +library to read command lines when the shell is interactive. +.TP +.B \-\-noprofile +Do not read either the system-wide startup file +.FN /etc/profile +or any of the personal initialization files +.IR ~/.bash_profile , +.IR ~/.bash_login , +or +.IR ~/.profile . +By default, +.B bash +reads these files when it is invoked as a login shell (see +.SM +.B INVOCATION +below). +.TP +.B \-\-norc +Do not read and execute the personal initialization file +.I ~/.bashrc +if the shell is interactive. +This option is on by default if the shell is invoked as +.BR sh . +.TP +.B \-\-posix +Change the behavior of \fBbash\fP where the default operation differs +from the POSIX 1003.2 standard to match the standard (\fIposix mode\fP). +.TP +.B \-\-restricted +The shell becomes restricted (see +.SM +.B "RESTRICTED SHELL" +below). +.TP +.B \-\-rpm-requires +Produce the list of files that are required for the +shell script to run. This implies '-n' and is subject +to the same limitations as compile time error checking checking; +Backticks, [] tests, and evals are not parsed so some +dependencies may be missed. +.B \-\-verbose +Equivalent to \fB\-v\fP. +.TP +.B \-\-version +Show version information for this instance of +.B bash +on the standard output and exit successfully. +.PD +.SH ARGUMENTS +If arguments remain after option processing, and neither the +.B \-c +nor the +.B \-s +option has been supplied, the first argument is assumed to +be the name of a file containing shell commands. +If +.B bash +is invoked in this fashion, +.B $0 +is set to the name of the file, and the positional parameters +are set to the remaining arguments. +.B Bash +reads and executes commands from this file, then exits. +\fBBash\fP's exit status is the exit status of the last command +executed in the script. +If no commands are executed, the exit status is 0. +An attempt is first made to open the file in the current directory, and, +if no file is found, then the shell searches the directories in +.SM +.B PATH +for the script. +.SH INVOCATION +A \fIlogin shell\fP is one whose first character of argument zero is a +.BR \- , +or one started with the +.B \-\-login +option. +.PP +An \fIinteractive\fP shell is one started without non-option arguments +and without the +.B \-c +option +whose standard input and output are +both connected to terminals (as determined by +.IR isatty (3)), +or one started with the +.B \-i +option. +.SM +.B PS1 +is set and +.B $\- +includes +.B i +if +.B bash +is interactive, +allowing a shell script or a startup file to test this state. +.PP +The following paragraphs describe how +.B bash +executes its startup files. +If any of the files exist but cannot be read, +.B bash +reports an error. +Tildes are expanded in file names as described below under +.B "Tilde Expansion" +in the +.SM +.B EXPANSION +section. +.PP +When +.B bash +is invoked as an interactive login shell, or as a non-interactive shell +with the \fB\-\-login\fP option, it first reads and +executes commands from the file \fI/etc/profile\fP, if that +file exists. +After reading that file, it looks for \fI~/.bash_profile\fP, +\fI~/.bash_login\fP, and \fI~/.profile\fP, in that order, and reads +and executes commands from the first one that exists and is readable. +The +.B \-\-noprofile +option may be used when the shell is started to inhibit this behavior. +.PP +When a login shell exits, +.B bash +reads and executes commands from the file \fI~/.bash_logout\fP, if it +exists. +.PP +When an interactive shell that is not a login shell is started, +.B bash +reads and executes commands from \fI~/.bashrc\fP, if that file exists. +This may be inhibited by using the +.B \-\-norc +option. +The \fB\-\-rcfile\fP \fIfile\fP option will force +.B bash +to read and execute commands from \fIfile\fP instead of \fI~/.bashrc\fP. +.PP +When +.B bash +is started non-interactively, to run a shell script, for example, it +looks for the variable +.SM +.B BASH_ENV +in the environment, expands its value if it appears there, and uses the +expanded value as the name of a file to read and execute. +.B Bash +behaves as if the following command were executed: +.sp .5 +.RS +.if t \f(CWif [ \-n "$BASH_ENV" ]; then . "$BASH_ENV"; fi\fP +.if n if [ \-n "$BASH_ENV" ]; then . "$BASH_ENV"; fi +.RE +.sp .5 +but the value of the +.SM +.B PATH +variable is not used to search for the file name. +.PP +If +.B bash +is invoked with the name +.BR sh , +it tries to mimic the startup behavior of historical versions of +.B sh +as closely as possible, +while conforming to the POSIX standard as well. +When invoked as an interactive login shell, or a non-interactive +shell with the \fB\-\-login\fP option, it first attempts to +read and execute commands from +.I /etc/profile +and +.IR ~/.profile , +in that order. +The +.B \-\-noprofile +option may be used to inhibit this behavior. +When invoked as an interactive shell with the name +.BR sh , +.B bash +looks for the variable +.SM +.BR ENV , +expands its value if it is defined, and uses the +expanded value as the name of a file to read and execute. +Since a shell invoked as +.B sh +does not attempt to read and execute commands from any other startup +files, the +.B \-\-rcfile +option has no effect. +A non-interactive shell invoked with the name +.B sh +does not attempt to read any other startup files. +When invoked as +.BR sh , +.B bash +enters +.I posix +mode after the startup files are read. +.PP +When +.B bash +is started in +.I posix +mode, as with the +.B \-\-posix +command line option, it follows the POSIX standard for startup files. +In this mode, interactive shells expand the +.SM +.B ENV +variable and commands are read and executed from the file +whose name is the expanded value. +No other startup files are read. +.PP +.B Bash +attempts to determine when it is being run by the remote shell +daemon, usually \fIrshd\fP. +If +.B bash +determines it is being run by \fIrshd\fP, it reads and executes +commands from \fI~/.bashrc\fP, if that file exists and is readable. +It will not do this if invoked as \fBsh\fP. +The +.B \-\-norc +option may be used to inhibit this behavior, and the +.B \-\-rcfile +option may be used to force another file to be read, but +\fIrshd\fP does not generally invoke the shell with those options +or allow them to be specified. +.PP +If the shell is started with the effective user (group) id not equal to the +real user (group) id, and the \fB\-p\fP option is not supplied, no startup +files are read, shell functions are not inherited from the environment, the +.SM +.B SHELLOPTS +variable, if it appears in the environment, is ignored, +and the effective user id is set to the real user id. +If the \fB\-p\fP option is supplied at invocation, the startup behavior is +the same, but the effective user id is not reset. +.SH DEFINITIONS +.PP +The following definitions are used throughout the rest of this +document. +.PD 0 +.TP +.B blank +A space or tab. +.TP +.B word +A sequence of characters considered as a single unit by the shell. +Also known as a +.BR token . +.TP +.B name +A +.I word +consisting only of alphanumeric characters and underscores, and +beginning with an alphabetic character or an underscore. Also +referred to as an +.BR identifier . +.TP +.B metacharacter +A character that, when unquoted, separates words. One of the following: +.br +.RS +.PP +.if t \fB| & ; ( ) < > space tab\fP +.if n \fB| & ; ( ) < > space tab\fP +.RE +.PP +.TP +.B control operator +A \fItoken\fP that performs a control function. It is one of the following +symbols: +.RS +.PP +.if t \fB\(bv\(bv & && ; ;; ( ) | \fP +.if n \fB|| & && ; ;; ( ) | \fP +.RE +.PD +.SH "RESERVED WORDS" +\fIReserved words\fP are words that have a special meaning to the shell. +The following words are recognized as reserved when unquoted and either +the first word of a simple command (see +.SM +.B SHELL GRAMMAR +below) or the third word of a +.B case +or +.B for +command: +.if t .RS +.PP +.B +.if n ! case do done elif else esac fi for function if in select then until while { } time [[ ]] +.if t ! case do done elif else esac fi for function if in select then until while { } time [[ ]] +.if t .RE +.RE +.SH "SHELL GRAMMAR" +.SS Simple Commands +.PP +A \fIsimple command\fP is a sequence of optional variable assignments +followed by \fBblank\fP-separated words and redirections, and +terminated by a \fIcontrol operator\fP. The first word +specifies the command to be executed, and is passed as argument zero. +The remaining words are passed as arguments to the invoked command. +.PP +The return value of a \fIsimple command\fP is its exit status, or +128+\fIn\^\fP if the command is terminated by signal +.IR n . +.SS Pipelines +.PP +A \fIpipeline\fP is a sequence of one or more commands separated by +the character +.BR | . +The format for a pipeline is: +.RS +.PP +[\fBtime\fP [\fB\-p\fP]] [ ! ] \fIcommand\fP [ \fB|\fP \fIcommand2\fP ... ] +.RE +.PP +The standard output of +.I command +is connected via a pipe to the standard input of +.IR command2 . +This connection is performed before any redirections specified by the +command (see +.SM +.B REDIRECTION +below). +.PP +If the reserved word +.B ! +precedes a pipeline, the exit status of that +pipeline is the logical NOT of the exit status of the last command. +Otherwise, the status of the pipeline is the exit status of the last +command. +The shell waits for all commands in the pipeline to +terminate before returning a value. +.PP +If the +.B time +reserved word precedes a pipeline, the elapsed as well as user and +system time consumed by its execution are reported when the pipeline +terminates. +The \fB\-p\fP option changes the output format to that specified by POSIX. +The +.SM +.B TIMEFORMAT +variable may be set to a format string that specifies how the timing +information should be displayed; see the description of +.SM +.B TIMEFORMAT +under +.B "Shell Variables" +below. +.PP +Each command in a pipeline is executed as a separate process (i.e., in a +subshell). +.SS Lists +.PP +A \fIlist\fP is a sequence of one or more pipelines separated by one +of the operators +.BR ; , +.BR & , +.BR && , +or +.BR \(bv\(bv , +and optionally terminated by one of +.BR ; , +.BR & , +or +.BR . +.PP +Of these list operators, +.B && +and +.B \(bv\(bv +have equal precedence, followed by +.B ; +and +.BR &, +which have equal precedence. +.PP +A sequence of one or more newlines may appear in a \fIlist\fP instead +of a semicolon to delimit commands. +.PP +If a command is terminated by the control operator +.BR & , +the shell executes the command in the \fIbackground\fP +in a subshell. The shell does not wait for the command to +finish, and the return status is 0. Commands separated by a +.B ; +are executed sequentially; the shell waits for each +command to terminate in turn. The return status is the +exit status of the last command executed. +.PP +The control operators +.B && +and +.B \(bv\(bv +denote AND lists and OR lists, respectively. +An AND list has the form +.RS +.PP +\fIcommand1\fP \fB&&\fP \fIcommand2\fP +.RE +.PP +.I command2 +is executed if, and only if, +.I command1 +returns an exit status of zero. +.PP +An OR list has the form +.RS +.PP +\fIcommand1\fP \fB\(bv\(bv\fP \fIcommand2\fP +.PP +.RE +.PP +.I command2 +is executed if and only if +.I command1 +returns a non-zero exit status. The return status of +AND and OR lists is the exit status of the last command +executed in the list. +.SS Compound Commands +.PP +A \fIcompound command\fP is one of the following: +.TP +(\fIlist\fP) +\fIlist\fP is executed in a subshell. Variable assignments and builtin +commands that affect the shell's environment do not remain in effect +after the command completes. The return status is the exit status of +\fIlist\fP. +.TP +{ \fIlist\fP; } +\fIlist\fP is simply executed in the current shell environment. +\fIlist\fP must be terminated with a newline or semicolon. +This is known as a \fIgroup command\fP. +The return status is the exit status of +\fIlist\fP. +Note that unlike the metacharacters \fB(\fP and \fB\)\fP, \fB{\fP and +\fB}\fP are \fIreserved words\fP and must occur where a reserved +word is permitted to be recognized. Since they do not cause a word +break, they must be separated from \fIlist\fP by whitespace. +.TP +((\fIexpression\fP)) +The \fIexpression\fP is evaluated according to the rules described +below under +.SM +.BR "ARITHMETIC EVALUATION" . +If the value of the expression is non-zero, the return status is 0; +otherwise the return status is 1. This is exactly equivalent to +\fBlet "\fIexpression\fP"\fR. +.TP +\fB[[\fP \fIexpression\fP \fB]]\fP +Return a status of 0 or 1 depending on the evaluation of +the conditional expression \fIexpression\fP. +Expressions are composed of the primaries described below under +.SM +.BR "CONDITIONAL EXPRESSIONS" . +Word splitting and pathname expansion are not performed on the words +between the \fB[[\fP and \fB]]\fP; tilde expansion, parameter and +variable expansion, arithmetic expansion, command substitution, process +substitution, and quote removal are performed. +.if t .sp 0.5 +.if n .sp 1 +When the \fB==\fP and \fB!=\fP operators are used, the string to the +right of the operator is considered a pattern and matched according +to the rules described below under \fBPattern Matching\fP. +The return value is 0 if the string matches or does not match +the pattern, respectively, and 1 otherwise. +Any part of the pattern may be quoted to force it to be matched as a +string. +.if t .sp 0.5 +.if n .sp 1 +Expressions may be combined using the following operators, listed +in decreasing order of precedence: +.if t .sp 0.5 +.if n .sp 1 +.RS +.PD 0 +.TP +.B ( \fIexpression\fP ) +Returns the value of \fIexpression\fP. +This may be used to override the normal precedence of operators. +.TP +.B ! \fIexpression\fP +True if +.I expression +is false. +.TP +\fIexpression1\fP \fB&&\fP \fIexpression2\fP +True if both +.I expression1 +and +.I expression2 +are true. +.TP +.if t \fIexpression1\fP \fB\(bv\(bv\fP \fIexpression2\fP +.if n \fIexpression1\fP \fB||\fP \fIexpression2\fP +True if either +.I expression1 +or +.I expression2 +is true. +.PD +.LP +The \fB&&\fP and +.if t \fB\(bv\(bv\fP +.if n \fB||\fP +operators do not evaluate \fIexpression2\fP if the value of +\fIexpression1\fP is sufficient to determine the return value of +the entire conditional expression. +.RE +.TP +\fBfor\fP \fIname\fP [ \fBin\fP \fIword\fP ] ; \fBdo\fP \fIlist\fP ; \fBdone\fP +The list of words following \fBin\fP is expanded, generating a list +of items. +The variable \fIname\fP is set to each element of this list +in turn, and \fIlist\fP is executed each time. +If the \fBin\fP \fIword\fP is omitted, the \fBfor\fP command executes +\fIlist\fP once for each positional parameter that is set (see +.SM +.B PARAMETERS +below). +The return status is the exit status of the last command that executes. +If the expansion of the items following \fBin\fP results in an empty +list, no commands are executed, and the return status is 0. +.TP +\fBfor\fP (( \fIexpr1\fP ; \fIexpr2\fP ; \fIexpr3\fP )) ; \fBdo\fP \fIlist\fP ; \fBdone\fP +First, the arithmetic expression \fIexpr1\fP is evaluated according +to the rules described below under +.SM +.BR "ARITHMETIC EVALUATION" . +The arithmetic expression \fIexpr2\fP is then evaluated repeatedly +until it evaluates to zero. +Each time \fIexpr2\fP evaluates to a non-zero value, \fIlist\fP is +executed and the arithmetic expression \fIexpr3\fP is evaluated. +If any expression is omitted, it behaves as if it evaluates to 1. +The return value is the exit status of the last command in \fIlist\fP +that is executed, or false if any of the expressions is invalid. +.TP +\fBselect\fP \fIname\fP [ \fBin\fP \fIword\fP ] ; \fBdo\fP \fIlist\fP ; \fBdone\fP +The list of words following \fBin\fP is expanded, generating a list +of items. The set of expanded words is printed on the standard +error, each preceded by a number. If the \fBin\fP +\fIword\fP is omitted, the positional parameters are printed (see +.SM +.B PARAMETERS +below). The +.B PS3 +prompt is then displayed and a line read from the standard input. +If the line consists of a number corresponding to one of +the displayed words, then the value of +.I name +is set to that word. If the line is empty, the words and prompt +are displayed again. If EOF is read, the command completes. Any +other value read causes +.I name +to be set to null. The line read is saved in the variable +.BR REPLY . +The +.I list +is executed after each selection until a +.B break +command is executed. +The exit status of +.B select +is the exit status of the last command executed in +.IR list , +or zero if no commands were executed. +.TP +\fBcase\fP \fIword\fP \fBin\fP [ [(] \fIpattern\fP [ \fB|\fP \fIpattern\fP ] \ +... ) \fIlist\fP ;; ] ... \fBesac\fP +A \fBcase\fP command first expands \fIword\fP, and tries to match +it against each \fIpattern\fP in turn, using the same matching rules +as for pathname expansion (see +.B Pathname Expansion +below). When a match is found, the +corresponding \fIlist\fP is executed. After the first match, no +subsequent matches are attempted. The exit status is zero if no +pattern matches. Otherwise, it is the exit status of the +last command executed in \fIlist\fP. +.TP +\fBif\fP \fIlist\fP; \fBthen\fP \fIlist;\fP \ +[ \fBelif\fP \fIlist\fP; \fBthen\fP \fIlist\fP; ] ... \ +[ \fBelse\fP \fIlist\fP; ] \fBfi\fP +The +.B if +.I list +is executed. If its exit status is zero, the +\fBthen\fP \fIlist\fP is executed. Otherwise, each \fBelif\fP +\fIlist\fP is executed in turn, and if its exit status is zero, +the corresponding \fBthen\fP \fIlist\fP is executed and the +command completes. Otherwise, the \fBelse\fP \fIlist\fP is +executed, if present. The exit status is the exit status of the +last command executed, or zero if no condition tested true. +.TP +\fBwhile\fP \fIlist\fP; \fBdo\fP \fIlist\fP; \fBdone\fP +.PD 0 +.TP +\fBuntil\fP \fIlist\fP; \fBdo\fP \fIlist\fP; \fBdone\fP +.PD +The \fBwhile\fP command continuously executes the \fBdo\fP +\fIlist\fP as long as the last command in \fIlist\fP returns +an exit status of zero. The \fBuntil\fP command is identical +to the \fBwhile\fP command, except that the test is negated; +the +.B do +.I list +is executed as long as the last command in +.I list +returns a non-zero exit status. +The exit status of the \fBwhile\fP and \fBuntil\fP commands +is the exit status +of the last \fBdo\fP \fIlist\fP command executed, or zero if +none was executed. +.TP +[ \fBfunction\fP ] \fIname\fP () { \fIlist\fP; } +This defines a function named \fIname\fP. The \fIbody\fP of the +function is the +.I list +of commands between { and }. This list +is executed whenever \fIname\fP is specified as the +name of a simple command. The exit status of a function is +the exit status of the last command executed in the body. (See +.SM +.B FUNCTIONS +below.) +.SH COMMENTS +In a non-interactive shell, or an interactive shell in which the +.B interactive_comments +option to the +.B shopt +builtin is enabled (see +.SM +.B "SHELL BUILTIN COMMANDS" +below), a word beginning with +.B # +causes that word and all remaining characters on that line to +be ignored. An interactive shell without the +.B interactive_comments +option enabled does not allow comments. The +.B interactive_comments +option is on by default in interactive shells. +.SH QUOTING +\fIQuoting\fP is used to remove the special meaning of certain +characters or words to the shell. Quoting can be used to +disable special treatment for special characters, to prevent +reserved words from being recognized as such, and to prevent +parameter expansion. +.PP +Each of the \fImetacharacters\fP listed above under +.SM +.B DEFINITIONS +has special meaning to the shell and must be quoted if it is to +represent itself. +.PP +When the command history expansion facilities are being used, the +\fIhistory expansion\fP character, usually \fB!\fP, must be quoted +to prevent history expansion. +.PP +There are three quoting mechanisms: the +.IR "escape character" , +single quotes, and double quotes. +.PP +A non-quoted backslash (\fB\e\fP) is the +.IR "escape character" . +It preserves the literal value of the next character that follows, +with the exception of . If a \fB\e\fP pair +appears, and the backslash is not itself quoted, the \fB\e\fP +is treated as a line continuation (that is, it is removed from the +input stream and effectively ignored). +.PP +Enclosing characters in single quotes preserves the literal value +of each character within the quotes. A single quote may not occur +between single quotes, even when preceded by a backslash. +.PP +Enclosing characters in double quotes preserves the literal value +of all characters within the quotes, with the exception of +.BR $ , +.BR ` , +and +.BR \e . +The characters +.B $ +and +.B ` +retain their special meaning within double quotes. The backslash +retains its special meaning only when followed by one of the following +characters: +.BR $ , +.BR ` , +\^\fB"\fP\^, +.BR \e , +or +.BR . +A double quote may be quoted within double quotes by preceding it with +a backslash. +.PP +The special parameters +.B * +and +.B @ +have special meaning when in double +quotes (see +.SM +.B PARAMETERS +below). +.PP +Words of the form \fB$\fP'\fIstring\fP' are treated specially. The +word expands to \fIstring\fP, with backslash-escaped characters replaced +as specifed by the ANSI C standard. Backslash escape sequences, if +present, are decoded as follows: +.RS +.PD 0 +.TP +.B \ea +alert (bell) +.TP +.B \eb +backspace +.TP +.B \ee +an escape character +.TP +.B \ef +form feed +.TP +.B \en +new line +.TP +.B \er +carriage return +.TP +.B \et +horizontal tab +.TP +.B \ev +vertical tab +.TP +.B \e\e +backslash +.TP +.B \e' +single quote +.TP +.B \e\fInnn\fP +the eight-bit character whose value is the octal value \fInnn\fP +(one to three digits) +.TP +.B \ex\fIHH\fP +the eight-bit character whose value is the hexadecimal value \fIHH\fP +(one or two hex digits) +.TP +.B \ec\fIx\fP +a control-\fIx\fP character +.PD +.RE +.LP +The expanded result is single-quoted, as if the dollar sign had +not been present. +.PP +A double-quoted string preceded by a dollar sign (\fB$\fP) will cause +the string to be translated according to the current locale. +If the current locale is \fBC\fP or \fBPOSIX\fP, the dollar sign +is ignored. +If the string is translated and replaced, the replacement is +double-quoted. +.SH PARAMETERS +A +.I parameter +is an entity that stores values. +It can be a +.IR name , +a number, or one of the special characters listed below under +.BR "Special Parameters" . +For the shell's purposes, a +.I variable +is a parameter denoted by a +.IR name . +A variable has a \fIvalue\fP and zero or more \fIattributes\fP. +Attributes are assigned using the +.B declare +builtin command (see +.B declare +below in +.SM +.BR "SHELL BUILTIN COMMANDS" ). +.PP +A parameter is set if it has been assigned a value. The null string is +a valid value. Once a variable is set, it may be unset only by using +the +.B unset +builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.PP +A +.I variable +may be assigned to by a statement of the form +.RS +.PP +\fIname\fP=[\fIvalue\fP] +.RE +.PP +If +.I value +is not given, the variable is assigned the null string. All +.I values +undergo tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote +removal (see +.SM +.B EXPANSION +below). If the variable has its +.B integer +attribute set, then +.I value +is subject to arithmetic expansion even if the $((...)) expansion is +not used (see +.B "Arithmetic Expansion" +below). +Word splitting is not performed, with the exception +of \fB"$@"\fP as explained below under +.BR "Special Parameters" . +Pathname expansion is not performed. +Assignment statements may also appear as arguments to the +.BR declare , +.BR typeset , +.BR export , +.BR readonly , +and +.B local +builtin commands. +.SS Positional Parameters +.PP +A +.I positional parameter +is a parameter denoted by one or more +digits, other than the single digit 0. Positional parameters are +assigned from the shell's arguments when it is invoked, +and may be reassigned using the +.B set +builtin command. Positional parameters may not be assigned to +with assignment statements. The positional parameters are +temporarily replaced when a shell function is executed (see +.SM +.B FUNCTIONS +below). +.PP +When a positional parameter consisting of more than a single +digit is expanded, it must be enclosed in braces (see +.SM +.B EXPANSION +below). +.SS Special Parameters +.PP +The shell treats several parameters specially. These parameters may +only be referenced; assignment to them is not allowed. +.PD 0 +.TP +.B * +Expands to the positional parameters, starting from one. When the +expansion occurs within double quotes, it expands to a single word +with the value of each parameter separated by the first character +of the +.SM +.B IFS +special variable. That is, "\fB$*\fP" is equivalent +to "\fB$1\fP\fIc\fP\fB$2\fP\fIc\fP\fB...\fP", where +.I c +is the first character of the value of the +.SM +.B IFS +variable. If +.SM +.B IFS +is unset, the parameters are separated by spaces. +If +.SM +.B IFS +is null, the parameters are joined without intervening separators. +.TP +.B @ +Expands to the positional parameters, starting from one. When the +expansion occurs within double quotes, each parameter expands to a +separate word. That is, "\fB$@\fP" is equivalent to +"\fB$1\fP" "\fB$2\fP" ... +When there are no positional parameters, "\fB$@\fP" and +.B $@ +expand to nothing (i.e., they are removed). +.TP +.B # +Expands to the number of positional parameters in decimal. +.TP +.B ? +Expands to the status of the most recently executed foreground +pipeline. +.TP +.B \- +Expands to the current option flags as specified upon invocation, +by the +.B set +builtin command, or those set by the shell itself +(such as the +.B \-i +option). +.TP +.B $ +Expands to the process ID of the shell. In a () subshell, it +expands to the process ID of the current shell, not the +subshell. +.TP +.B ! +Expands to the process ID of the most recently executed background +(asynchronous) command. +.TP +.B 0 +Expands to the name of the shell or shell script. This is set at +shell initialization. If +.B bash +is invoked with a file of commands, +.B $0 +is set to the name of that file. If +.B bash +is started with the +.B \-c +option, then +.B $0 +is set to the first argument after the string to be +executed, if one is present. Otherwise, it is set +to the file name used to invoke +.BR bash , +as given by argument zero. +.TP +.B _ +At shell startup, set to the absolute file name of the shell or shell +script being executed as passed in the argument list. +Subsequently, expands to the last argument to the previous command, +after expansion. +Also set to the full file name of each command executed and placed in +the environment exported to that command. +When checking mail, this parameter holds the name of the mail file +currently being checked. +.PD +.SS Shell Variables +.PP +The following variables are set by the shell: +.PP +.PD 0 +.TP +.B BASH +Expands to the full file name used to invoke this instance of +.BR bash . +.TP +.B BASH_VERSINFO +A readonly array variable whose members hold version information for +this instance of +.BR bash . +The values assigned to the array members are as follows: +.sp .5 +.RS +.PD 0 +.TP 24 +.B BASH_VERSINFO[\fR0\fP] +The major version number (the \fIrelease\fP). +.TP +.B BASH_VERSINFO[\fR1\fP] +The minor version number (the \fIversion\fP). +.TP +.B BASH_VERSINFO[\fR2\fP] +The patch level. +.TP +.B BASH_VERSINFO[\fR3\fP] +The build version. +.TP +.B BASH_VERSINFO[\fR4\fP] +The release status (e.g., \fIbeta1\fP). +.TP +.B BASH_VERSINFO[\fR5\fP] +The value of \fBMACHTYPE\fP. +.PD +.RE +.TP +.B BASH_VERSION +Expands to a string describing the version of this instance of +.BR bash . +.TP +.B COMP_CWORD +An index into \fB${COMP_WORDS}\fP of the word containing the current +cursor position. +This variable is available only in shell functions invoked by the +programmable completion facilities (see \fBProgrammable Completion\fP +below). +.TP +.B COMP_LINE +The current command line. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (see \fBProgrammable Completion\fP +below). +.TP +.B COMP_POINT +The index of the current cursor position relative to the beginning of +the current command. +If the current cursor position is at the end of the current command, +the value of this variable is equal to \fB${#COMP_LINE}\fP. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (see \fBProgrammable Completion\fP +below). +.TP +.B COMP_WORDS +An array variable (see \fBArrays\fP below) consisting of the individual +words in the current command line. +This variable is available only in shell functions invoked by the +programmable completion facilities (see \fBProgrammable Completion\fP +below). +.TP +.B DIRSTACK +An array variable (see +.B Arrays +below) containing the current contents of the directory stack. +Directories appear in the stack in the order they are displayed by the +.B dirs +builtin. +Assigning to members of this array variable may be used to modify +directories already in the stack, but the +.B pushd +and +.B popd +builtins must be used to add and remove directories. +Assignment to this variable will not change the current directory. +If +.SM +.B DIRSTACK +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B EUID +Expands to the effective user ID of the current user, initialized at +shell startup. This variable is readonly. +.TP +.B FUNCNAME +The name of any currently-executing shell function. +This variable exists only when a shell function is executing. +Assignments to +.SM +.B FUNCNAME +have no effect and return an error status. +If +.SM +.B FUNCNAME +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B GROUPS +An array variable containing the list of groups of which the current +user is a member. +Assignments to +.SM +.B GROUPS +have no effect and return an error status. +If +.SM +.B GROUPS +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B HISTCMD +The history number, or index in the history list, of the current +command. +If +.SM +.B HISTCMD +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B HOSTNAME +Automatically set to the name of the current host. +.TP +.B HOSTTYPE +Automatically set to a string that uniquely +describes the type of machine on which +.B bash +is executing. +The default is system-dependent. +.TP +.B LINENO +Each time this parameter is referenced, the shell substitutes +a decimal number representing the current sequential line number +(starting with 1) within a script or function. When not in a +script or function, the value substituted is not guaranteed to +be meaningful. +If +.SM +.B LINENO +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B MACHTYPE +Automatically set to a string that fully describes the system +type on which +.B bash +is executing, in the standard GNU \fIcpu-company-system\fP format. +The default is system-dependent. +.TP +.B OLDPWD +The previous working directory as set by the +.B cd +command. +.TP +.B OPTARG +The value of the last option argument processed by the +.B getopts +builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.TP +.B OPTIND +The index of the next argument to be processed by the +.B getopts +builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.TP +.B OSTYPE +Automatically set to a string that +describes the operating system on which +.B bash +is executing. +The default is system-dependent. +.TP +.B PIPESTATUS +An array variable (see +.B Arrays +below) containing a list of exit status values from the processes +in the most-recently-executed foreground pipeline (which may +contain only a single command). +.TP +.B PPID +The process ID of the shell's parent. This variable is readonly. +.TP +.B PWD +The current working directory as set by the +.B cd +command. +.TP +.B RANDOM +Each time this parameter is referenced, a random integer between +0 and 32767 is +generated. The sequence of random numbers may be initialized by assigning +a value to +.SM +.BR RANDOM . +If +.SM +.B RANDOM +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B REPLY +Set to the line of input read by the +.B read +builtin command when no arguments are supplied. +.TP +.B SECONDS +Each time this parameter is +referenced, the number of seconds since shell invocation is returned. If a +value is assigned to +.SM +.BR SECONDS , +the value returned upon subsequent +references is +the number of seconds since the assignment plus the value assigned. +If +.SM +.B SECONDS +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B SHELLOPTS +A colon-separated list of enabled shell options. Each word in +the list is a valid argument for the +.B \-o +option to the +.B set +builtin command (see +.SM +.B "SHELL BUILTIN COMMANDS" +below). The options appearing in +.SM +.B SHELLOPTS +are those reported as +.I on +by \fBset \-o\fP. +If this variable is in the environment when +.B bash +starts up, each shell option in the list will be enabled before +reading any startup files. +This variable is read-only. +.TP +.B SHLVL +Incremented by one each time an instance of +.B bash +is started. +.TP +.B UID +Expands to the user ID of the current user, initialized at shell startup. +This variable is readonly. +.PD +.PP +The following variables are used by the shell. In some cases, +.B bash +assigns a default value to a variable; these cases are noted +below. +.PP +.PD 0 +.TP +.B BASH_ENV +If this parameter is set when \fBbash\fP is executing a shell script, +its value is interpreted as a filename containing commands to +initialize the shell, as in +.IR ~/.bashrc . +The value of +.SM +.B BASH_ENV +is subjected to parameter expansion, command substitution, and arithmetic +expansion before being interpreted as a file name. +.SM +.B PATH +is not used to search for the resultant file name. +.TP +.B CDPATH +The search path for the +.B cd +command. +This is a colon-separated list of directories in which the shell looks +for destination directories specified by the +.B cd +command. +A sample value is +.if t \f(CW".:~:/usr"\fP. +.if n ".:~:/usr". +.TP +.B COLUMNS +Used by the \fBselect\fP builtin command to determine the terminal width +when printing selection lists. Automatically set upon receipt of a SIGWINCH. +.TP +.B COMPREPLY +An array variable from which \fBbash\fP reads the possible completions +generated by a shell function invoked by the programmable completion +facility (see \fBProgrammable Completion\fP below). +.TP +.B FCEDIT +The default editor for the +.B fc +builtin command. +.TP +.B FIGNORE +A colon-separated list of suffixes to ignore when performing +filename completion (see +.SM +.B READLINE +below). +A filename whose suffix matches one of the entries in +.SM +.B FIGNORE +is excluded from the list of matched filenames. +A sample value is +.if t \f(CW".o:~"\fP. +.if n ".o:~". +.TP +.B GLOBIGNORE +A colon-separated list of patterns defining the set of filenames to +be ignored by pathname expansion. +If a filename matched by a pathname expansion pattern also matches one +of the patterns in +.SM +.BR GLOBIGNORE , +it is removed from the list of matches. +.TP +.B HISTCONTROL +If set to a value of +.IR ignorespace , +lines which begin with a +.B space +character are not entered on the history list. +If set to a value of +.IR ignoredups , +lines matching the last history line are not entered. +A value of +.I ignoreboth +combines the two options. +If unset, or if set to any other value than those above, +all lines read +by the parser are saved on the history list, subject to the value +of +.BR HISTIGNORE . +This variable's function is superseded by +.BR HISTIGNORE . +The second and subsequent lines of a multi-line compound command are +not tested, and are added to the history regardless of the value of +.BR HISTCONTROL . +.TP +.B HISTFILE +The name of the file in which command history is saved (see +.SM +.B HISTORY +below). The default value is \fI~/.bash_history\fP. If unset, the +command history is not saved when an interactive shell exits. +.TP +.B HISTFILESIZE +The maximum number of lines contained in the history file. When this +variable is assigned a value, the history file is truncated, if +necessary, to contain no more than that number of lines. The default +value is 500. The history file is also truncated to this size after +writing it when an interactive shell exits. +.TP +.B HISTIGNORE +A colon-separated list of patterns used to decide which command lines +should be saved on the history list. Each pattern is anchored at the +beginning of the line and must match the complete line (no implicit +`\fB*\fP' is appended). Each pattern is tested against the line +after the checks specified by +.B HISTCONTROL +are applied. +In addition to the normal shell pattern matching characters, `\fB&\fP' +matches the previous history line. `\fB&\fP' may be escaped using a +backslash; the backslash is removed before attempting a match. +The second and subsequent lines of a multi-line compound command are +not tested, and are added to the history regardless of the value of +.BR HISTIGNORE . +.TP +.B HISTSIZE +The number of commands to remember in the command history (see +.SM +.B HISTORY +below). The default value is 500. +.TP +.B HOME +The home directory of the current user; the default argument for the +\fBcd\fP builtin command. +The value of this variable is also used when performing tilde expansion. +.TP +.B HOSTFILE +Contains the name of a file in the same format as +.FN /etc/hosts +that should be read when the shell needs to complete a +hostname. +The list of possible hostname completions may be changed while the +shell is running; +the next time hostname completion is attempted after the +value is changed, +.B bash +adds the contents of the new file to the existing list. +If +.SM +.B HOSTFILE +is set, but has no value, \fBbash\fP attempts to read +.FN /etc/hosts +to obtain the list of possible hostname completions. +When +.SM +.B HOSTFILE +is unset, the hostname list is cleared. +.TP +.B IFS +The +.I Internal Field Separator +that is used +for word splitting after expansion and to +split lines into words with the +.B read +builtin command. The default value is +``''. +.TP +.B IGNOREEOF +Controls the +action of an interactive shell on receipt of an +.SM +.B EOF +character as the sole input. If set, the value is the number of +consecutive +.SM +.B EOF +characters which must be +typed as the first characters on an input line before +.B bash +exits. If the variable exists but does not have a numeric value, or +has no value, the default value is 10. If it does not exist, +.SM +.B EOF +signifies the end of input to the shell. +.TP +.B INPUTRC +The filename for the +.B readline +startup file, overriding the default of +.FN ~/.inputrc +(see +.SM +.B READLINE +below). +.TP +.B LANG +Used to determine the locale category for any category not specifically +selected with a variable starting with \fBLC_\fP. +.TP +.B LC_ALL +This variable overrides the value of \fBLANG\fP and any other +\fBLC_\fP variable specifying a locale category. +.TP +.B LC_COLLATE +This variable determines the collation order used when sorting the +results of pathname expansion, and determines the behavior of range +expressions, equivalence classes, and collating sequences within +pathname expansion and pattern matching. +.TP +.B LC_CTYPE +This variable determines the interpretation of characters and the +behavior of character classes within pathname expansion and pattern +matching. +.TP +.B LC_MESSAGES +This variable determines the locale used to translate double-quoted +strings preceded by a \fB$\fP. +.TP +.B LC_NUMERIC +This variable determines the locale category used for number formatting. +.TP +.B LINES +Used by the \fBselect\fP builtin command to determine the column length +for printing selection lists. Automatically set upon receipt of a SIGWINCH. +.TP +.B MAIL +If this parameter is set to a file name and the +.SM +.B MAILPATH +variable is not set, +.B bash +informs the user of the arrival of mail in the specified file. +.TP +.B MAILCHECK +Specifies how +often (in seconds) +.B bash +checks for mail. The default is 60 seconds. When it is time to check +for mail, the shell does so before displaying the primary prompt. +If this variable is unset, or set to a value that is not a number +greater than or equal to zero, the shell disables mail checking. +.TP +.B MAILPATH +A colon-separated list of file names to be checked for mail. +The message to be printed when mail arrives in a particular file +may be specified by separating the file name from the message with a `?'. +When used in the text of the message, \fB$_\fP expands to the name of +the current mailfile. +Example: +.RS +.PP +\fBMAILPATH\fP='/var/mail/bfox?"You have mail":~/shell\-mail?"$_ has mail!"' +.PP +.B Bash +supplies a default value for this variable, but the location of the user +mail files that it uses is system dependent (e.g., /var/mail/\fB$USER\fP). +.RE +.TP +.B OPTERR +If set to the value 1, +.B bash +displays error messages generated by the +.B getopts +builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.SM +.B OPTERR +is initialized to 1 each time the shell is invoked or a shell +script is executed. +.TP +.B PATH +The search path for commands. It +is a colon-separated list of directories in which +the shell looks for commands (see +.SM +.B COMMAND EXECUTION +below). The default path is system-dependent, +and is set by the administrator who installs +.BR bash . +A common value is +.if t \f(CW/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:.\fP. +.if n ``/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:.''. +.TP +.B POSIXLY_CORRECT +If this variable is in the environment when \fBbash\fP starts, the shell +enters \fIposix mode\fP before reading the startup files, as if the +.B \-\-posix +invocation option had been supplied. If it is set while the shell is +running, \fBbash\fP enables \fIposix mode\fP, as if the command +.if t \f(CWset -o posix\fP +.if n \fIset -o posix\fP +had been executed. +.TP +.B PROMPT_COMMAND +If set, the value is executed as a command prior to issuing each primary +prompt. +.TP +.B PS1 +The value of this parameter is expanded (see +.SM +.B PROMPTING +below) and used as the primary prompt string. The default value is +``\fB\es\-\ev\e$ \fP''. +.TP +.B PS2 +The value of this parameter is expanded as with +.B PS1 +and used as the secondary prompt string. The default is +``\fB> \fP''. +.TP +.B PS3 +The value of this parameter is used as the prompt for the +.B select +command (see +.SM +.B SHELL GRAMMAR +above). +.TP +.B PS4 +The value of this parameter is expanded as with +.B PS1 +and the value is printed before each command +.B bash +displays during an execution trace. The first character of +.SM +.B PS4 +is replicated multiple times, as necessary, to indicate multiple +levels of indirection. The default is ``\fB+ \fP''. +.TP +.B TIMEFORMAT +The value of this parameter is used as a format string specifying +how the timing information for pipelines prefixed with the +.B time +reserved word should be displayed. +The \fB%\fP character introduces an escape sequence that is +expanded to a time value or other information. +The escape sequences and their meanings are as follows; the +braces denote optional portions. +.sp .5 +.RS +.PD 0 +.TP 10 +.B %% +A literal \fB%\fP. +.TP +.B %[\fIp\fP][l]R +The elapsed time in seconds. +.TP +.B %[\fIp\fP][l]U +The number of CPU seconds spent in user mode. +.TP +.B %[\fIp\fP][l]S +The number of CPU seconds spent in system mode. +.TP +.B %P +The CPU percentage, computed as (%U + %S) / %R. +.PD +.RE +.IP +The optional \fIp\fP is a digit specifying the \fIprecision\fP, +the number of fractional digits after a decimal point. +A value of 0 causes no decimal point or fraction to be output. +At most three places after the decimal point may be specified; +values of \fIp\fP greater than 3 are changed to 3. +If \fIp\fP is not specified, the value 3 is used. +.IP +The optional \fBl\fP specifies a longer format, including +minutes, of the form \fIMM\fPm\fISS\fP.\fIFF\fPs. +The value of \fIp\fP determines whether or not the fraction is +included. +.IP +If this variable is not set, \fBbash\fP acts as if it had the +value \fB$'\enreal\et%3lR\enuser\et%3lU\ensys\t%3lS'\fP. +If the value is null, no timing information is displayed. +A trailing newline is added when the format string is displayed. +.TP +.B TMOUT +If set to a value greater than zero, \fBTMOUT\fP is treated as the +default timeout for the \fBread\fP builtin. +The \fBselect\fP command terminates if input does not arrive +after \fBTMOUT\fP seconds when input is coming from a terminal. +In an interactive shell, the value is interpreted as the +number of seconds to wait for input after issuing the primary prompt. +.B Bash +terminates after waiting for that number of seconds if input does +not arrive. +.TP +.B auto_resume +This variable controls how the shell interacts with the user and +job control. If this variable is set, single word simple +commands without redirections are treated as candidates for resumption +of an existing stopped job. There is no ambiguity allowed; if there is +more than one job beginning with the string typed, the job most recently +accessed is selected. The +.I name +of a stopped job, in this context, is the command line used to +start it. +If set to the value +.IR exact , +the string supplied must match the name of a stopped job exactly; +if set to +.IR substring , +the string supplied needs to match a substring of the name of a +stopped job. The +.I substring +value provides functionality analogous to the +.B %? +job identifier (see +.SM +.B JOB CONTROL +below). If set to any other value, the supplied string must +be a prefix of a stopped job's name; this provides functionality +analogous to the +.B % +job identifier. +.TP +.B histchars +The two or three characters which control history expansion +and tokenization (see +.SM +.B HISTORY EXPANSION +below). The first character is the \fIhistory expansion\fP character, +the character which signals the start of a history +expansion, normally `\fB!\fP'. +The second character is the \fIquick substitution\fP +character, which is used as shorthand for re-running the previous +command entered, substituting one string for another in the command. +The default is `\fB^\fP'. +The optional third character is the character +which indicates that the remainder of the line is a comment when found +as the first character of a word, normally `\fB#\fP'. The history +comment character causes history substitution to be skipped for the +remaining words on the line. It does not necessarily cause the shell +parser to treat the rest of the line as a comment. +.PD +.SS Arrays +.B Bash +provides one-dimensional array variables. Any variable may be used as +an array; the +.B declare +builtin will explicitly declare an array. There is no maximum +limit on the size of an array, nor any requirement that members +be indexed or assigned contiguously. Arrays are indexed using +integers and are zero-based. +.PP +An array is created automatically if any variable is assigned to using +the syntax \fIname\fP[\fIsubscript\fP]=\fIvalue\fP. The +.I subscript +is treated as an arithmetic expression that must evaluate to a number +greater than or equal to zero. To explicitly declare an array, use +.B declare \-a \fIname\fP +(see +.SM +.B SHELL BUILTIN COMMANDS +below). +.B declare \-a \fIname\fP[\fIsubscript\fP] +is also accepted; the \fIsubscript\fP is ignored. Attributes may be +specified for an array variable using the +.B declare +and +.B readonly +builtins. Each attribute applies to all members of an array. +.PP +Arrays are assigned to using compound assignments of the form +\fIname\fP=\fB(\fPvalue\fI1\fP ... value\fIn\fP\fB)\fP, where each +\fIvalue\fP is of the form [\fIsubscript\fP]=\fIstring\fP. Only +\fIstring\fP is required. If +the optional brackets and subscript are supplied, that index is assigned to; +otherwise the index of the element assigned is the last index assigned +to by the statement plus one. Indexing starts at zero. +This syntax is also accepted by the +.B declare +builtin. Individual array elements may be assigned to using the +\fIname\fP[\fIsubscript\fP]=\fIvalue\fP syntax introduced above. +.PP +Any element of an array may be referenced using +${\fIname\fP[\fIsubscript\fP]}. The braces are required to avoid +conflicts with pathname expansion. If +\fIsubscript\fP is \fB@\fP or \fB*\fP, the word expands to +all members of \fIname\fP. These subscripts differ only when the +word appears within double quotes. If the word is double-quoted, +${\fIname\fP[*]} expands to a single +word with the value of each array member separated by the first +character of the +.SM +.B IFS +special variable, and ${\fIname\fP[@]} expands each element of +\fIname\fP to a separate word. When there are no array members, +${\fIname\fP[@]} expands to nothing. This is analogous to the expansion +of the special parameters \fB*\fP and \fB@\fP (see +.B Special Parameters +above). ${#\fIname\fP[\fIsubscript\fP]} expands to the length of +${\fIname\fP[\fIsubscript\fP]}. If \fIsubscript\fP is \fB*\fP or +\fB@\fP, the expansion is the number of elements in the array. +Referencing an array variable without a subscript is equivalent to +referencing element zero. +.PP +The +.B unset +builtin is used to destroy arrays. \fBunset\fP \fIname\fP[\fIsubscript\fP] +destroys the array element at index \fIsubscript\fP. +\fBunset\fP \fIname\fP, where \fIname\fP is an array, or +\fBunset\fP \fIname\fP[\fIsubscript\fP], where +\fIsubscript\fP is \fB*\fP or \fB@\fP, removes the entire array. +.PP +The +.BR declare , +.BR local , +and +.B readonly +builtins each accept a +.B \-a +option to specify an array. The +.B read +builtin accepts a +.B \-a +option to assign a list of words read from the standard input +to an array. The +.B set +and +.B declare +builtins display array values in a way that allows them to be +reused as assignments. +.SH EXPANSION +Expansion is performed on the command line after it has been split into +words. There are seven kinds of expansion performed: +.IR "brace expansion" , +.IR "tilde expansion" , +.IR "parameter and variable expansion" , +.IR "command substitution" , +.IR "arithmetic expansion" , +.IR "word splitting" , +and +.IR "pathname expansion" . +.PP +The order of expansions is: brace expansion, tilde expansion, +parameter, variable and arithmetic expansion and +command substitution +(done in a left-to-right fashion), word splitting, and pathname +expansion. +.PP +On systems that can support it, there is an additional expansion +available: \fIprocess substitution\fP. +.PP +Only brace expansion, word splitting, and pathname expansion +can change the number of words of the expansion; other expansions +expand a single word to a single word. +The only exceptions to this are the expansions of +"\fB$@\fP" and "\fB${\fP\fIname\fP\fB[@]}\fP" +as explained above (see +.SM +.BR PARAMETERS ). +.SS Brace Expansion +.PP +.I "Brace expansion" +is a mechanism by which arbitrary strings +may be generated. This mechanism is similar to +\fIpathname expansion\fP, but the filenames generated +need not exist. Patterns to be brace expanded take +the form of an optional +.IR preamble , +followed by a series of comma-separated strings +between a pair of braces, followed by an optional +.IR postscript . +The preamble is prefixed to each string contained +within the braces, and the postscript is then appended +to each resulting string, expanding left to right. +.PP +Brace expansions may be nested. The results of each expanded +string are not sorted; left to right order is preserved. +For example, a\fB{\fPd,c,b\fB}\fPe expands into `ade ace abe'. +.PP +Brace expansion is performed before any other expansions, +and any characters special to other expansions are preserved +in the result. It is strictly textual. +.B Bash +does not apply any syntactic interpretation to the context of the +expansion or the text between the braces. +.PP +A correctly-formed brace expansion must contain unquoted opening +and closing braces, and at least one unquoted comma. +Any incorrectly formed brace expansion is left unchanged. +A \fB{\fP or \fB,\fP may be quoted with a backslash to prevent its +being considered part of a brace expression. +To avoid conflicts with parameter expansion, the string \fB${\fP +is not considered eligible for brace expansion. +.PP +This construct is typically used as shorthand when the common +prefix of the strings to be generated is longer than in the +above example: +.RS +.PP +mkdir /usr/local/src/bash/{old,new,dist,bugs} +.RE +or +.RS +chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}} +.RE +.PP +Brace expansion introduces a slight incompatibility with +historical versions of +.BR sh . +.B sh +does not treat opening or closing braces specially when they +appear as part of a word, and preserves them in the output. +.B Bash +removes braces from words as a consequence of brace +expansion. For example, a word entered to +.B sh +as \fIfile{1,2}\fP +appears identically in the output. The same word is +output as +.I file1 file2 +after expansion by +.BR bash . +If strict compatibility with +.B sh +is desired, start +.B bash +with the +.B +B +option or disable brace expansion with the +.B +B +option to the +.B set +command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.SS Tilde Expansion +.PP +If a word begins with an unquoted tilde character (`\fB~\fP'), all of +the characters preceding the first unquoted slash (or all characters, +if there is no unquoted slash) are considered a \fItilde-prefix\fP. +If none of the characters in the tilde-prefix are quoted, the +characters in the tilde-prefix following the tilde are treated as a +possible \fIlogin name\fP. +If this login name is the null string, the tilde is replaced with the +value of the shell parameter +.SM +.BR HOME . +If +.SM +.B HOME +is unset, the home directory of the user executing the shell is +substituted instead. +Otherwise, the tilde-prefix is replaced with the home directory +associated with the specified login name. +.PP +If the tilde-prefix is a `~+', the value of the shell variable +.SM +.B PWD +replaces the tilde-prefix. +If the tilde-prefix is a `~\-', the value of the shell variable +.SM +.BR OLDPWD , +if it is set, is substituted. +If the characters following the tilde in the tilde-prefix consist +of a number \fIN\fP, optionally prefixed +by a `+' or a `\-', the tilde-prefix is replaced with the corresponding +element from the directory stack, as it would be displayed by the +.B dirs +builtin invoked with the tilde-prefix as an argument. +If the characters following the tilde in the tilde-prefix consist of a +number without a leading `+' or `\-', `+' is assumed. +.PP +If the login name is invalid, or the tilde expansion fails, the word +is unchanged. +.PP +Each variable assignment is checked for unquoted tilde-prefixes immediately +following a +.B : +or +.BR = . +In these cases, tilde expansion is also performed. +Consequently, one may use file names with tildes in assignments to +.SM +.BR PATH , +.SM +.BR MAILPATH , +and +.SM +.BR CDPATH , +and the shell assigns the expanded value. +.SS Parameter Expansion +.PP +The `\fB$\fP' character introduces parameter expansion, +command substitution, or arithmetic expansion. The parameter name +or symbol to be expanded may be enclosed in braces, which +are optional but serve to protect the variable to be expanded from +characters immediately following it which could be +interpreted as part of the name. +.PP +When braces are used, the matching ending brace is the first `\fB}\fP' +not escaped by a backslash or within a quoted string, and not within an +embedded arithmetic expansion, command substitution, or paramter +expansion. +.PP +.PD 0 +.TP +${\fIparameter\fP} +The value of \fIparameter\fP is substituted. The braces are required +when +.I parameter +is a positional parameter with more than one digit, +or when +.I parameter +is followed by a character which is not to be +interpreted as part of its name. +.PD +.PP +If the first character of \fIparameter\fP is an exclamation point, +a level of variable indirection is introduced. +\fBBash\fP uses the value of the variable formed from the rest of +\fIparameter\fP as the name of the variable; this variable is then +expanded and that value is used in the rest of the substitution, rather +than the value of \fIparameter\fP itself. +This is known as \fIindirect expansion\fP. +The exception to this is the expansion of ${!\fIprefix\fP*} +described below. +.PP +In each of the cases below, \fIword\fP is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. +When not performing substring expansion, \fBbash\fP tests for a parameter +that is unset or null; omitting the colon results in a test only for a +parameter that is unset. +.PP +.PD 0 +.TP +${\fIparameter\fP\fB:\-\fP\fIword\fP} +\fBUse Default Values\fP. If +.I parameter +is unset or null, the expansion of +.I word +is substituted. Otherwise, the value of +.I parameter +is substituted. +.TP +${\fIparameter\fP\fB:=\fP\fIword\fP} +\fBAssign Default Values\fP. +If +.I parameter +is unset or null, the expansion of +.I word +is assigned to +.IR parameter . +The value of +.I parameter +is then substituted. Positional parameters and special parameters may +not be assigned to in this way. +.TP +${\fIparameter\fP\fB:?\fP\fIword\fP} +\fBDisplay Error if Null or Unset\fP. +If +.I parameter +is null or unset, the expansion of \fIword\fP (or a message to that effect +if +.I word +is not present) is written to the standard error and the shell, if it +is not interactive, exits. Otherwise, the value of \fIparameter\fP is +substituted. +.TP +${\fIparameter\fP\fB:+\fP\fIword\fP} +\fBUse Alternate Value\fP. +If +.I parameter +is null or unset, nothing is substituted, otherwise the expansion of +.I word +is substituted. +.TP +${\fIparameter\fP\fB:\fP\fIoffset\fP} +.PD 0 +.TP +${\fIparameter\fP\fB:\fP\fIoffset\fP\fB:\fP\fIlength\fP} +.PD +\fBSubstring Expansion.\fP +Expands to up to \fIlength\fP characters of \fIparameter\fP +starting at the character specified by \fIoffset\fP. +If \fIlength\fP is omitted, expands to the substring of +\fIparameter\fP starting at the character specified by \fIoffset\fP. +\fIlength\fP and \fIoffset\fP are arithmetic expressions (see +.SM +.B +ARITHMETIC EVALUATION +below). +\fIlength\fP must evaluate to a number greater than or equal to zero. +If \fIoffset\fP evaluates to a number less than zero, the value +is used as an offset from the end of the value of \fIparameter\fP. +If \fIparameter\fP is \fB@\fP, the result is \fIlength\fP positional +parameters beginning at \fIoffset\fP. +If \fIparameter\fP is an array name indexed by @ or *, +the result is the \fIlength\fP +members of the array beginning with ${\fIparameter\fP[\fIoffset\fP]}. +Substring indexing is zero-based unless the positional parameters +are used, in which case the indexing starts at 1. +.TP +${\fB!\fP\fIprefix\fP\fB*\fP} +Expands to the names of variables whose names begin with \fIprefix\fP, +separated by the first character of the +.SM +.B IFS +special variable. +.TP +${\fB#\fP\fIparameter\fP} +The length in characters of the value of \fIparameter\fP is substituted. +If +.I parameter +is +.B * +or +.BR @ , +the value substituted is the number of positional parameters. +If +.I parameter +is an array name subscripted by +.B * +or +.BR @ , +the value substituted is the number of elements in the array. +.TP +${\fIparameter\fP\fB#\fP\fIword\fP} +.PD 0 +.TP +${\fIparameter\fP\fB##\fP\fIword\fP} +.PD +The +.I word +is expanded to produce a pattern just as in pathname +expansion. If the pattern matches the beginning of +the value of +.IR parameter , +then the result of the expansion is the expanded value of +.I parameter +with the shortest matching pattern (the ``\fB#\fP'' case) or the +longest matching pattern (the ``\fB##\fP'' case) deleted. +If +.I parameter +is +.B @ +or +.BR * , +the pattern removal operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +.I parameter +is an array variable subscripted with +.B @ +or +.BR * , +the pattern removal operation is applied to each member of the +array in turn, and the expansion is the resultant list. +.TP +${\fIparameter\fP\fB%\fP\fIword\fP} +.PD 0 +.TP +${\fIparameter\fP\fB%%\fP\fIword\fP} +.PD +The \fIword\fP is expanded to produce a pattern just as in +pathname expansion. +If the pattern matches a trailing portion of the expanded value of +.IR parameter , +then the result of the expansion is the expanded value of +.I parameter +with the shortest matching pattern (the ``\fB%\fP'' case) or the +longest matching pattern (the ``\fB%%\fP'' case) deleted. +If +.I parameter +is +.B @ +or +.BR * , +the pattern removal operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +.I parameter +is an array variable subscripted with +.B @ +or +.BR * , +the pattern removal operation is applied to each member of the +array in turn, and the expansion is the resultant list. +.TP +${\fIparameter\fP\fB/\fP\fIpattern\fP\fB/\fP\fIstring\fP} +.PD 0 +.TP +${\fIparameter\fP\fB//\fP\fIpattern\fP\fB/\fP\fIstring\fP} +.PD +The \fIpattern\fP is expanded to produce a pattern just as in +pathname expansion. +\fIParameter\fP is expanded and the longest match of \fIpattern\fP +against its value is replaced with \fIstring\fP. +In the first form, only the first match is replaced. +The second form causes all matches of \fIpattern\fP to be +replaced with \fIstring\fP. +If \fIpattern\fP begins with \fB#\fP, it must match at the beginning +of the expanded value of \fIparameter\fP. +If \fIpattern\fP begins with \fB%\fP, it must match at the end +of the expanded value of \fIparameter\fP. +If \fIstring\fP is null, matches of \fIpattern\fP are deleted +and the \fB/\fP following \fIpattern\fP may be omitted. +If +.I parameter +is +.B @ +or +.BR * , +the substitution operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +.I parameter +is an array variable subscripted with +.B @ +or +.BR * , +the substitution operation is applied to each member of the +array in turn, and the expansion is the resultant list. +.SS Command Substitution +.PP +\fICommand substitution\fP allows the output of a command to replace +the command name. There are two forms: +.PP +.RS +.PP +\fB$(\fP\fIcommand\fP\|\fB)\fP +.RE +or +.RS +\fB`\fP\fIcommand\fP\fB`\fP +.RE +.PP +.B Bash +performs the expansion by executing \fIcommand\fP and +replacing the command substitution with the standard output of the +command, with any trailing newlines deleted. +Embedded newlines are not deleted, but they may be removed during +word splitting. +The command substitution \fB$(cat \fIfile\fP)\fR can be replaced by +the equivalent but faster \fB$(< \fIfile\fP)\fR. +.PP +When the old-style backquote form of substitution is used, +backslash retains its literal meaning except when followed by +.BR $ , +.BR ` , +or +.BR \e . +The first backquote not preceded by a backslash terminates the +command substitution. +When using the $(\^\fIcommand\fP\|) form, all characters between the +parentheses make up the command; none are treated specially. +.PP +Command substitutions may be nested. To nest when using the backquoted form, +escape the inner backquotes with backslashes. +.PP +If the substitution appears within double quotes, word splitting and +pathname expansion are not performed on the results. +.SS Arithmetic Expansion +.PP +Arithmetic expansion allows the evaluation of an arithmetic expression +and the substitution of the result. The format for arithmetic expansion is: +.RS +.PP +\fB$((\fP\fIexpression\fP\fB))\fP +.RE +.PP +The +.I expression +is treated as if it were within double quotes, but a double quote +inside the parentheses is not treated specially. +All tokens in the expression undergo parameter expansion, string +expansion, command substitution, and quote removal. +Arithmetic substitutions may be nested. +.PP +The evaluation is performed according to the rules listed below under +.SM +.BR "ARITHMETIC EVALUATION" . +If +.I expression +is invalid, +.B bash +prints a message indicating failure and no substitution occurs. +.SS Process Substitution +.PP +\fIProcess substitution\fP is supported on systems that support named +pipes (\fIFIFOs\fP) or the \fB/dev/fd\fP method of naming open files. +It takes the form of +\fB<(\fP\fIlist\^\fP\fB)\fP +or +\fB>(\fP\fIlist\^\fP\fB)\fP. +The process \fIlist\fP is run with its input or output connected to a +\fIFIFO\fP or some file in \fB/dev/fd\fP. The name of this file is +passed as an argument to the current command as the result of the +expansion. If the \fB>(\fP\fIlist\^\fP\fB)\fP form is used, writing to +the file will provide input for \fIlist\fP. If the +\fB<(\fP\fIlist\^\fP\fB)\fP form is used, the file passed as an +argument should be read to obtain the output of \fIlist\fP. +.PP +When available, process substitution is performed +simultaneously with parameter and variable expansion, +command substitution, +and arithmetic expansion. +.SS Word Splitting +.PP +The shell scans the results of +parameter expansion, +command substitution, +and +arithmetic expansion +that did not occur within double quotes for +.IR "word splitting" . +.PP +The shell treats each character of +.SM +.B IFS +as a delimiter, and splits the results of the other +expansions into words on these characters. If +.SM +.B IFS +is unset, or its +value is exactly +.BR , +the default, then +any sequence of +.SM +.B IFS +characters serves to delimit words. If +.SM +.B IFS +has a value other than the default, then sequences of +the whitespace characters +.B space +and +.B tab +are ignored at the beginning and end of the +word, as long as the whitespace character is in the +value of +.SM +.BR IFS +(an +.SM +.B IFS +whitespace character). +Any character in +.SM +.B IFS +that is not +.SM +.B IFS +whitespace, along with any adjacent +.SM +.B IFS +whitespace characters, delimits a field. +A sequence of +.SM +.B IFS +whitespace characters is also treated as a delimiter. +If the value of +.SM +.B IFS +is null, no word splitting occurs. +.PP +Explicit null arguments (\^\f3"\^"\fP or \^\f3'\^'\fP\^) are retained. +Unquoted implicit null arguments, resulting from the expansion of +parameters that have no values, are removed. +If a parameter with no value is expanded within double quotes, a +null argument results and is retained. +.PP +Note that if no expansion occurs, no splitting +is performed. +.SS Pathname Expansion +.PP +After word splitting, +unless the +.B \-f +option has been set, +.B bash +scans each word for the characters +.BR * , +.BR ? , +and +.BR [ . +If one of these characters appears, then the word is +regarded as a +.IR pattern , +and replaced with an alphabetically sorted list of +file names matching the pattern. +If no matching file names are found, +and the shell option +.B nullglob +is disabled, the word is left unchanged. +If the +.B nullglob +option is set, and no matches are found, +the word is removed. +If the shell option +.B nocaseglob +is enabled, the match is performed without regard to the case +of alphabetic characters. +When a pattern is used for pathname expansion, +the character +.B ``.'' +at the start of a name or immediately following a slash +must be matched explicitly, unless the shell option +.B dotglob +is set. +When matching a pathname, the slash character must always be +matched explicitly. +In other cases, the +.B ``.'' +character is not treated specially. +See the description of +.B shopt +below under +.SM +.B SHELL BUILTIN COMMANDS +for a description of the +.BR nocaseglob , +.BR nullglob , +and +.B dotglob +shell options. +.PP +The +.SM +.B GLOBIGNORE +shell variable may be used to restrict the set of file names matching a +.IR pattern . +If +.SM +.B GLOBIGNORE +is set, each matching file name that also matches one of the patterns in +.SM +.B GLOBIGNORE +is removed from the list of matches. +The file names +.B ``.'' +and +.B ``..'' +are always ignored, even when +.SM +.B GLOBIGNORE +is set. However, setting +.SM +.B GLOBIGNORE +has the effect of enabling the +.B dotglob +shell option, so all other file names beginning with a +.B ``.'' +will match. +To get the old behavior of ignoring file names beginning with a +.BR ``.'' , +make +.B ``.*'' +one of the patterns in +.SM +.BR GLOBIGNORE . +The +.B dotglob +option is disabled when +.SM +.B GLOBIGNORE +is unset. +.PP +\fBPattern Matching\fP +.PP +Any character that appears in a pattern, other than the special pattern +characters described below, matches itself. The NUL character may not +occur in a pattern. The special pattern characters must be quoted if +they are to be matched literally. +.PP +The special pattern characters have the following meanings: +.PP +.PD 0 +.TP +.B * +Matches any string, including the null string. +.TP +.B ? +Matches any single character. +.TP +.B [...] +Matches any one of the enclosed characters. A pair of characters +separated by a hyphen denotes a +\fIrange expression\fP; +any character that sorts between those two characters, inclusive, +using the current locale's collating sequence and character set, +is matched. If the first character following the +.B [ +is a +.B ! +or a +.B ^ +then any character not enclosed is matched. +The sorting order of characters in range expressions is determined by +the current locale and the value of the \fBLC_COLLATE\fP shell variable, +if set. +A +.B \- +may be matched by including it as the first or last character +in the set. +A +.B ] +may be matched by including it as the first character +in the set. +.br +.if t .sp 0.5 +.if n .sp 1 +Within +.B [ +and +.BR ] , +\fIcharacter classes\fP can be specified using the syntax +\fB[:\fP\fIclass\fP\fB:]\fP, where \fIclass\fP is one of the +following classes defined in the POSIX.2 standard: +.PP +.RS +.B +.if n alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit +.if t alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit +.br +A character class matches any character belonging to that class. +The \fBword\fP character class matches letters, digits, and the character _. +.br +.if t .sp 0.5 +.if n .sp 1 +Within +.B [ +and +.BR ] , +an \fIequivalence class\fP can be specified using the syntax +\fB[=\fP\fIc\fP\fB=]\fP, which matches all characters with the +same collation weight (as defined by the current locale) as +the character \fIc\fP. +.br +.if t .sp 0.5 +.if n .sp 1 +Within +.B [ +and +.BR ] , +the syntax \fB[.\fP\fIsymbol\fP\fB.]\fP matches the collating symbol +\fIsymbol\fP. +.RE +.PD +.PP +If the \fBextglob\fP shell option is enabled using the \fBshopt\fP +builtin, several extended pattern matching operators are recognized. +In the following description, a \fIpattern-list\fP is a list of one +or more patterns separated by a \fB|\fP. +Composite patterns may be formed using one or more of the following +sub-patterns: +.sp 1 +.PD 0 +.RS +.TP +\fB?(\fP\^\fIpattern-list\^\fP\fB)\fP +Matches zero or one occurrence of the given patterns +.TP +\fB*(\fP\^\fIpattern-list\^\fP\fB)\fP +Matches zero or more occurrences of the given patterns +.TP +\fB+(\fP\^\fIpattern-list\^\fP\fB)\fP +Matches one or more occurrences of the given patterns +.TP +\fB@(\fP\^\fIpattern-list\^\fP\fB)\fP +Matches exactly one of the given patterns +.TP +\fB!(\fP\^\fIpattern-list\^\fP\fB)\fP +Matches anything except one of the given patterns +.RE +.PD +.SS Quote Removal +.PP +After the preceding expansions, all unquoted occurrences of the +characters +.BR \e , +.BR ' , +and \^\f3"\fP\^ that did not result from one of the above +expansions are removed. +.SH REDIRECTION +Before a command is executed, its input and output +may be +.I redirected +using a special notation interpreted by the shell. +Redirection may also be used to open and close files for the +current shell execution environment. The following redirection +operators may precede or appear anywhere within a +.I simple command +or may follow a +.IR command . +Redirections are processed in the order they appear, from +left to right. +.PP +In the following descriptions, if the file descriptor number is +omitted, and the first character of the redirection operator is +.BR < , +the redirection refers to the standard input (file descriptor +0). If the first character of the redirection operator is +.BR > , +the redirection refers to the standard output (file descriptor +1). +.PP +The word following the redirection operator in the following +descriptions, unless otherwise noted, is subjected to brace expansion, +tilde expansion, parameter expansion, command substitution, arithmetic +expansion, quote removal, pathname expansion, and word splitting. +If it expands to more than one word, +.B bash +reports an error. +.PP +Note that the order of redirections is significant. For example, +the command +.RS +.PP +ls \fB>\fP dirlist 2\fB>&\fP1 +.RE +.PP +directs both standard output and standard error to the file +.IR dirlist , +while the command +.RS +.PP +ls 2\fB>&\fP1 \fB>\fP dirlist +.RE +.PP +directs only the standard output to file +.IR dirlist , +because the standard error was duplicated as standard output +before the standard output was redirected to +.IR dirlist . +.PP +\fBBash\fP handles several filenames specially when they are used in +redirections, as described in the following table: +.RS +.PP +.PD 0 +.TP +.B /dev/fd/\fIfd\fP +If \fIfd\fP is a valid integer, file descriptor \fIfd\fP is duplicated. +.TP +.B /dev/stdin +File descriptor 0 is duplicated. +.TP +.B /dev/stdout +File descriptor 1 is duplicated. +.TP +.B /dev/stderr +File descriptor 2 is duplicated. +.TP +.B /dev/tcp/\fIhost\fP/\fIport\fP +If \fIhost\fP is a valid hostname or Internet address, and \fIport\fP +is an integer port number or service name, \fBbash\fP attempts to open +a TCP connection to the corresponding socket. +.TP +.B /dev/udp/\fIhost\fP/\fIport\fP +If \fIhost\fP is a valid hostname or Internet address, and \fIport\fP +is an integer port number or service name, \fBbash\fP attempts to open +a UDP connection to the corresponding socket. +.PD +.RE +.PP +A failure to open or create a file causes the redirection to fail. +.SS Redirecting Input +.PP +Redirection of input causes the file whose name results from +the expansion of +.I word +to be opened for reading on file descriptor +.IR n , +or the standard input (file descriptor 0) if +.I n +is not specified. +.PP +The general format for redirecting input is: +.RS +.PP +[\fIn\fP]\fB<\fP\fIword\fP +.RE +.SS Redirecting Output +.PP +Redirection of output causes the file whose name results from +the expansion of +.I word +to be opened for writing on file descriptor +.IR n , +or the standard output (file descriptor 1) if +.I n +is not specified. If the file does not exist it is created; +if it does exist it is truncated to zero size. +.PP +The general format for redirecting output is: +.RS +.PP +[\fIn\fP]\fB>\fP\fIword\fP +.RE +.PP +If the redirection operator is +.BR > , +and the +.B noclobber +option to the +.B set +builtin has been enabled, the redirection will fail if the file +whose name results from the expansion of \fIword\fP exists and is +a regular file. +If the redirection operator is +.BR >| , +or the redirection operator is +.B > +and the +.B noclobber +option to the +.B set +builtin command is not enabled, the redirection is attempted even +if the file named by \fIword\fP exists. +.SS Appending Redirected Output +.PP +Redirection of output in this fashion +causes the file whose name results from +the expansion of +.I word +to be opened for appending on file descriptor +.IR n , +or the standard output (file descriptor 1) if +.I n +is not specified. If the file does not exist it is created. +.PP +The general format for appending output is: +.RS +.PP +[\fIn\fP]\fB>>\fP\fIword\fP +.RE +.PP +.SS Redirecting Standard Output and Standard Error +.PP +.B Bash +allows both the +standard output (file descriptor 1) and +the standard error output (file descriptor 2) +to be redirected to the file whose name is the +expansion of +.I word +with this construct. +.PP +There are two formats for redirecting standard output and +standard error: +.RS +.PP +\fB&>\fP\fIword\fP +.RE +and +.RS +\fB>&\fP\fIword\fP +.RE +.PP +Of the two forms, the first is preferred. +This is semantically equivalent to +.RS +.PP +\fB>\fP\fIword\fP 2\fB>&\fP1 +.RE +.SS Here Documents +.PP +This type of redirection instructs the shell to read input from the +current source until a line containing only +.I word +(with no trailing blanks) +is seen. All of +the lines read up to that point are then used as the standard +input for a command. +.PP +The format of here-documents is: +.RS +.PP +.nf +\fB<<\fP[\fB\-\fP]\fIword\fP + \fIhere-document\fP +\fIdelimiter\fP +.fi +.RE +.PP +No parameter expansion, command substitution, arithmetic expansion, +or pathname expansion is performed on +.IR word . +If any characters in +.I word +are quoted, the +.I delimiter +is the result of quote removal on +.IR word , +and the lines in the here-document are not expanded. +If \fIword\fP is unquoted, +all lines of the here-document are subjected to parameter expansion, +command substitution, and arithmetic expansion. In the latter +case, the character sequence +.B \e +is ignored, and +.B \e +must be used to quote the characters +.BR \e , +.BR $ , +and +.BR ` . +.PP +If the redirection operator is +.BR <<\- , +then all leading tab characters are stripped from input lines and the +line containing +.IR delimiter . +This allows +here-documents within shell scripts to be indented in a +natural fashion. +.SS "Here Strings" +A variant of here documents, the format is: +.RS +.PP +.nf +\fB<<<\fP\fIword\fP +.fi +.RE +.PP +The \fIword\fP is expanded and supplied to the command on its standard +input. +.SS "Duplicating File Descriptors" +.PP +The redirection operator +.RS +.PP +[\fIn\fP]\fB<&\fP\fIword\fP +.RE +.PP +is used to duplicate input file descriptors. +If +.I word +expands to one or more digits, the file descriptor denoted by +.I n +is made to be a copy of that file descriptor. +If the digits in +.I word +do not specify a file descriptor open for input, a redirection error occurs. +If +.I word +evaluates to +.BR \- , +file descriptor +.I n +is closed. If +.I n +is not specified, the standard input (file descriptor 0) is used. +.PP +The operator +.RS +.PP +[\fIn\fP]\fB>&\fP\fIword\fP +.RE +.PP +is used similarly to duplicate output file descriptors. If +.I n +is not specified, the standard output (file descriptor 1) is used. +If the digits in +.I word +do not specify a file descriptor open for output, a redirection error occurs. +As a special case, if \fIn\fP is omitted, and \fIword\fP does not +expand to one or more digits, the standard output and standard +error are redirected as described previously. +.SS "Moving File Descriptors" +.PP +The redirection operator +.RS +.PP +[\fIn\fP]\fB<&\fP\fIdigit\fP\fB\-\fP +.RE +.PP +moves the file descriptor \fIdigit\fP to file descriptor +.IR n , +or the standard input (file descriptor 0) if \fIn\fP is not specified. +\fIdigit\fP is closed after being duplicated to \fIn\fP. +.PP +Similarly, the redirection operator +.RS +.PP +[\fIn\fP]\fB>&\fP\fIdigit\fP\fB\-\fP +.RE +.PP +moves the file descriptor \fIdigit\fP to file descriptor +.IR n , +or the standard output (file descriptor 1) if \fIn\fP is not specified. +.SS "Opening File Descriptors for Reading and Writing" +.PP +The redirection operator +.RS +.PP +[\fIn\fP]\fB<>\fP\fIword\fP +.RE +.PP +causes the file whose name is the expansion of +.I word +to be opened for both reading and writing on file descriptor +.IR n , +or on file descriptor 0 if +.I n +is not specified. If the file does not exist, it is created. +.SH ALIASES +\fIAliases\fP allow a string to be substituted for a word when it is used +as the first word of a simple command. +The shell maintains a list of aliases that may be set and unset with the +.B alias +and +.B unalias +builtin commands (see +.SM +.B SHELL BUILTIN COMMANDS +below). +The first word of each command, if unquoted, +is checked to see if it has an +alias. If so, that word is replaced by the text of the alias. +The alias name and the replacement text may contain any valid +shell input, including the +.I metacharacters +listed above, with the exception that the alias name may not +contain \fI=\fP. The first word of the replacement text is tested +for aliases, but a word that is identical to an alias being expanded +is not expanded a second time. This means that one may alias +.B ls +to +.BR "ls \-F" , +for instance, and +.B bash +does not try to recursively expand the replacement text. +If the last character of the alias value is a +.IR blank , +then the next command +word following the alias is also checked for alias expansion. +.PP +Aliases are created and listed with the +.B alias +command, and removed with the +.B unalias +command. +.PP +There is no mechanism for using arguments in the replacement text. +If arguments are needed, a shell function should be used (see +.SM +.B FUNCTIONS +below). +.PP +Aliases are not expanded when the shell is not interactive, unless +the +.B expand_aliases +shell option is set using +.B shopt +(see the description of +.B shopt +under +.SM +\fBSHELL BUILTIN COMMANDS\fP +below). +.PP +The rules concerning the definition and use of aliases are +somewhat confusing. +.B Bash +always reads at least one complete line +of input before executing any +of the commands on that line. Aliases are expanded when a +command is read, not when it is executed. Therefore, an +alias definition appearing on the same line as another +command does not take effect until the next line of input is read. +The commands following the alias definition +on that line are not affected by the new alias. +This behavior is also an issue when functions are executed. +Aliases are expanded when a function definition is read, +not when the function is executed, because a function definition +is itself a compound command. As a consequence, aliases +defined in a function are not available until after that +function is executed. To be safe, always put +alias definitions on a separate line, and do not use +.B alias +in compound commands. +.PP +For almost every purpose, aliases are superseded by +shell functions. +.SH FUNCTIONS +A shell function, defined as described above under +.SM +.BR "SHELL GRAMMAR" , +stores a series of commands for later execution. +When the name of a shell function is used as a simple command name, +the list of commands associated with that function name is executed. +Functions are executed in the context of the +current shell; no new process is created to interpret +them (contrast this with the execution of a shell script). +When a function is executed, the arguments to the +function become the positional parameters +during its execution. +The special parameter +.B # +is updated to reflect the change. Positional parameter 0 +is unchanged. +The +.SM +.B FUNCNAME +variable is set to the name of the function while the function +is executing. +All other aspects of the shell execution +environment are identical between a function and its caller +with the exception that the +.SM +.B DEBUG +trap (see the description of the +.B trap +builtin under +.SM +.B SHELL BUILTIN COMMANDS +below) is not inherited unless the function has been given the +\fBtrace\fP attribute (see the description of the +.SM +.B declare +builtin below). +.PP +Variables local to the function may be declared with the +.B local +builtin command. Ordinarily, variables and their values +are shared between the function and its caller. +.PP +If the builtin command +.B return +is executed in a function, the function completes and +execution resumes with the next command after the function +call. When a function completes, the values of the +positional parameters and the special parameter +.B # +are restored to the values they had prior to the function's +execution. +.PP +Function names and definitions may be listed with the +.B \-f +option to the +.B declare +or +.B typeset +builtin commands. The +.B \-F +option to +.B declare +or +.B typeset +will list the function names only. +Functions may be exported so that subshells +automatically have them defined with the +.B \-f +option to the +.B export +builtin. +.PP +Functions may be recursive. No limit is imposed on the number +of recursive calls. +.SH "ARITHMETIC EVALUATION" +The shell allows arithmetic expressions to be evaluated, under +certain circumstances (see the \fBlet\fP builtin command and +\fBArithmetic Expansion\fP). +Evaluation is done in fixed-width integers with no check for overflow, +though division by 0 is trapped and flagged as an error. +The operators and their precedence and associativity are the same +as in the C language. +The following list of operators is grouped into levels of +equal-precedence operators. +The levels are listed in order of decreasing precedence. +.PP +.PD 0 +.TP +.B \fIid\fP++ \fIid\fP\-\- +variable post-increment and post-decrement +.TP +.B ++\fIid\fP \-\-\fIid\fP +variable pre-increment and pre-decrement +.TP +.B \- + +unary minus and plus +.TP +.B ! ~ +logical and bitwise negation +.TP +.B ** +exponentiation +.TP +.B * / % +multiplication, division, remainder +.TP +.B + \- +addition, subtraction +.TP +.B << >> +left and right bitwise shifts +.TP +.B <= >= < > +comparison +.TP +.B == != +equality and inequality +.TP +.B & +bitwise AND +.TP +.B ^ +bitwise exclusive OR +.TP +.B | +bitwise OR +.TP +.B && +logical AND +.TP +.B || +logical OR +.TP +.B \fIexpr\fP?\fIexpr\fP:\fIexpr\fP +conditional evaluation +.TP +.B = *= /= %= += \-= <<= >>= &= ^= |= +assignment +.TP +.B \fIexpr1\fP , \fIexpr2\fP +comma +.PD +.PP +Shell variables are allowed as operands; parameter expansion is +performed before the expression is evaluated. +Within an expression, shell variables may also be referenced by name +without using the parameter expansion syntax. +The value of a variable is evaluated as an arithmetic expression +when it is referenced. +A shell variable need not have its integer attribute +turned on to be used in an expression. +.PP +Constants with a leading 0 are interpreted as octal numbers. +A leading 0x or 0X denotes hexadecimal. +Otherwise, numbers take the form [\fIbase#\fP]n, where \fIbase\fP +is a decimal number between 2 and 64 representing the arithmetic +base, and \fIn\fP is a number in that base. +If \fIbase#\fP is omitted, then base 10 is used. +The digits greater than 9 are represented by the lowercase letters, +the uppercase letters, @, and _, in that order. +If \fIbase\fP is less than or equal to 36, lowercase and uppercase +letters may be used interchangably to represent numbers between 10 +and 35. +.PP +Operators are evaluated in order of precedence. Sub-expressions in +parentheses are evaluated first and may override the precedence +rules above. +.SH "CONDITIONAL EXPRESSIONS" +Conditional expressions are used by the \fB[[\fP compound command and +the \fBtest\fP and \fB[\fP builtin commands to test file attributes +and perform string and arithmetic comparisons. +Expressions are formed from the following unary or binary primaries. +If any \fIfile\fP argument to one of the primaries is of the form +\fI/dev/fd/n\fP, then file descriptor \fIn\fP is checked. +If the \fIfile\fP argument to one of the primaries is one of +\fI/dev/stdin\fP, \fI/dev/stdout\fP, or \fI/dev/stderr\fP, file +descriptor 0, 1, or 2, respectively, is checked. +.sp 1 +.PD 0 +.TP +.B \-a \fIfile\fP +True if \fIfile\fP exists. +.TP +.B \-b \fIfile\fP +True if \fIfile\fP exists and is a block special file. +.TP +.B \-c \fIfile\fP +True if \fIfile\fP exists and is a character special file. +.TP +.B \-d \fIfile\fP +True if \fIfile\fP exists and is a directory. +.TP +.B \-e \fIfile\fP +True if \fIfile\fP exists. +.TP +.B \-f \fIfile\fP +True if \fIfile\fP exists and is a regular file. +.TP +.B \-g \fIfile\fP +True if \fIfile\fP exists and is set-group-id. +.TP +.B \-h \fIfile\fP +True if \fIfile\fP exists and is a symbolic link. +.TP +.B \-k \fIfile\fP +True if \fIfile\fP exists and its ``sticky'' bit is set. +.TP +.B \-p \fIfile\fP +True if \fIfile\fP exists and is a named pipe (FIFO). +.TP +.B \-r \fIfile\fP +True if \fIfile\fP exists and is readable. +.TP +.B \-s \fIfile\fP +True if \fIfile\fP exists and has a size greater than zero. +.TP +.B \-t \fIfd\fP +True if file descriptor +.I fd +is open and refers to a terminal. +.TP +.B \-u \fIfile\fP +True if \fIfile\fP exists and its set-user-id bit is set. +.TP +.B \-w \fIfile\fP +True if \fIfile\fP exists and is writable. +.TP +.B \-x \fIfile\fP +True if \fIfile\fP exists and is executable. +.TP +.B \-O \fIfile\fP +True if \fIfile\fP exists and is owned by the effective user id. +.TP +.B \-G \fIfile\fP +True if \fIfile\fP exists and is owned by the effective group id. +.TP +.B \-L \fIfile\fP +True if \fIfile\fP exists and is a symbolic link. +.TP +.B \-S \fIfile\fP +True if \fIfile\fP exists and is a socket. +.TP +.B \-N \fIfile\fP +True if \fIfile\fP exists and has been modified since it was last read. +.TP +\fIfile1\fP \-\fBnt\fP \fIfile2\fP +True if \fIfile1\fP is newer (according to modification date) than \fIfile2\fP, +or if \fIfile1\fP exists and \fPfile2\fP does not. +.TP +\fIfile1\fP \-\fBot\fP \fIfile2\fP +True if \fIfile1\fP is older than \fIfile2\fP, or if \fIfile2\fP exists +and \fIfile1\fP does not. +.TP +\fIfile1\fP \fB\-ef\fP \fIfile2\fP +True if \fIfile1\fP and \fIfile2\fP refer to the same device and +inode numbers. +.TP +.B \-o \fIoptname\fP +True if shell option +.I optname +is enabled. +See the list of options under the description of the +.B \-o +option to the +.B set +builtin below. +.TP +.B \-z \fIstring\fP +True if the length of \fIstring\fP is zero. +.TP +.B \-n \fIstring\fP +.TP +\fIstring\fP +True if the length of +.I string +is non-zero. +.TP +\fIstring1\fP \fB==\fP \fIstring2\fP +True if the strings are equal. \fB=\fP may be used in place of +\fB==\fP for strict POSIX compliance. +.TP +\fIstring1\fP \fB!=\fP \fIstring2\fP +True if the strings are not equal. +.TP +\fIstring1\fP \fB<\fP \fIstring2\fP +True if \fIstring1\fP sorts before \fIstring2\fP lexicographically +in the current locale. +.TP +\fIstring1\fP \fB>\fP \fIstring2\fP +True if \fIstring1\fP sorts after \fIstring2\fP lexicographically +in the current locale. +.TP +.I \fIarg1\fP \fBOP\fP \fIarg2\fP +.SM +.B OP +is one of +.BR \-eq , +.BR \-ne , +.BR \-lt , +.BR \-le , +.BR \-gt , +or +.BR \-ge . +These arithmetic binary operators return true if \fIarg1\fP +is equal to, not equal to, less than, less than or equal to, +greater than, or greater than or equal to \fIarg2\fP, respectively. +.I Arg1 +and +.I arg2 +may be positive or negative integers. +.PD +.SH "SIMPLE COMMAND EXPANSION" +When a simple command is executed, the shell performs the following +expansions, assignments, and redirections, from left to right. +.IP 1. +The words that the parser has marked as variable assignments (those +preceding the command name) and redirections are saved for later +processing. +.IP 2. +The words that are not variable assignments or redirections are +expanded. If any words remain after expansion, the first word +is taken to be the name of the command and the remaining words are +the arguments. +.IP 3. +Redirections are performed as described above under +.SM +.BR REDIRECTION . +.IP 4. +The text after the \fB=\fP in each variable assignment undergoes tilde +expansion, parameter expansion, command substitution, arithmetic expansion, +and quote removal before being assigned to the variable. +.PP +If no command name results, the variable assignments affect the current +shell environment. Otherwise, the variables are added to the environment +of the executed command and do not affect the current shell environment. +If any of the assignments attempts to assign a value to a readonly variable, +an error occurs, and the command exits with a non-zero status. +.PP +If no command name results, redirections are performed, but do not +affect the current shell environment. A redirection error causes the +command to exit with a non-zero status. +.PP +If there is a command name left after expansion, execution proceeds as +described below. Otherwise, the command exits. If one of the expansions +contained a command substitution, the exit status of the command is +the exit status of the last command substitution performed. If there +were no command substitutions, the command exits with a status of zero. +.SH "COMMAND EXECUTION" +After a command has been split into words, if it results in a +simple command and an optional list of arguments, the following +actions are taken. +.PP +If the command name contains no slashes, the shell attempts to +locate it. If there exists a shell function by that name, that +function is invoked as described above in +.SM +.BR FUNCTIONS . +If the name does not match a function, the shell searches for +it in the list of shell builtins. If a match is found, that +builtin is invoked. +.PP +If the name is neither a shell function nor a builtin, +and contains no slashes, +.B bash +searches each element of the +.SM +.B PATH +for a directory containing an executable file by that name. +.B Bash +uses a hash table to remember the full pathnames of executable +files (see +.B hash +under +.SM +.B "SHELL BUILTIN COMMANDS" +below). +A full search of the directories in +.SM +.B PATH +is performed only if the command is not found in the hash table. +If the search is unsuccessful, the shell prints an error +message and returns an exit status of 127. +.PP +If the search is successful, or if the command name contains +one or more slashes, the shell executes the named program in a +separate execution environment. +Argument 0 is set to the name given, and the remaining arguments +to the command are set to the arguments given, if any. +.PP +If this execution fails because the file is not in executable +format, and the file is not a directory, it is assumed to be +a \fIshell script\fP, a file +containing shell commands. A subshell is spawned to execute +it. This subshell reinitializes itself, so +that the effect is as if a new shell had been invoked +to handle the script, with the exception that the locations of +commands remembered by the parent (see +.B hash +below under +.SM +\fBSHELL BUILTIN COMMANDS\fP) +are retained by the child. +.PP +If the program is a file beginning with +.BR #! , +the remainder of the first line specifies an interpreter +for the program. The shell executes the +specified interpreter on operating systems that do not +handle this executable format themselves. The arguments to the +interpreter consist of a single optional argument following the +interpreter name on the first line of the program, followed +by the name of the program, followed by the command +arguments, if any. +.SH COMMAND EXECUTION ENVIRONMENT +The shell has an \fIexecution environment\fP, which consists of the +following: +.sp 1 +.IP \(bu +open files inherited by the shell at invocation, as modified by +redirections supplied to the \fBexec\fP builtin +.IP \(bu +the current working directory as set by \fBcd\fP, \fBpushd\fP, or +\fBpopd\fP, or inherited by the shell at invocation +.IP \(bu +the file creation mode mask as set by \fBumask\fP or inherited from +the shell's parent +.IP \(bu +current traps set by \fBtrap\fP +.IP \(bu +shell parameters that are set by variable assignment or with \fBset\fP +or inherited from the shell's parent in the environment +.IP \(bu +shell functions defined during execution or inherited from the shell's +parent in the environment +.IP \(bu +options enabled at invocation (either by default or with command-line +arguments) or by \fBset\fP +.IP \(bu +options enabled by \fBshopt\fP +.IP \(bu +shell aliases defined with \fBalias\fP +.IP \(bu +various process IDs, including those of background jobs, the value +of \fB$$\fP, and the value of \fB$PPID\fP +.PP +When a simple command other than a builtin or shell function +is to be executed, it +is invoked in a separate execution environment that consists of +the following. Unless otherwise noted, the values are inherited +from the shell. +.sp 1 +.IP \(bu +the shell's open files, plus any modifications and additions specified +by redirections to the command +.IP \(bu +the current working directory +.IP \(bu +the file creation mode mask +.IP \(bu +shell variables marked for export, along with variables exported for +the command, passed in the environment +.IP \(bu +traps caught by the shell are reset to the values the inherited +from the shell's parent, and traps ignored by the shell are ignored +.PP +A command invoked in this separate environment cannot affect the +shell's execution environment. +.PP +Command substitution and asynchronous commands are invoked in a +subshell environment that is a duplicate of the shell environment, +except that traps caught by the shell are reset to the values +that the shell inherited from its parent at invocation. Builtin +commands that are invoked as part of a pipeline are also executed in a +subshell environment. Changes made to the subshell environment +cannot affect the shell's execution environment. +.PP +If a command is followed by a \fB&\fP and job control is not active, the +default standard input for the command is the empty file \fI/dev/null\fP. +Otherwise, the invoked command inherits the file descriptors of the calling +shell as modified by redirections. +.SH ENVIRONMENT +When a program is invoked it is given an array of strings +called the +.IR environment . +This is a list of +\fIname\fP\-\fIvalue\fP pairs, of the form +.IR "name\fR=\fPvalue" . +.PP +The shell provides several ways to manipulate the environment. +On invocation, the shell scans its own environment and +creates a parameter for each name found, automatically marking +it for +.I export +to child processes. Executed commands inherit the environment. +The +.B export +and +.B declare \-x +commands allow parameters and functions to be added to and +deleted from the environment. If the value of a parameter +in the environment is modified, the new value becomes part +of the environment, replacing the old. The environment +inherited by any executed command consists of the shell's +initial environment, whose values may be modified in the shell, +less any pairs removed by the +.B unset +command, plus any additions via the +.B export +and +.B declare \-x +commands. +.PP +The environment for any +.I simple command +or function may be augmented temporarily by prefixing it with +parameter assignments, as described above in +.SM +.BR PARAMETERS . +These assignment statements affect only the environment seen +by that command. +.PP +If the +.B \-k +option is set (see the +.B set +builtin command below), then +.I all +parameter assignments are placed in the environment for a command, +not just those that precede the command name. +.PP +When +.B bash +invokes an external command, the variable +.B _ +is set to the full file name of the command and passed to that +command in its environment. +.SH "EXIT STATUS" +For the shell's purposes, a command which exits with a +zero exit status has succeeded. An exit status of zero +indicates success. A non-zero exit status indicates failure. +When a command terminates on a fatal signal \fIN\fP, \fBbash\fP uses +the value of 128+\fIN\fP as the exit status. +.PP +If a command is not found, the child process created to +execute it returns a status of 127. If a command is found +but is not executable, the return status is 126. +.PP +If a command fails because of an error during expansion or redirection, +the exit status is greater than zero. +.PP +Shell builtin commands return a status of 0 (\fItrue\fP) if +successful, and non-zero (\fIfalse\fP) if an error occurs +while they execute. +All builtins return an exit status of 2 to indicate incorrect usage. +.PP +\fBBash\fP itself returns the exit status of the last command +executed, unless a syntax error occurs, in which case it exits +with a non-zero value. See also the \fBexit\fP builtin +command below. +.SH SIGNALS +When \fBbash\fP is interactive, in the absence of any traps, it ignores +.SM +.B SIGTERM +(so that \fBkill 0\fP does not kill an interactive shell), +and +.SM +.B SIGINT +is caught and handled (so that the \fBwait\fP builtin is interruptible). +In all cases, \fBbash\fP ignores +.SM +.BR SIGQUIT . +If job control is in effect, +.B bash +ignores +.SM +.BR SIGTTIN , +.SM +.BR SIGTTOU , +and +.SM +.BR SIGTSTP . +.PP +Synchronous jobs started by \fBbash\fP have signal handlers +set to the values inherited by the shell from its parent. +When job control is not in effect, asynchronous commands +ignore +.SM +.B SIGINT +and +.SM +.B SIGQUIT +as well. +Commands run as a result of command substitution ignore the +keyboard-generated job control signals +.SM +.BR SIGTTIN , +.SM +.BR SIGTTOU , +and +.SM +.BR SIGTSTP . +.PP +The shell exits by default upon receipt of a +.SM +.BR SIGHUP . +Before exiting, an interactive shell resends the +.SM +.B SIGHUP +to all jobs, running or stopped. +Stopped jobs are sent +.SM +.B SIGCONT +to ensure that they receive the +.SM +.BR SIGHUP . +To prevent the shell from +sending the signal to a particular job, it should be removed from the +jobs table with the +.B disown +builtin (see +.SM +.B "SHELL BUILTIN COMMANDS" +below) or marked +to not receive +.SM +.B SIGHUP +using +.BR "disown \-h" . +.PP +If the +.B huponexit +shell option has been set with +.BR shopt , +.B bash +sends a +.SM +.B SIGHUP +to all jobs when an interactive login shell exits. +.PP +When \fBbash\fP receives a signal for which a trap has been set while +waiting for a command to complete, the trap will not be executed until +the command completes. +When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP +builtin, the reception of a signal for which a trap has been set will +cause the \fBwait\fP builtin to return immediately with an exit status +greater than 128, immediately after which the trap is executed. +.SH "JOB CONTROL" +.I Job control +refers to the ability to selectively stop (\fIsuspend\fP) +the execution of processes and continue (\fIresume\fP) +their execution at a later point. A user typically employs +this facility via an interactive interface supplied jointly +by the system's terminal driver and +.BR bash . +.PP +The shell associates a +.I job +with each pipeline. It keeps a table of currently executing +jobs, which may be listed with the +.B jobs +command. When +.B bash +starts a job asynchronously (in the +.IR background ), +it prints a line that looks like: +.RS +.PP +[1] 25647 +.RE +.PP +indicating that this job is job number 1 and that the process ID +of the last process in the pipeline associated with this job is 25647. +All of the processes in a single pipeline are members of the same job. +.B Bash +uses the +.I job +abstraction as the basis for job control. +.PP +To facilitate the implementation of the user interface to job +control, the operating system maintains the notion of a \fIcurrent terminal +process group ID\fP. Members of this process group (processes whose +process group ID is equal to the current terminal process group ID) +receive keyboard-generated signals such as +.SM +.BR SIGINT . +These processes are said to be in the +.IR foreground . +.I Background +processes are those whose process group ID differs from the terminal's; +such processes are immune to keyboard-generated signals. +Only foreground processes are allowed to read from or write to the +terminal. Background processes which attempt to read from (write to) the +terminal are sent a +.SM +.B SIGTTIN (SIGTTOU) +signal by the terminal driver, +which, unless caught, suspends the process. +.PP +If the operating system on which +.B bash +is running supports +job control, +.B bash +contains facilities to use it. +Typing the +.I suspend +character (typically +.BR ^Z , +Control-Z) while a process is running +causes that process to be stopped and returns control to +.BR bash . +Typing the +.I "delayed suspend" +character (typically +.BR ^Y , +Control-Y) causes the process to be stopped when it +attempts to read input from the terminal, and control to +be returned to +.BR bash . +The user may then manipulate the state of this job, using the +.B bg +command to continue it in the background, the +.B fg +command to continue it in the foreground, or +the +.B kill +command to kill it. A \fB^Z\fP takes effect immediately, +and has the additional side effect of causing pending output +and typeahead to be discarded. +.PP +There are a number of ways to refer to a job in the shell. +The character +.B % +introduces a job name. Job number +.I n +may be referred to as +.BR %n . +A job may also be referred to using a prefix of the name used to +start it, or using a substring that appears in its command line. +For example, +.B %ce +refers to a stopped +.B ce +job. If a prefix matches more than one job, +.B bash +reports an error. Using +.BR %?ce , +on the other hand, refers to any job containing the string +.B ce +in its command line. If the substring matches more than one job, +.B bash +reports an error. The symbols +.B %% +and +.B %+ +refer to the shell's notion of the +.IR "current job" , +which is the last job stopped while it was in +the foreground or started in the background. +The +.I "previous job" +may be referenced using +.BR %\- . +In output pertaining to jobs (e.g., the output of the +.B jobs +command), the current job is always flagged with a +.BR + , +and the previous job with a +.BR \- . +.PP +Simply naming a job can be used to bring it into the +foreground: +.B %1 +is a synonym for +\fB``fg %1''\fP, +bringing job 1 from the background into the foreground. +Similarly, +.B ``%1 &'' +resumes job 1 in the background, equivalent to +\fB``bg %1''\fP. +.PP +The shell learns immediately whenever a job changes state. +Normally, +.B bash +waits until it is about to print a prompt before reporting +changes in a job's status so as to not interrupt +any other output. If the +.B \-b +option to the +.B set +builtin command +is enabled, +.B bash +reports such changes immediately. +Any trap on +.SM +.B SIGCHLD +is executed for each child that exits. +.PP +If an attempt to exit +.B bash +is made while jobs are stopped, the shell prints a warning message. The +.B jobs +command may then be used to inspect their status. +If a second attempt to exit is made without an intervening command, +the shell does not print another warning, and the stopped +jobs are terminated. +.SH PROMPTING +When executing interactively, +.B bash +displays the primary prompt +.SM +.B PS1 +when it is ready to read a command, and the secondary prompt +.SM +.B PS2 +when it needs more input to complete a command. +.B Bash +allows these prompt strings to be customized by inserting a number of +backslash-escaped special characters that are decoded as follows: +.RS +.PD 0 +.TP +.B \ea +an ASCII bell character (07) +.TP +.B \ed +the date in "Weekday Month Date" format (e.g., "Tue May 26") +.TP +.B \eD{\fIformat\fP} +the \fIformat\fP is passed to \fIstrftime\fP(3) and the result is inserted +into the prompt string; an empty \fIformat\fP results in a locale-specific +time representation. The braces are required +.TP +.B \ee +an ASCII escape character (033) +.TP +.B \eh +the hostname up to the first `.' +.TP +.B \eH +the hostname +.TP +.B \ej +the number of jobs currently managed by the shell +.TP +.B \el +the basename of the shell's terminal device name +.TP +.B \en +newline +.TP +.B \er +carriage return +.TP +.B \es +the name of the shell, the basename of +.B $0 +(the portion following the final slash) +.TP +.B \et +the current time in 24-hour HH:MM:SS format +.TP +.B \eT +the current time in 12-hour HH:MM:SS format +.TP +.B \e@ +the current time in 12-hour am/pm format +.TP +.B \eA +the current time in 24-hour HH:MM format +.TP +.B \eu +the username of the current user +.TP +.B \ev +the version of \fBbash\fP (e.g., 2.00) +.TP +.B \eV +the release of \fBbash\fP, version + patchelvel (e.g., 2.00.0) +.TP +.B \ew +the current working directory +.TP +.B \eW +the basename of the current working directory +.TP +.B \e! +the history number of this command +.TP +.B \e# +the command number of this command +.TP +.B \e$ +if the effective UID is 0, a +.BR # , +otherwise a +.B $ +.TP +.B \e\fInnn\fP +the character corresponding to the octal number \fInnn\fP +.TP +.B \e\e +a backslash +.TP +.B \e[ +begin a sequence of non-printing characters, which could be used to +embed a terminal control sequence into the prompt +.TP +.B \e] +end a sequence of non-printing characters +.PD +.RE +.PP +The command number and the history number are usually different: +the history number of a command is its position in the history +list, which may include commands restored from the history file +(see +.SM +.B HISTORY +below), while the command number is the position in the sequence +of commands executed during the current shell session. +After the string is decoded, it is expanded via +parameter expansion, command substitution, arithmetic +expansion, and quote removal, subject to the value of the +.B promptvars +shell option (see the description of the +.B shopt +command under +.SM +.B "SHELL BUILTIN COMMANDS" +below). +.SH READLINE +This is the library that handles reading input when using an interactive +shell, unless the +.B \-\-noediting +option is given at shell invocation. +By default, the line editing commands are similar to those of emacs. +A vi-style line editing interface is also available. +To turn off line editing after the shell is running, use the +.B +o emacs +or +.B +o vi +options to the +.B set +builtin (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.SS "Readline Notation" +.PP +In this section, the emacs-style notation is used to denote +keystrokes. Control keys are denoted by C\-\fIkey\fR, e.g., C\-n +means Control\-N. Similarly, +.I meta +keys are denoted by M\-\fIkey\fR, so M\-x means Meta\-X. (On keyboards +without a +.I meta +key, M\-\fIx\fP means ESC \fIx\fP, i.e., press the Escape key +then the +.I x +key. This makes ESC the \fImeta prefix\fP. +The combination M\-C\-\fIx\fP means ESC\-Control\-\fIx\fP, +or press the Escape key +then hold the Control key while pressing the +.I x +key.) +.PP +Readline commands may be given numeric +.IR arguments , +which normally act as a repeat count. +Sometimes, however, it is the sign of the argument that is significant. +Passing a negative argument to a command that acts in the forward +direction (e.g., \fBkill\-line\fP) causes that command to act in a +backward direction. +Commands whose behavior with arguments deviates from this are noted +below. +.PP +When a command is described as \fIkilling\fP text, the text +deleted is saved for possible future retrieval +(\fIyanking\fP). The killed text is saved in a +\fIkill ring\fP. Consecutive kills cause the text to be +accumulated into one unit, which can be yanked all at once. +Commands which do not kill text separate the chunks of text +on the kill ring. +.SS "Readline Initialization" +.PP +Readline is customized by putting commands in an initialization +file (the \fIinputrc\fP file). +The name of this file is taken from the value of the +.SM +.B INPUTRC +variable. If that variable is unset, the default is +.IR ~/.inputrc . +When a program which uses the readline library starts up, the +initialization file is read, and the key bindings and variables +are set. +There are only a few basic constructs allowed in the +readline initialization file. +Blank lines are ignored. +Lines beginning with a \fB#\fP are comments. +Lines beginning with a \fB$\fP indicate conditional constructs. +Other lines denote key bindings and variable settings. +.PP +The default key-bindings may be changed with an +.I inputrc +file. +Other programs that use this library may add their own commands +and bindings. +.PP +For example, placing +.RS +.PP +M\-Control\-u: universal\-argument +.RE +or +.RS +C\-Meta\-u: universal\-argument +.RE +into the +.I inputrc +would make M\-C\-u execute the readline command +.IR universal\-argument . +.PP +The following symbolic character names are recognized: +.IR RUBOUT , +.IR DEL , +.IR ESC , +.IR LFD , +.IR NEWLINE , +.IR RET , +.IR RETURN , +.IR SPC , +.IR SPACE , +and +.IR TAB . +.PP +In addition to command names, readline allows keys to be bound +to a string that is inserted when the key is pressed (a \fImacro\fP). +.SS "Readline Key Bindings" +.PP +The syntax for controlling key bindings in the +.I inputrc +file is simple. All that is required is the name of the +command or the text of a macro and a key sequence to which +it should be bound. The name may be specified in one of two ways: +as a symbolic key name, possibly with \fIMeta\-\fP or \fIControl\-\fP +prefixes, or as a key sequence. +.PP +When using the form \fBkeyname\fP:\^\fIfunction\-name\fP or \fImacro\fP, +.I keyname +is the name of a key spelled out in English. For example: +.sp +.RS +Control-u: universal\-argument +.br +Meta-Rubout: backward-kill-word +.br +Control-o: "> output" +.RE +.LP +In the above example, +.I C\-u +is bound to the function +.BR universal\-argument , +.I M\-DEL +is bound to the function +.BR backward\-kill\-word , +and +.I C\-o +is bound to run the macro +expressed on the right hand side (that is, to insert the text +.if t \f(CW> output\fP +.if n ``> output'' +into the line). +.PP +In the second form, \fB"keyseq"\fP:\^\fIfunction\-name\fP or \fImacro\fP, +.B keyseq +differs from +.B keyname +above in that strings denoting +an entire key sequence may be specified by placing the sequence +within double quotes. Some GNU Emacs style key escapes can be +used, as in the following example, but the symbolic character names +are not recognized. +.sp +.RS +"\eC\-u": universal\-argument +.br +"\eC\-x\eC\-r": re\-read\-init\-file +.br +"\ee[11~": "Function Key 1" +.RE +.PP +In this example, +.I C\-u +is again bound to the function +.BR universal\-argument . +.I "C\-x C\-r" +is bound to the function +.BR re\-read\-init\-file , +and +.I "ESC [ 1 1 ~" +is bound to insert the text +.if t \f(CWFunction Key 1\fP. +.if n ``Function Key 1''. +.PP +The full set of GNU Emacs style escape sequences is +.RS +.PD 0 +.TP +.B \eC\- +control prefix +.TP +.B \eM\- +meta prefix +.TP +.B \ee +an escape character +.TP +.B \e\e +backslash +.TP +.B \e" +literal " +.TP +.B \e' +literal ' +.RE +.PD +.PP +In addition to the GNU Emacs style escape sequences, a second +set of backslash escapes is available: +.RS +.PD 0 +.TP +.B \ea +alert (bell) +.TP +.B \eb +backspace +.TP +.B \ed +delete +.TP +.B \ef +form feed +.TP +.B \en +newline +.TP +.B \er +carriage return +.TP +.B \et +horizontal tab +.TP +.B \ev +vertical tab +.TP +.B \e\fInnn\fP +the eight-bit character whose value is the octal value \fInnn\fP +(one to three digits) +.TP +.B \ex\fIHH\fP +the eight-bit character whose value is the hexadecimal value \fIHH\fP +(one or two hex digits) +.RE +.PD +.PP +When entering the text of a macro, single or double quotes must +be used to indicate a macro definition. +Unquoted text is assumed to be a function name. +In the macro body, the backslash escapes described above are expanded. +Backslash will quote any other character in the macro text, +including " and '. +.PP +.B Bash +allows the current readline key bindings to be displayed or modified +with the +.B bind +builtin command. The editing mode may be switched during interactive +use by using the +.B \-o +option to the +.B set +builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.SS "Readline Variables" +.PP +Readline has variables that can be used to further customize its +behavior. A variable may be set in the +.I inputrc +file with a statement of the form +.RS +.PP +\fBset\fP \fIvariable\-name\fP \fIvalue\fP +.RE +.PP +Except where noted, readline variables can take the values +.B On +or +.BR Off . +The variables and their default values are: +.PP +.PD 0 +.TP +.B bell\-style (audible) +Controls what happens when readline wants to ring the terminal bell. +If set to \fBnone\fP, readline never rings the bell. If set to +\fBvisible\fP, readline uses a visible bell if one is available. +If set to \fBaudible\fP, readline attempts to ring the terminal's bell. +.TP +.B comment\-begin (``#'') +The string that is inserted when the readline +.B insert\-comment +command is executed. +This command is bound to +.B M\-# +in emacs mode and to +.B # +in vi command mode. +.TP +.B completion\-ignore\-case (Off) +If set to \fBOn\fP, readline performs filename matching and completion +in a case\-insensitive fashion. +.TP +.B completion\-query\-items (100) +This determines when the user is queried about viewing +the number of possible completions +generated by the \fBpossible\-completions\fP command. +It may be set to any integer value greater than or equal to +zero. If the number of possible completions is greater than +or equal to the value of this variable, the user is asked whether +or not he wishes to view them; otherwise they are simply listed +on the terminal. +.TP +.B convert\-meta (On) +If set to \fBOn\fP, readline will convert characters with the +eighth bit set to an ASCII key sequence +by stripping the eighth bit and prefixing an +escape character (in effect, using escape as the \fImeta prefix\fP). +.TP +.B disable\-completion (Off) +If set to \fBOn\fP, readline will inhibit word completion. Completion +characters will be inserted into the line as if they had been +mapped to \fBself-insert\fP. +.TP +.B editing\-mode (emacs) +Controls whether readline begins with a set of key bindings similar +to \fIemacs\fP or \fIvi\fP. +.B editing\-mode +can be set to either +.B emacs +or +.BR vi . +.TP +.B enable\-keypad (Off) +When set to \fBOn\fP, readline will try to enable the application +keypad when it is called. Some systems need this to enable the +arrow keys. +.TP +.B expand\-tilde (Off) +If set to \fBon\fP, tilde expansion is performed when readline +attempts word completion. +.TP +.B history-preserve-point +If set to \fBon\fP, the history code attempts to place point at the +same location on each history line retrived with \fBprevious-history\fP +or \fBnext-history\fP. +.TP +.B horizontal\-scroll\-mode (Off) +When set to \fBOn\fP, makes readline use a single line for display, +scrolling the input horizontally on a single screen line when it +becomes longer than the screen width rather than wrapping to a new line. +.TP +.B input\-meta (Off) +If set to \fBOn\fP, readline will enable eight-bit input (that is, +it will not strip the high bit from the characters it reads), +regardless of what the terminal claims it can support. The name +.B meta\-flag +is a synonym for this variable. +.TP +.B isearch\-terminators (``C\-[C\-J'') +The string of characters that should terminate an incremental +search without subsequently executing the character as a command. +If this variable has not been given a value, the characters +\fIESC\fP and \fIC\-J\fP will terminate an incremental search. +.TP +.B keymap (emacs) +Set the current readline keymap. The set of valid keymap names is +\fIemacs, emacs\-standard, emacs\-meta, emacs\-ctlx, vi, +vi\-command\fP, and +.IR vi\-insert . +\fIvi\fP is equivalent to \fIvi\-command\fP; \fIemacs\fP is +equivalent to \fIemacs\-standard\fP. The default value is +.IR emacs ; +the value of +.B editing\-mode +also affects the default keymap. +.TP +.B mark\-directories (On) +If set to \fBOn\fP, completed directory names have a slash +appended. +.TP +.B mark\-modified\-lines (Off) +If set to \fBOn\fP, history lines that have been modified are displayed +with a preceding asterisk (\fB*\fP). +.TP +.B mark\-symlinked\-directories (Off) +If set to \fBOn\fP, completed names which are symbolic links to directories +have a slash appended (subject to the value of +\fBmark\-directories\fP). +.TP +.B match\-hidden\-files (On) +This variable, when set to \fBOn\fP, causes readline to match files whose +names begin with a `.' (hidden files) when performing filename +completion, unless the leading `.' is +supplied by the user in the filename to be completed. +.TP +.B output\-meta (Off) +If set to \fBOn\fP, readline will display characters with the +eighth bit set directly rather than as a meta-prefixed escape +sequence. +.TP +.B page\-completions (On) +If set to \fBOn\fP, readline uses an internal \fImore\fP-like pager +to display a screenful of possible completions at a time. +.TP +.B print\-completions\-horizontally (Off) +If set to \fBOn\fP, readline will display completions with matches +sorted horizontally in alphabetical order, rather than down the screen. +.TP +.B show\-all\-if\-ambiguous (Off) +This alters the default behavior of the completion functions. If +set to +.BR on , +words which have more than one possible completion cause the +matches to be listed immediately instead of ringing the bell. +.TP +.B visible\-stats (Off) +If set to \fBOn\fP, a character denoting a file's type as reported +by \fIstat\fP(2) is appended to the filename when listing possible +completions. +.PD +.SS "Readline Conditional Constructs" +.PP +Readline implements a facility similar in spirit to the conditional +compilation features of the C preprocessor which allows key +bindings and variable settings to be performed as the result +of tests. There are four parser directives used. +.IP \fB$if\fP +The +.B $if +construct allows bindings to be made based on the +editing mode, the terminal being used, or the application using +readline. The text of the test extends to the end of the line; +no characters are required to isolate it. +.RS +.IP \fBmode\fP +The \fBmode=\fP form of the \fB$if\fP directive is used to test +whether readline is in emacs or vi mode. +This may be used in conjunction +with the \fBset keymap\fP command, for instance, to set bindings in +the \fIemacs\-standard\fP and \fIemacs\-ctlx\fP keymaps only if +readline is starting out in emacs mode. +.IP \fBterm\fP +The \fBterm=\fP form may be used to include terminal-specific +key bindings, perhaps to bind the key sequences output by the +terminal's function keys. The word on the right side of the +.B = +is tested against the both full name of the terminal and the portion +of the terminal name before the first \fB\-\fP. This allows +.I sun +to match both +.I sun +and +.IR sun\-cmd , +for instance. +.IP \fBapplication\fP +The \fBapplication\fP construct is used to include +application-specific settings. Each program using the readline +library sets the \fIapplication name\fP, and an initialization +file can test for a particular value. +This could be used to bind key sequences to functions useful for +a specific program. For instance, the following command adds a +key sequence that quotes the current or previous word in Bash: +.sp 1 +.RS +.nf +\fB$if\fP Bash +# Quote the current or previous word +"\eC\-xq": "\eeb\e"\eef\e"" +\fB$endif\fP +.fi +.RE +.RE +.IP \fB$endif\fP +This command, as seen in the previous example, terminates an +\fB$if\fP command. +.IP \fB$else\fP +Commands in this branch of the \fB$if\fP directive are executed if +the test fails. +.IP \fB$include\fP +This directive takes a single filename as an argument and reads commands +and bindings from that file. For example, the following directive +would read \fI/etc/inputrc\fP: +.sp 1 +.RS +.nf +\fB$include\fP \^ \fI/etc/inputrc\fP +.fi +.RE +.SS Searching +.PP +Readline provides commands for searching through the command history +(see +.SM +.B HISTORY +below) for lines containing a specified string. +There are two search modes: +.I incremental +and +.IR non-incremental . +.PP +Incremental searches begin before the user has finished typing the +search string. +As each character of the search string is typed, readline displays +the next entry from the history matching the string typed so far. +An incremental search requires only as many characters as needed to +find the desired history entry. +The characters present in the value of the \fBisearch-terminators\fP +variable are used to terminate an incremental search. +If that variable has not been assigned a value the Escape and +Control-J characters will terminate an incremental search. +Control-G will abort an incremental search and restore the original +line. +When the search is terminated, the history entry containing the +search string becomes the current line. +.PP +To find other matching entries in the history list, type Control-S or +Control-R as appropriate. +This will search backward or forward in the history for the next +entry matching the search string typed so far. +Any other key sequence bound to a readline command will terminate +the search and execute that command. +For instance, a \fInewline\fP will terminate the search and accept +the line, thereby executing the command from the history list. +.PP +Readline remembers the last incremental search string. If two +Control-Rs are typed without any intervening characters defining a +new search string, any remembered search string is used. +.PP +Non-incremental searches read the entire search string before starting +to search for matching history lines. The search string may be +typed by the user or be part of the contents of the current line. +.SS "Readline Command Names" +.PP +The following is a list of the names of the commands and the default +key sequences to which they are bound. +Command names without an accompanying key sequence are unbound by default. +In the following descriptions, \fIpoint\fP refers to the current cursor +position, and \fImark\fP refers to a cursor position saved by the +\fBset\-mark\fP command. +The text between the point and mark is referred to as the \fIregion\fP. +.SS Commands for Moving +.PP +.PD 0 +.TP +.B beginning\-of\-line (C\-a) +Move to the start of the current line. +.TP +.B end\-of\-line (C\-e) +Move to the end of the line. +.TP +.B forward\-char (C\-f) +Move forward a character. +.TP +.B backward\-char (C\-b) +Move back a character. +.TP +.B forward\-word (M\-f) +Move forward to the end of the next word. Words are composed of +alphanumeric characters (letters and digits). +.TP +.B backward\-word (M\-b) +Move back to the start of the current or previous word. Words are +composed of alphanumeric characters (letters and digits). +.TP +.B clear\-screen (C\-l) +Clear the screen leaving the current line at the top of the screen. +With an argument, refresh the current line without clearing the +screen. +.TP +.B redraw\-current\-line +Refresh the current line. +.PD +.SS Commands for Manipulating the History +.PP +.PD 0 +.TP +.B accept\-line (Newline, Return) +Accept the line regardless of where the cursor is. If this line is +non-empty, add it to the history list according to the state of the +.SM +.B HISTCONTROL +variable. If the line is a modified history +line, then restore the history line to its original state. +.TP +.B previous\-history (C\-p) +Fetch the previous command from the history list, moving back in +the list. +.TP +.B next\-history (C\-n) +Fetch the next command from the history list, moving forward in the +list. +.TP +.B beginning\-of\-history (M\-<) +Move to the first line in the history. +.TP +.B end\-of\-history (M\->) +Move to the end of the input history, i.e., the line currently being +entered. +.TP +.B reverse\-search\-history (C\-r) +Search backward starting at the current line and moving `up' through +the history as necessary. This is an incremental search. +.TP +.B forward\-search\-history (C\-s) +Search forward starting at the current line and moving `down' through +the history as necessary. This is an incremental search. +.TP +.B non\-incremental\-reverse\-search\-history (M\-p) +Search backward through the history starting at the current line +using a non-incremental search for a string supplied by the user. +.TP +.B non\-incremental\-forward\-search\-history (M\-n) +Search forward through the history using a non-incremental search for +a string supplied by the user. +.TP +.B history\-search\-forward +Search forward through the history for the string of characters +between the start of the current line and the point. +This is a non-incremental search. +.TP +.B history\-search\-backward +Search backward through the history for the string of characters +between the start of the current line and the point. +This is a non-incremental search. +.TP +.B yank\-nth\-arg (M\-C\-y) +Insert the first argument to the previous command (usually +the second word on the previous line) at point. +With an argument +.IR n , +insert the \fIn\fPth word from the previous command (the words +in the previous command begin with word 0). A negative argument +inserts the \fIn\fPth word from the end of the previous command. +.TP +.B +yank\-last\-arg (M\-.\^, M\-_\^) +Insert the last argument to the previous command (the last word of +the previous history entry). With an argument, +behave exactly like \fByank\-nth\-arg\fP. +Successive calls to \fByank\-last\-arg\fP move back through the history +list, inserting the last argument of each line in turn. +.TP +.B shell\-expand\-line (M\-C\-e) +Expand the line as the shell does. This +performs alias and history expansion as well as all of the shell +word expansions. See +.SM +.B HISTORY EXPANSION +below for a description of history expansion. +.TP +.B history\-expand\-line (M\-^) +Perform history expansion on the current line. +See +.SM +.B HISTORY EXPANSION +below for a description of history expansion. +.TP +.B magic\-space +Perform history expansion on the current line and insert a space. +See +.SM +.B HISTORY EXPANSION +below for a description of history expansion. +.TP +.B alias\-expand\-line +Perform alias expansion on the current line. +See +.SM +.B ALIASES +above for a description of alias expansion. +.TP +.B history\-and\-alias\-expand\-line +Perform history and alias expansion on the current line. +.TP +.B insert\-last\-argument (M\-.\^, M\-_\^) +A synonym for \fByank\-last\-arg\fP. +.TP +.B operate\-and\-get\-next (C\-o) +Accept the current line for execution and fetch the next line +relative to the current line from the history for editing. Any +argument is ignored. +.TP +.B edit\-and\-execute\-command (C\-xC\-e) +Invoke an editor on the current command line, and execute the result as shell +commands. +\fBBash\fP attempts to invoke +.SM +.BR $FCEDIT , +.SM +.BR $EDITOR , +and \fIemacs\fP as the editor, in that order. +.PD +.SS Commands for Changing Text +.PP +.PD 0 +.TP +.B delete\-char (C\-d) +Delete the character at point. If point is at the +beginning of the line, there are no characters in the line, and +the last character typed was not bound to \fBdelete\-char\fP, +then return +.SM +.BR EOF . +.TP +.B backward\-delete\-char (Rubout) +Delete the character behind the cursor. When given a numeric argument, +save the deleted text on the kill ring. +.TP +.B forward\-backward\-delete\-char +Delete the character under the cursor, unless the cursor is at the +end of the line, in which case the character behind the cursor is +deleted. +.TP +.B quoted\-insert (C\-q, C\-v) +Add the next character typed to the line verbatim. This is +how to insert characters like \fBC\-q\fP, for example. +.TP +.B tab\-insert (C\-v TAB) +Insert a tab character. +.TP +.B self\-insert (a,\ b,\ A,\ 1,\ !,\ ...) +Insert the character typed. +.TP +.B transpose\-chars (C\-t) +Drag the character before point forward over the character at point, +moving point forward as well. +If point is at the end of the line, then this transposes +the two characters before point. +Negative arguments have no effect. +.TP +.B transpose\-words (M\-t) +Drag the word before point past the word after point, +moving point over that word as well. +If point is at the end of the line, this transposes +the last two words on the line. +.TP +.B upcase\-word (M\-u) +Uppercase the current (or following) word. With a negative argument, +uppercase the previous word, but do not move point. +.TP +.B downcase\-word (M\-l) +Lowercase the current (or following) word. With a negative argument, +lowercase the previous word, but do not move point. +.TP +.B capitalize\-word (M\-c) +Capitalize the current (or following) word. With a negative argument, +capitalize the previous word, but do not move point. +.TP +.B overwrite\-mode +Toggle overwrite mode. With an explicit positive numeric argument, +switches to overwrite mode. With an explicit non-positive numeric +argument, switches to insert mode. This command affects only +\fBemacs\fP mode; \fBvi\fP mode does overwrite differently. +Each call to \fIreadline()\fP starts in insert mode. +In overwrite mode, characters bound to \fBself\-insert\fP replace +the text at point rather than pushing the text to the right. +Characters bound to \fBbackward\-delete\-char\fP replace the character +before point with a space. By default, this command is unbound. +.PD +.SS Killing and Yanking +.PP +.PD 0 +.TP +.B kill\-line (C\-k) +Kill the text from point to the end of the line. +.TP +.B backward\-kill\-line (C\-x Rubout) +Kill backward to the beginning of the line. +.TP +.B unix\-line\-discard (C\-u) +Kill backward from point to the beginning of the line. +The killed text is saved on the kill-ring. +.\" There is no real difference between this and backward-kill-line +.TP +.B kill\-whole\-line +Kill all characters on the current line, no matter where point is. +.TP +.B kill\-word (M\-d) +Kill from point to the end of the current word, or if between +words, to the end of the next word. +Word boundaries are the same as those used by \fBforward\-word\fP. +.TP +.B backward\-kill\-word (M\-Rubout) +Kill the word behind point. +Word boundaries are the same as those used by \fBbackward\-word\fP. +.TP +.B unix\-word\-rubout (C\-w) +Kill the word behind point, using white space as a word boundary. +The killed text is saved on the kill-ring. +.TP +.B delete\-horizontal\-space (M\-\e) +Delete all spaces and tabs around point. +.TP +.B kill\-region +Kill the text in the current region. +.TP +.B copy\-region\-as\-kill +Copy the text in the region to the kill buffer. +.TP +.B copy\-backward\-word +Copy the word before point to the kill buffer. +The word boundaries are the same as \fBbackward\-word\fP. +.TP +.B copy\-forward\-word +Copy the word following point to the kill buffer. +The word boundaries are the same as \fBforward\-word\fP. +.TP +.B yank (C\-y) +Yank the top of the kill ring into the buffer at point. +.TP +.B yank\-pop (M\-y) +Rotate the kill ring, and yank the new top. Only works following +.B yank +or +.BR yank\-pop . +.PD +.SS Numeric Arguments +.PP +.PD 0 +.TP +.B digit\-argument (M\-0, M\-1, ..., M\-\-) +Add this digit to the argument already accumulating, or start a new +argument. M\-\- starts a negative argument. +.TP +.B universal\-argument +This is another way to specify an argument. +If this command is followed by one or more digits, optionally with a +leading minus sign, those digits define the argument. +If the command is followed by digits, executing +.B universal\-argument +again ends the numeric argument, but is otherwise ignored. +As a special case, if this command is immediately followed by a +character that is neither a digit or minus sign, the argument count +for the next command is multiplied by four. +The argument count is initially one, so executing this function the +first time makes the argument count four, a second time makes the +argument count sixteen, and so on. +.PD +.SS Completing +.PP +.PD 0 +.TP +.B complete (TAB) +Attempt to perform completion on the text before point. +.B Bash +attempts completion treating the text as a variable (if the +text begins with \fB$\fP), username (if the text begins with +\fB~\fP), hostname (if the text begins with \fB@\fP), or +command (including aliases and functions) in turn. If none +of these produces a match, filename completion is attempted. +.TP +.B possible\-completions (M\-?) +List the possible completions of the text before point. +.TP +.B insert\-completions (M\-*) +Insert all completions of the text before point +that would have been generated by +\fBpossible\-completions\fP. +.TP +.B menu\-complete +Similar to \fBcomplete\fP, but replaces the word to be completed +with a single match from the list of possible completions. +Repeated execution of \fBmenu\-complete\fP steps through the list +of possible completions, inserting each match in turn. +At the end of the list of completions, the bell is rung +(subject to the setting of \fBbell\-style\fP) +and the original text is restored. +An argument of \fIn\fP moves \fIn\fP positions forward in the list +of matches; a negative argument may be used to move backward +through the list. +This command is intended to be bound to \fBTAB\fP, but is unbound +by default. +.TP +.B delete\-char\-or\-list +Deletes the character under the cursor if not at the beginning or +end of the line (like \fBdelete\-char\fP). +If at the end of the line, behaves identically to +\fBpossible\-completions\fP. +This command is unbound by default. +.TP +.B complete\-filename (M\-/) +Attempt filename completion on the text before point. +.TP +.B possible\-filename\-completions (C\-x /) +List the possible completions of the text before point, +treating it as a filename. +.TP +.B complete\-username (M\-~) +Attempt completion on the text before point, treating +it as a username. +.TP +.B possible\-username\-completions (C\-x ~) +List the possible completions of the text before point, +treating it as a username. +.TP +.B complete\-variable (M\-$) +Attempt completion on the text before point, treating +it as a shell variable. +.TP +.B possible\-variable\-completions (C\-x $) +List the possible completions of the text before point, +treating it as a shell variable. +.TP +.B complete\-hostname (M\-@) +Attempt completion on the text before point, treating +it as a hostname. +.TP +.B possible\-hostname\-completions (C\-x @) +List the possible completions of the text before point, +treating it as a hostname. +.TP +.B complete\-command (M\-!) +Attempt completion on the text before point, treating +it as a command name. Command completion attempts to +match the text against aliases, reserved words, shell +functions, shell builtins, and finally executable filenames, +in that order. +.TP +.B possible\-command\-completions (C\-x !) +List the possible completions of the text before point, +treating it as a command name. +.TP +.B dynamic\-complete\-history (M\-TAB) +Attempt completion on the text before point, comparing +the text against lines from the history list for possible +completion matches. +.TP +.B complete\-into\-braces (M\-{) +Perform filename completion and insert the list of possible completions +enclosed within braces so the list is available to the shell (see +.B Brace Expansion +above). +.PD +.SS Keyboard Macros +.PP +.PD 0 +.TP +.B start\-kbd\-macro (C\-x (\^) +Begin saving the characters typed into the current keyboard macro. +.TP +.B end\-kbd\-macro (C\-x )\^) +Stop saving the characters typed into the current keyboard macro +and store the definition. +.TP +.B call\-last\-kbd\-macro (C\-x e) +Re-execute the last keyboard macro defined, by making the characters +in the macro appear as if typed at the keyboard. +.PD +.SS Miscellaneous +.PP +.PD 0 +.TP +.B re\-read\-init\-file (C\-x C\-r) +Read in the contents of the \fIinputrc\fP file, and incorporate +any bindings or variable assignments found there. +.TP +.B abort (C\-g) +Abort the current editing command and +ring the terminal's bell (subject to the setting of +.BR bell\-style ). +.TP +.B do\-uppercase\-version (M\-a, M\-b, M\-\fIx\fP, ...) +If the metafied character \fIx\fP is lowercase, run the command +that is bound to the corresponding uppercase character. +.TP +.B prefix\-meta (ESC) +Metafy the next character typed. +.SM +.B ESC +.B f +is equivalent to +.BR Meta\-f . +.TP +.B undo (C\-_, C\-x C\-u) +Incremental undo, separately remembered for each line. +.TP +.B revert\-line (M\-r) +Undo all changes made to this line. This is like executing the +.B undo +command enough times to return the line to its initial state. +.TP +.B tilde\-expand (M\-&) +Perform tilde expansion on the current word. +.TP +.B set\-mark (C\-@, M\-) +Set the mark to the point. If a +numeric argument is supplied, the mark is set to that position. +.TP +.B exchange\-point\-and\-mark (C\-x C\-x) +Swap the point with the mark. The current cursor position is set to +the saved position, and the old cursor position is saved as the mark. +.TP +.B character\-search (C\-]) +A character is read and point is moved to the next occurrence of that +character. A negative count searches for previous occurrences. +.TP +.B character\-search\-backward (M\-C\-]) +A character is read and point is moved to the previous occurrence of that +character. A negative count searches for subsequent occurrences. +.TP +.B insert\-comment (M\-#) +Without a numeric argument, the value of the readline +.B comment\-begin +variable is inserted at the beginning of the current line. +If a numeric argument is supplied, this command acts as a toggle: if +the characters at the beginning of the line do not match the value +of \fBcomment\-begin\fP, the value is inserted, otherwise +the characters in \fBcomment-begin\fP are deleted from the beginning of +the line. +In either case, the line is accepted as if a newline had been typed. +The default value of +\fBcomment\-begin\fP causes this command to make the current line +a shell comment. +If a numeric argument causes the comment character to be removed, the line +will be executed by the shell. +.TP +.B glob\-complete\-word (M\-g) +The word before point is treated as a pattern for pathname expansion, +with an asterisk implicitly appended. This pattern is used to +generate a list of matching file names for possible completions. +.TP +.B glob\-expand\-word (C\-x *) +The word before point is treated as a pattern for pathname expansion, +and the list of matching file names is inserted, replacing the word. +If a numeric argument is supplied, an asterisk is appended before +pathname expansion. +.TP +.B glob\-list\-expansions (C\-x g) +The list of expansions that would have been generated by +.B glob\-expand\-word +is displayed, and the line is redrawn. +If a numeric argument is supplied, an asterisk is appended before +pathname expansion. +.TP +.B dump\-functions +Print all of the functions and their key bindings to the +readline output stream. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an \fIinputrc\fP file. +.TP +.B dump\-variables +Print all of the settable readline variables and their values to the +readline output stream. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an \fIinputrc\fP file. +.TP +.B dump\-macros +Print all of the readline key sequences bound to macros and the +strings they ouput. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an \fIinputrc\fP file. +.TP +.B display\-shell\-version (C\-x C\-v) +Display version information about the current instance of +.BR bash . +.PD +.SS Programmable Completion +.PP +When word completion is attempted for an argument to a command for +which a completion specification (a \fIcompspec\fP) has been defined +using the \fBcomplete\fP builtin (see +.SM +.B "SHELL BUILTIN COMMANDS" +below), the programmable completion facilities are invoked. +.PP +First, the command name is identified. +If a compspec has been defined for that command, the +compspec is used to generate the list of possible completions for the word. +If the command word is a full pathname, a compspec for the full +pathname is searched for first. +If no compspec is found for the full pathname, an attempt is made to +find a compspec for the portion following the final slash. +.PP +Once a compspec has been found, it is used to generate the list of +matching words. +If a compspec is not found, the default \fBbash\fP completion as +described above under \fBCompleting\fP is performed. +.PP +First, the actions specified by the compspec are used. +Only matches which are prefixed by the word being completed are +returned. +When the +.B \-f +or +.B \-d +option is used for filename or directory name completion, the shell +variable +.SM +.B FIGNORE +is used to filter the matches. +.PP +Any completions specified by a filename expansion pattern to the +\fB\-G\fP option are generated next. +The words generated by the pattern need not match the word +being completed. +The +.SM +.B GLOBIGNORE +shell variable is not used to filter the matches, but the +.SM +.B FIGNORE +variable is used. +.PP +Next, the string specified as the argument to the \fB\-W\fP option +is considered. +The string is first split using the characters in the +.SM +.B IFS +special variable as delimiters. +Shell quoting is honored. +Each word is then expanded using +brace expansion, tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and pathname expansion, +as described above under +.SM +.BR EXPANSION . +The results are split using the rules described above under +\fBWord Splitting\fP. +The results of the expansion are prefix-matched against the word being +completed, and the matching words become the possible completions. +.PP +After these matches have been generated, any shell function or command +specified with the \fB\-F\fP and \fB\-C\fP options is invoked. +When the command or function is invoked, the +.SM +.B COMP_LINE +and +.SM +.B COMP_POINT +variables are assigned values as described above under +\fBShell Variables\fP. +If a shell function is being invoked, the +.SM +.B COMP_WORDS +and +.SM +.B COMP_CWORD +variables are also set. +When the function or command is invoked, the first argument is the +name of the command whose arguments are being completed, the +second argument is the word being completed, and the third argument +is the word preceding the word being completed on the current command line. +No filtering of the generated completions against the word being completed +is performed; the function or command has complete freedom in generating +the matches. +.PP +Any function specified with \fB\-F\fP is invoked first. +The function may use any of the shell facilities, including the +\fBcompgen\fP builtin described below, to generate the matches. +It must put the possible completions in the +.SM +.B COMPREPLY +array variable. +.PP +Next, any command specified with the \fB\-C\fP option is invoked +in an environment equivalent to command substitution. +It should print a list of completions, one per line, to the +standard output. +Backslash may be used to escape a newline, if necessary. +.PP +After all of the possible completions are generated, any filter +specified with the \fB\-X\fP option is applied to the list. +The filter is a pattern as used for pathname expansion; a \fB&\fP +in the pattern is replaced with the text of the word being completed. +A literal \fB&\fP may be escaped with a backslash; the backslash +is removed before attempting a match. +Any completion that matches the pattern will be removed from the list. +A leading \fB!\fP negates the pattern; in this case any completion +not matching the pattern will be removed. +.PP +Finally, any prefix and suffix specified with the \fB\-P\fP and \fB\-S\fP +options are added to each member of the completion list, and the result is +returned to the readline completion code as the list of possible +completions. +.PP +If the previously-applied actions do not generate any matches, and the +\fB\-o dirnames\fP option was supplied to \fBcomplete\fP when the +compspec was defined, directory name completion is attempted. +.PP +By default, if a compspec is found, whatever it generates is returned +to the completion code as the full set of possible completions. +The default \fBbash\fP completions are not attempted, and the readline +default of filename completion is disabled. +If the \fB-o default\fP option was supplied to \fBcomplete\fP when the +compspec was defined, readline's default completion will be performed +if the compspec generates no matches. +.PP +When a compspec indicates that directory name completion is desired, +the programmable completion functions force readline to append a slash +to completed names which are symbolic links to directories, subject to +the value of the \fBmark\-directories\fP readline variable, regardless +of the setting of the \fBmark-symlinked\-directories\fP readline variable. +.SH HISTORY +When the +.B \-o history +option to the +.B set +builtin is enabled, the shell provides access to the +\fIcommand history\fP, +the list of commands previously typed. +The value of the \fBHISTSIZE\fP variable is used as the +number of commands to save in a history list. +The text of the last +.SM +.B HISTSIZE +commands (default 500) is saved. The shell +stores each command in the history list prior to parameter and +variable expansion (see +.SM +.B EXPANSION +above) but after history expansion is performed, subject to the +values of the shell variables +.SM +.B HISTIGNORE +and +.SM +.BR HISTCONTROL . +.PP +On startup, the history is initialized from the file named by +the variable +.SM +.B HISTFILE +(default \fI~/.bash_history\fP). +The file named by the value of +.SM +.B HISTFILE +is truncated, if necessary, to contain no more than +the number of lines specified by the value of +.SM +.BR HISTFILESIZE . +When an interactive shell exits, the last +.SM +.B $HISTSIZE +lines are copied from the history list to +.SM +.BR $HISTFILE . +If the +.B histappend +shell option is enabled +(see the description of +.B shopt +under +.SM +.B "SHELL BUILTIN COMMANDS" +below), the lines are appended to the history file, +otherwise the history file is overwritten. +If +.SM +.B HISTFILE +is unset, or if the history file is unwritable, the history is +not saved. After saving the history, the history file is truncated +to contain no more than +.SM +.B HISTFILESIZE +lines. If +.SM +.B HISTFILESIZE +is not set, no truncation is performed. +.PP +The builtin command +.B fc +(see +.SM +.B SHELL BUILTIN COMMANDS +below) may be used to list or edit and re-execute a portion of +the history list. +The +.B history +builtin may be used to display or modify the history list and +manipulate the history file. +When using command-line editing, search commands +are available in each editing mode that provide access to the +history list. +.PP +The shell allows control over which commands are saved on the history +list. The +.SM +.B HISTCONTROL +and +.SM +.B HISTIGNORE +variables may be set to cause the shell to save only a subset of the +commands entered. +The +.B cmdhist +shell option, if enabled, causes the shell to attempt to save each +line of a multi-line command in the same history entry, adding +semicolons where necessary to preserve syntactic correctness. +The +.B lithist +shell option causes the shell to save the command with embedded newlines +instead of semicolons. See the description of the +.B shopt +builtin below under +.SM +.B "SHELL BUILTIN COMMANDS" +for information on setting and unsetting shell options. +.SH "HISTORY EXPANSION" +.PP +The shell supports a history expansion feature that +is similar to the history expansion in +.BR csh. +This section describes what syntax features are available. This +feature is enabled by default for interactive shells, and can be +disabled using the +.B \+H +option to the +.B set +builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). Non-interactive shells do not perform history expansion +by default. +.PP +History expansions introduce words from the history list into +the input stream, making it easy to repeat commands, insert the +arguments to a previous command into the current input line, or +fix errors in previous commands quickly. +.PP +History expansion is performed immediately after a complete line +is read, before the shell breaks it into words. +It takes place in two parts. +The first is to determine which line from the history list +to use during substitution. +The second is to select portions of that line for inclusion into +the current one. +The line selected from the history is the \fIevent\fP, +and the portions of that line that are acted upon are \fIwords\fP. +Various \fImodifiers\fP are available to manipulate the selected words. +The line is broken into words in the same fashion as when reading input, +so that several \fImetacharacter\fP-separated words surrounded by +quotes are considered one word. +History expansions are introduced by the appearance of the +history expansion character, which is \^\fB!\fP\^ by default. +Only backslash (\^\fB\e\fP\^) and single quotes can quote +the history expansion character. +.PP +Several shell options settable with the +.B shopt +builtin may be used to tailor the behavior of history expansion. +If the +.B histverify +shell option is enabled (see the description of the +.B shopt +builtin), and +.B readline +is being used, history substitutions are not immediately passed to +the shell parser. +Instead, the expanded line is reloaded into the +.B readline +editing buffer for further modification. +If +.B readline +is being used, and the +.B histreedit +shell option is enabled, a failed history substitution will be reloaded +into the +.B readline +editing buffer for correction. +The +.B \-p +option to the +.B history +builtin command may be used to see what a history expansion will +do before using it. +The +.B \-s +option to the +.B history +builtin may be used to add commands to the end of the history list +without actually executing them, so that they are available for +subsequent recall. +.PP +The shell allows control of the various characters used by the +history expansion mechanism (see the description of +.B histchars +above under +.BR "Shell Variables" ). +.SS Event Designators +.PP +An event designator is a reference to a command line entry in the +history list. +.PP +.PD 0 +.TP +.B ! +Start a history substitution, except when followed by a +.BR blank , +newline, = or (. +.TP +.B !\fIn\fR +Refer to command line +.IR n . +.TP +.B !\-\fIn\fR +Refer to the current command line minus +.IR n . +.TP +.B !! +Refer to the previous command. This is a synonym for `!\-1'. +.TP +.B !\fIstring\fR +Refer to the most recent command starting with +.IR string . +.TP +.B !?\fIstring\fR\fB[?]\fR +Refer to the most recent command containing +.IR string . +The trailing \fB?\fP may be omitted if +.I string +is followed immediately by a newline. +.TP +.B \d\s+2^\s-2\u\fIstring1\fP\d\s+2^\s-2\u\fIstring2\fP\d\s+2^\s-2\u +Quick substitution. Repeat the last command, replacing +.I string1 +with +.IR string2 . +Equivalent to +``!!:s/\fIstring1\fP/\fIstring2\fP/'' +(see \fBModifiers\fP below). +.TP +.B !# +The entire command line typed so far. +.PD +.SS Word Designators +.PP +Word designators are used to select desired words from the event. +A +.B : +separates the event specification from the word designator. +It may be omitted if the word designator begins with a +.BR ^ , +.BR $ , +.BR * , +.BR \- , +or +.BR % . +Words are numbered from the beginning of the line, +with the first word being denoted by 0 (zero). +Words are inserted into the current line separated by single spaces. +.PP +.PD 0 +.TP +.B 0 (zero) +The zeroth word. For the shell, this is the command +word. +.TP +.I n +The \fIn\fRth word. +.TP +.B ^ +The first argument. That is, word 1. +.TP +.B $ +The last argument. +.TP +.B % +The word matched by the most recent `?\fIstring\fR?' search. +.TP +.I x\fB\-\fPy +A range of words; `\-\fIy\fR' abbreviates `0\-\fIy\fR'. +.TP +.B * +All of the words but the zeroth. This is a synonym +for `\fI1\-$\fP'. It is not an error to use +.B * +if there is just one +word in the event; the empty string is returned in that case. +.TP +.B x* +Abbreviates \fIx\-$\fP. +.TP +.B x\- +Abbreviates \fIx\-$\fP like \fBx*\fP, but omits the last word. +.PD +.PP +If a word designator is supplied without an event specification, the +previous command is used as the event. +.SS Modifiers +.PP +After the optional word designator, there may appear a sequence of +one or more of the following modifiers, each preceded by a `:'. +.PP +.PD 0 +.PP +.TP +.B h +Remove a trailing file name component, leaving only the head. +.TP +.B t +Remove all leading file name components, leaving the tail. +.TP +.B r +Remove a trailing suffix of the form \fI.xxx\fP, leaving the +basename. +.TP +.B e +Remove all but the trailing suffix. +.TP +.B p +Print the new command but do not execute it. +.TP +.B q +Quote the substituted words, escaping further substitutions. +.TP +.B x +Quote the substituted words as with +.BR q , +but break into words at +.B blanks +and newlines. +.TP +.B s/\fIold\fP/\fInew\fP/ +Substitute +.I new +for the first occurrence of +.I old +in the event line. Any delimiter can be used in place of /. The +final delimiter is optional if it is the last character of the +event line. The delimiter may be quoted in +.I old +and +.I new +with a single backslash. If & appears in +.IR new , +it is replaced by +.IR old . +A single backslash will quote the &. If +.I old +is null, it is set to the last +.I old +substituted, or, if no previous history substitutions took place, +the last +.I string +in a +.B !?\fIstring\fR\fB[?]\fR +search. +.TP +.B & +Repeat the previous substitution. +.TP +.B g +Cause changes to be applied over the entire event line. This is +used in conjunction with `\fB:s\fP' (e.g., `\fB:gs/\fIold\fP/\fInew\fP/\fR') +or `\fB:&\fP'. If used with +`\fB:s\fP', any delimiter can be used +in place of /, and the final delimiter is optional +if it is the last character of the event line. +.PD +.SH "SHELL BUILTIN COMMANDS" +.\" start of bash_builtins +.zZ +.PP +Unless otherwise noted, each builtin command documented in this +section as accepting options preceded by +.B \- +accepts +.B \-\- +to signify the end of the options. +.sp .5 +.PD 0 +.TP +\fB:\fP [\fIarguments\fP] +.PD +No effect; the command does nothing beyond expanding +.I arguments +and performing any specified +redirections. A zero exit code is returned. +.TP +\fB .\| \fP \fIfilename\fP [\fIarguments\fP] +.PD 0 +.TP +\fBsource\fP \fIfilename\fP [\fIarguments\fP] +.PD +Read and execute commands from +.I filename +in the current +shell environment and return the exit status of the last command +executed from +.IR filename . +If +.I filename +does not contain a slash, file names in +.SM +.B PATH +are used to find the directory containing +.IR filename . +The file searched for in +.SM +.B PATH +need not be executable. +When \fBbash\fP is not in \fIposix mode\fP, the current directory is +searched if no file is found in +.SM +.BR PATH . +If the +.B sourcepath +option to the +.B shopt +builtin command is turned off, the +.SM +.B PATH +is not searched. +If any \fIarguments\fP are supplied, they become the positional +parameters when \fIfilename\fP is executed. Otherwise the positional +parameters are unchanged. +The return status is the status of the last command exited within +the script (0 if no commands are executed), and false if +.I filename +is not found or cannot be read. +.TP +\fBalias\fP [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...] +\fBAlias\fP with no arguments or with the +.B \-p +option prints the list of aliases in the form +\fBalias\fP \fIname\fP=\fIvalue\fP on standard output. +When arguments are supplied, an alias is defined for +each \fIname\fP whose \fIvalue\fP is given. +A trailing space in \fIvalue\fP causes the next word to be +checked for alias substitution when the alias is expanded. +For each \fIname\fP in the argument list for which no \fIvalue\fP +is supplied, the name and value of the alias is printed. +\fBAlias\fP returns true unless a \fIname\fP is given for which +no alias has been defined. +.TP +\fBbg\fP [\fIjobspec\fP] +Resume the suspended job \fIjobspec\fP in the background, as if it +had been started with +.BR & . +If \fIjobspec\fP is not present, the shell's notion of the +\fIcurrent job\fP is used. +.B bg +.I jobspec +returns 0 unless run when job control is disabled or, when run with +job control enabled, if \fIjobspec\fP was not found or started without +job control. +.TP +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-lpsvPSV\fP] +.PD 0 +.TP +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-q\fP \fIfunction\fP] [\fB\-u\fP \fIfunction\fP] [\fB\-r\fP \fIkeyseq\fP] +.TP +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fB\-f\fP \fIfilename\fP +.TP +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fB\-x\fP \fIkeyseq\fP:\fIshell\-command\fP +.TP +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fIkeyseq\fP:\fIfunction\-name\fP +.TP +\fBbind\fP \fIreadline\-command\fP +.PD +Display current +.B readline +key and function bindings, bind a key sequence to a +.B readline +function or macro, or set a +.B readline +variable. +Each non-option argument is a command as it would appear in +.IR .inputrc , +but each binding or command must be passed as a separate argument; +e.g., '"\eC\-x\eC\-r": re\-read\-init\-file'. +Options, if supplied, have the following meanings: +.RS +.PD 0 +.TP +.B \-m \fIkeymap\fP +Use +.I keymap +as the keymap to be affected by the subsequent bindings. +Acceptable +.I keymap +names are +\fIemacs, emacs\-standard, emacs\-meta, emacs\-ctlx, vi, +vi\-move, vi\-command\fP, and +.IR vi\-insert . +\fIvi\fP is equivalent to \fIvi\-command\fP; \fIemacs\fP is +equivalent to \fIemacs\-standard\fP. +.TP +.B \-l +List the names of all \fBreadline\fP functions. +.TP +.B \-p +Display \fBreadline\fP function names and bindings in such a way +that they can be re-read. +.TP +.B \-P +List current \fBreadline\fP function names and bindings. +.TP +.B \-v +Display \fBreadline\fP variable names and values in such a way that they +can be re-read. +.TP +.B \-V +List current \fBreadline\fP variable names and values. +.TP +.B \-s +Display \fBreadline\fP key sequences bound to macros and the strings +they output in such a way that they can be re-read. +.TP +.B \-S +Display \fBreadline\fP key sequences bound to macros and the strings +they output. +.TP +.B \-f \fIfilename\fP +Read key bindings from \fIfilename\fP. +.TP +.B \-q \fIfunction\fP +Query about which keys invoke the named \fIfunction\fP. +.TP +.B \-u \fIfunction\fP +Unbind all keys bound to the named \fIfunction\fP. +.TP +.B \-r \fIkeyseq\fP +Remove any current binding for \fIkeyseq\fP. +.TP +.B \-x \fIkeyseq\fP:\fIshell\-command\fP +Cause \fIshell\-command\fP to be executed whenever \fIkeyseq\fP is +entered. +.PD +.PP +The return value is 0 unless an unrecognized option is given or an +error occurred. +.RE +.TP +\fBbreak\fP [\fIn\fP] +Exit from within a +.BR for , +.BR while , +.BR until , +or +.B select +loop. If \fIn\fP is specified, break \fIn\fP levels. +.I n +must be \(>= 1. If +.I n +is greater than the number of enclosing loops, all enclosing loops +are exited. The return value is 0 unless the shell is not executing +a loop when +.B break +is executed. +.TP +\fBbuiltin\fP \fIshell\-builtin\fP [\fIarguments\fP] +Execute the specified shell builtin, passing it +.IR arguments , +and return its exit status. +This is useful when defining a +function whose name is the same as a shell builtin, +retaining the functionality of the builtin within the function. +The \fBcd\fP builtin is commonly redefined this way. +The return status is false if +.I shell\-builtin +is not a shell builtin command. +.TP +\fBcd\fP [\fB\-L|-P\fP] [\fIdir\fP] +Change the current directory to \fIdir\fP. The variable +.SM +.B HOME +is the +default +.IR dir . +The variable +.SM +.B CDPATH +defines the search path for the directory containing +.IR dir . +Alternative directory names in +.SM +.B CDPATH +are separated by a colon (:). A null directory name in +.SM +.B CDPATH +is the same as the current directory, i.e., ``\fB.\fP''. If +.I dir +begins with a slash (/), +then +.SM +.B CDPATH +is not used. The +.B \-P +option says to use the physical directory structure instead of +following symbolic links (see also the +.B \-P +option to the +.B set +builtin command); the +.B \-L +option forces symbolic links to be followed. An argument of +.B \- +is equivalent to +.SM +.BR $OLDPWD . +The return value is true if the directory was successfully changed; +false otherwise. +.TP +\fBcommand\fP [\fB\-pVv\fP] \fIcommand\fP [\fIarg\fP ...] +Run +.I command +with +.I args +suppressing the normal shell function lookup. Only builtin +commands or commands found in the +.SM +.B PATH +are executed. If the +.B \-p +option is given, the search for +.I command +is performed using a default value for +.B PATH +that is guaranteed to find all of the standard utilities. +If either the +.B \-V +or +.B \-v +option is supplied, a description of +.I command +is printed. The +.B \-v +option causes a single word indicating the command or file name +used to invoke +.I command +to be displayed; the +.B \-V +option produces a more verbose description. +If the +.B \-V +or +.B \-v +option is supplied, the exit status is 0 if +.I command +was found, and 1 if not. If neither option is supplied and +an error occurred or +.I command +cannot be found, the exit status is 127. Otherwise, the exit status of the +.B command +builtin is the exit status of +.IR command . +.TP +\fBcompgen\fP [\fIoption\fP] [\fIword\fP] +Generate possible completion matches for \fIword\fP according to +the \fIoption\fPs, which may be any option accepted by the +.B complete +builtin with the exception of \fB\-p\fP and \fB\-r\fP, and write +the matches to the standard output. +When using the \fB\-F\fP or \fB\-C\fP options, the various shell variables +set by the programmable completion facilities, while available, will not +have useful values. +.sp 1 +The matches will be generated in the same way as if the programmable +completion code had generated them directly from a completion specification +with the same flags. +If \fIword\fP is specified, only those completions matching \fIword\fP +will be displayed. +.sp 1 +The return value is true unless an invalid option is supplied, or no +matches were generated. +.TP +\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP] +.br +[\fB\-X\fP \fIfilterpat\fP] [\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP] \fIname\fP [\fIname ...\fP] +.PD 0 +.TP +\fBcomplete\fP \fB\-pr\fP [\fIname\fP ...] +.PD +Specify how arguments to each \fIname\fP should be completed. +If the \fB\-p\fP option is supplied, or if no options are supplied, +existing completion specifications are printed in a way that allows +them to be reused as input. +The \fB\-r\fP option removes a completion specification for +each \fIname\fP, or, if no \fIname\fPs are supplied, all +completion specifications. +.sp 1 +The process of applying these completion specifications when word completion +is attempted is described above under \fBProgrammable Completion\fP. +.sp 1 +Other options, if specified, have the following meanings. +The arguments to the \fB\-G\fP, \fB\-W\fP, and \fB\-X\fP options +(and, if necessary, the \fB\-P\fP and \fB\-S\fP options) +should be quoted to protect them from expansion before the +.B complete +builtin is invoked. +.RS +.PD 0 +.TP 8 +\fB\-o\fP \fIcomp-option\fP +The \fIcomp-option\fP controls several aspects of the compspec's behavior +beyond the simple generation of completions. +\fIcomp-option\fP may be one of: +.RS +.TP 8 +.B default +Use readline's default filename completion if the compspec generates +no matches. +.TP 8 +.B dirnames +Perform directory name completion if the compspec generates no matches. +.TP 8 +.B filenames +Tell readline that the compspec generates filenames, so it can perform any +filename\-specific processing (like adding a slash to directory names or +suppressing trailing spaces). Intended to be used with shell functions. +.TP 8 +.B nospace +Tell readline not to append a space (the default) to words completed at +the end of the line. +.RE +.TP 8 +\fB\-A\fP \fIaction\fP +The \fIaction\fP may be one of the following to generate a list of possible +completions: +.RS +.TP 8 +.B alias +Alias names. May also be specified as \fB\-a\fP. +.TP 8 +.B arrayvar +Array variable names. +.TP 8 +.B binding +\fBReadline\fP key binding names. +.TP 8 +.B builtin +Names of shell builtin commands. May also be specified as \fB\-b\fP. +.TP 8 +.B command +Command names. May also be specified as \fB\-c\fP. +.TP 8 +.B directory +Directory names. May also be specified as \fB\-d\fP. +.TP 8 +.B disabled +Names of disabled shell builtins. +.TP 8 +.B enabled +Names of enabled shell builtins. +.TP 8 +.B export +Names of exported shell variables. May also be specified as \fB\-e\fP. +.TP 8 +.B file +File names. May also be specified as \fB\-f\fP. +.TP 8 +.B function +Names of shell functions. +.TP 8 +.B group +Group names. May also be specified as \fB\-g\fP. +.TP 8 +.B helptopic +Help topics as accepted by the \fBhelp\fP builtin. +.TP 8 +.B hostname +Hostnames, as taken from the file specified by the +.SM +.B HOSTFILE +shell variable. +.TP 8 +.B job +Job names, if job control is active. May also be specified as \fB\-j\fP. +.TP 8 +.B keyword +Shell reserved words. May also be specified as \fB\-k\fP. +.TP 8 +.B running +Names of running jobs, if job control is active. +.TP 8 +.B service +Service names. May also be specified as \fB\-s\fP. +.TP 8 +.B setopt +Valid arguments for the \fB\-o\fP option to the \fBset\fP builtin. +.TP 8 +.B shopt +Shell option names as accepted by the \fBshopt\fP builtin. +.TP 8 +.B signal +Signal names. +.TP 8 +.B stopped +Names of stopped jobs, if job control is active. +.TP 8 +.B user +User names. May also be specified as \fB\-u\fP. +.TP 8 +.B variable +Names of all shell variables. May also be specified as \fB\-v\fP. +.RE +.TP 8 +\fB\-G\fP \fIglobpat\fP +The filename expansion pattern \fIglobpat\fP is expanded to generate +the possible completions. +.TP 8 +\fB\-W\fP \fIwordlist\fP +The \fIwordlist\fP is split using the characters in the +.SM +.B IFS +special variable as delimiters, and each resultant word is expanded. +The possible completions are the members of the resultant list which +match the word being completed. +.TP 8 +\fB\-C\fP \fIcommand\fP +\fIcommand\fP is executed in a subshell environment, and its output is +used as the possible completions. +.TP 8 +\fB\-F\fP \fIfunction\fP +The shell function \fIfunction\fP is executed in the current shell +environment. +When it finishes, the possible completions are retrieved from the value +of the +.SM +.B COMPREPLY +array variable. +.TP 8 +\fB\-X\fP \fIfilterpat\fP +\fIfilterpat\fP is a pattern as used for filename expansion. +It is applied to the list of possible completions generated by the +preceding options and arguments, and each completion matching +\fIfilterpat\fP is removed from the list. +A leading \fB!\fP in \fIfilterpat\fP negates the pattern; in this +case, any completion not matching \fIfilterpat\fP is removed. +.TP 8 +\fB\-P\fP \fIprefix\fP +\fIprefix\fP is added at the beginning of each possible completion +after all other options have been applied. +.TP 8 +\fB\-S\fP \fIsuffix\fP +\fIsuffix\fP is appended to each possible completion +after all other options have been applied. +.PD +.PP +The return value is true unless an invalid option is supplied, an option +other than \fB\-p\fP or \fB\-r\fP is supplied without a \fIname\fP +argument, an attempt is made to remove a completion specification for +a \fIname\fP for which no specification exists, or +an error occurs adding a completion specification. +.RE +.TP +\fBcontinue\fP [\fIn\fP] +Resume the next iteration of the enclosing +.BR for , +.BR while , +.BR until , +or +.B select +loop. +If +.I n +is specified, resume at the \fIn\fPth enclosing loop. +.I n +must be \(>= 1. If +.I n +is greater than the number of enclosing loops, the last enclosing loop +(the ``top-level'' loop) is resumed. The return value is 0 unless the +shell is not executing a loop when +.B continue +is executed. +.TP +\fBdeclare\fP [\fB\-afFirtx\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP]] +.PD 0 +.TP +\fBtypeset\fP [\fB\-afFirtx\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP]] +.PD +Declare variables and/or give them attributes. +If no \fIname\fPs are given then display the values of variables. +The +.B \-p +option will display the attributes and values of each +.IR name . +When +.B \-p +is used, additional options are ignored. +The +.B \-F +option inhibits the display of function definitions; only the +function name and attributes are printed. +The +.B \-F +option implies +.BR \-f . +The following options can +be used to restrict output to variables with the specified attribute or +to give variables attributes: +.RS +.PD 0 +.TP +.B \-a +Each \fIname\fP is an array variable (see +.B Arrays +above). +.TP +.B \-f +Use function names only. +.TP +.B \-i +The variable is treated as an integer; arithmetic evaluation (see +.SM +.B "ARITHMETIC EVALUATION" ") " +is performed when the variable is assigned a value. +.TP +.B \-r +Make \fIname\fPs readonly. These names cannot then be assigned values +by subsequent assignment statements or unset. +.TP +.B \-t +Give each \fIname\fP the \fItrace\fP attribute. +Traced functions inherit the \fBDEBUG\fP trap from the calling shell. +The trace attribute has no special meaning for variables. +.TP +.B \-x +Mark \fIname\fPs for export to subsequent commands via the environment. +.PD +.PP +Using `+' instead of `\-' +turns off the attribute instead, with the exception that \fB+a\fP +may not be used to destroy an array variable. When used in a function, +makes each +\fIname\fP local, as with the +.B local +command. The return value is 0 unless an invalid option is encountered, +an attempt is made to define a function using +.if n ``\-f foo=bar'', +.if t \f(CW\-f foo=bar\fP, +an attempt is made to assign a value to a readonly variable, +an attempt is made to assign a value to an array variable without +using the compound assignment syntax (see +.B Arrays +above), one of the \fInames\fP is not a valid shell variable name, +an attempt is made to turn off readonly status for a readonly variable, +an attempt is made to turn off array status for an array variable, +or an attempt is made to display a non-existent function with \fB\-f\fP. +.RE +.TP +.B dirs [\fB\-clpv\fP] [+\fIn\fP] [\-\fIn\fP] +Without options, displays the list of currently remembered directories. +The default display is on a single line with directory names separated +by spaces. +Directories are added to the list with the +.B pushd +command; the +.B popd +command removes entries from the list. +.RS +.PD 0 +.TP +\fB+\fP\fIn\fP +Displays the \fIn\fPth entry counting from the left of the list +shown by +.B dirs +when invoked without options, starting with zero. +.TP +\fB\-\fP\fIn\fP +Displays the \fIn\fPth entry counting from the right of the list +shown by +.B dirs +when invoked without options, starting with zero. +.TP +.B \-c +Clears the directory stack by deleting all of the entries. +.TP +.B \-l +Produces a longer listing; the default listing format uses a +tilde to denote the home directory. +.TP +.B \-p +Print the directory stack with one entry per line. +.TP +.B \-v +Print the directory stack with one entry per line, +prefixing each entry with its index in the stack. +.PD +.PP +The return value is 0 unless an +invalid option is supplied or \fIn\fP indexes beyond the end +of the directory stack. +.RE +.TP +\fBdisown\fP [\fB\-ar\fP] [\fB\-h\fP] [\fIjobspec\fP ...] +Without options, each +.I jobspec +is removed from the table of active jobs. +If the \fB\-h\fP option is given, each +.I jobspec +is not removed from the table, but is marked so that +.SM +.B SIGHUP +is not sent to the job if the shell receives a +.SM +.BR SIGHUP . +If no +.I jobspec +is present, and neither the +.B \-a +nor the +.B \-r +option is supplied, the \fIcurrent job\fP is used. +If no +.I jobspec +is supplied, the +.B \-a +option means to remove or mark all jobs; the +.B \-r +option without a +.I jobspec +argument restricts operation to running jobs. +The return value is 0 unless a +.I jobspec +does not specify a valid job. +.TP +\fBecho\fP [\fB\-neE\fP] [\fIarg\fP ...] +Output the \fIarg\fPs, separated by spaces, followed by a newline. +The return status is always 0. +If \fB\-n\fP is specified, the trailing newline is +suppressed. If the \fB\-e\fP option is given, interpretation of +the following backslash-escaped characters is enabled. The +.B \-E +option disables the interpretation of these escape characters, +even on systems where they are interpreted by default. +The \fBxpg_echo\fP shell option may be used to +dynamically determine whether or not \fBecho\fP expands these +escape characters by default. +.B echo +does not interpret +.B \-\- +to mean the end of options. +.B echo +interprets the following escape sequences: +.RS +.PD 0 +.TP +.B \ea +alert (bell) +.TP +.B \eb +backspace +.TP +.B \ec +suppress trailing newline +.TP +.B \ee +an escape character +.TP +.B \ef +form feed +.TP +.B \en +new line +.TP +.B \er +carriage return +.TP +.B \et +horizontal tab +.TP +.B \ev +vertical tab +.TP +.B \e\e +backslash +.TP +.B \e0\fInnn\fP +the eight-bit character whose value is the octal value \fInnn\fP +(zero to three octal digits) +.TP +.B \e\fInnn\fP +the eight-bit character whose value is the octal value \fInnn\fP +(one to three octal digits) +.TP +.B \ex\fIHH\fP +the eight-bit character whose value is the hexadecimal value \fIHH\fP +(one or two hex digits) +.PD +.RE +.TP +\fBenable\fP [\fB\-adnps\fP] [\fB\-f\fP \fIfilename\fP] [\fIname\fP ...] +Enable and disable builtin shell commands. +Disabling a builtin allows a disk command which has the same name +as a shell builtin to be executed without specifying a full pathname, +even though the shell normally searches for builtins before disk commands. +If \fB\-n\fP is used, each \fIname\fP +is disabled; otherwise, +\fInames\fP are enabled. For example, to use the +.B test +binary found via the +.SM +.B PATH +instead of the shell builtin version, run +.if t \f(CWenable -n test\fP. +.if n ``enable -n test''. +The +.B \-f +option means to load the new builtin command +.I name +from shared object +.IR filename , +on systems that support dynamic loading. The +.B \-d +option will delete a builtin previously loaded with +.BR \-f . +If no \fIname\fP arguments are given, or if the +.B \-p +option is supplied, a list of shell builtins is printed. +With no other option arguments, the list consists of all enabled +shell builtins. +If \fB\-n\fP is supplied, only disabled builtins are printed. +If \fB\-a\fP is supplied, the list printed includes all builtins, with an +indication of whether or not each is enabled. +If \fB\-s\fP is supplied, the output is restricted to the POSIX +\fIspecial\fP builtins. +The return value is 0 unless a +.I name +is not a shell builtin or there is an error loading a new builtin +from a shared object. +.TP +\fBeval\fP [\fIarg\fP ...] +The \fIarg\fPs are read and concatenated together into a single +command. This command is then read and executed by the shell, and +its exit status is returned as the value of +.BR eval . +If there are no +.IR args , +or only null arguments, +.B eval +returns 0. +.TP +\fBexec\fP [\fB\-cl\fP] [\fB\-a\fP \fIname\fP] [\fIcommand\fP [\fIarguments\fP]] +If +.I command +is specified, it replaces the shell. +No new process is created. The +.I arguments +become the arguments to \fIcommand\fP. +If the +.B \-l +option is supplied, +the shell places a dash at the beginning of the zeroth arg passed to +.IR command . +This is what +.IR login (1) +does. The +.B \-c +option causes +.I command +to be executed with an empty environment. If +.B \-a +is supplied, the shell passes +.I name +as the zeroth argument to the executed command. If +.I command +cannot be executed for some reason, a non-interactive shell exits, +unless the shell option +.B execfail +is enabled, in which case it returns failure. +An interactive shell returns failure if the file cannot be executed. +If +.I command +is not specified, any redirections take effect in the current shell, +and the return status is 0. If there is a redirection error, the +return status is 1. +.TP +\fBexit\fP [\fIn\fP] +Cause the shell to exit +with a status of \fIn\fP. If +.I n +is omitted, the exit status +is that of the last command executed. +A trap on +.SM +.B EXIT +is executed before the shell terminates. +.TP +\fBexport\fP [\fB\-fn\fP\^] [\fIname\fP[=\fIword\fP]] ... +.PD 0 +.TP +.B export \-p +.PD +The supplied +.I names +are marked for automatic export to the environment of +subsequently executed commands. If the +.B \-f +option is given, +the +.I names +refer to functions. +If no +.I names +are given, or if the +.B \-p +option is supplied, a list +of all names that are exported in this shell is printed. +The +.B \-n +option causes the export property to be removed from the +named variables. +.B export +returns an exit status of 0 unless an invalid option is +encountered, +one of the \fInames\fP is not a valid shell variable name, or +.B \-f +is supplied with a +.I name +that is not a function. +.TP +\fBfc\fP [\fB\-e\fP \fIename\fP] [\fB\-nlr\fP] [\fIfirst\fP] [\fIlast\fP] +.PD 0 +.TP +\fBfc\fP \fB\-s\fP [\fIpat\fP=\fIrep\fP] [\fIcmd\fP] +.PD +Fix Command. In the first form, a range of commands from +.I first +to +.I last +is selected from the history list. +.I First +and +.I last +may be specified as a string (to locate the last command beginning +with that string) or as a number (an index into the history list, +where a negative number is used as an offset from the current +command number). If +.I last +is not specified it is set to +the current command for listing (so that +.if n ``fc \-l \-10'' +.if t \f(CWfc \-l \-10\fP +prints the last 10 commands) and to +.I first +otherwise. +If +.I first +is not specified it is set to the previous +command for editing and \-16 for listing. +.sp 1 +The +.B \-n +option suppresses +the command numbers when listing. The +.B \-r +option reverses the order of +the commands. If the +.B \-l +option is given, +the commands are listed on +standard output. Otherwise, the editor given by +.I ename +is invoked +on a file containing those commands. If +.I ename +is not given, the +value of the +.SM +.B FCEDIT +variable is used, and +the value of +.SM +.B EDITOR +if +.SM +.B FCEDIT +is not set. If neither variable is set, +.FN vi +is used. When editing is complete, the edited commands are +echoed and executed. +.sp 1 +In the second form, \fIcommand\fP is re-executed after each instance +of \fIpat\fP is replaced by \fIrep\fP. +A useful alias to use with this is +.if n ``r=fc -s'', +.if t \f(CWr='fc \-s'\fP, +so that typing +.if n ``r cc'' +.if t \f(CWr cc\fP +runs the last command beginning with +.if n ``cc'' +.if t \f(CWcc\fP +and typing +.if n ``r'' +.if t \f(CWr\fP +re-executes the last command. +.sp 1 +If the first form is used, the return value is 0 unless an invalid +option is encountered or +.I first +or +.I last +specify history lines out of range. +If the +.B \-e +option is supplied, the return value is the value of the last +command executed or failure if an error occurs with the temporary +file of commands. If the second form is used, the return status +is that of the command re-executed, unless +.I cmd +does not specify a valid history line, in which case +.B fc +returns failure. +.TP +\fBfg\fP [\fIjobspec\fP] +Resume +.I jobspec +in the foreground, and make it the current job. +If +.I jobspec +is not present, the shell's notion of the \fIcurrent job\fP is used. +The return value is that of the command placed into the foreground, +or failure if run when job control is disabled or, when run with +job control enabled, if +.I jobspec +does not specify a valid job or +.I jobspec +specifies a job that was started without job control. +.TP +\fBgetopts\fP \fIoptstring\fP \fIname\fP [\fIargs\fP] +.B getopts +is used by shell procedures to parse positional parameters. +.I optstring +contains the option characters to be recognized; if a character +is followed by a colon, the option is expected to have an +argument, which should be separated from it by white space. +The colon and question mark characters may not be used as +option characters. +Each time it is invoked, +.B getopts +places the next option in the shell variable +.IR name , +initializing +.I name +if it does not exist, +and the index of the next argument to be processed into the +variable +.SM +.BR OPTIND . +.SM +.B OPTIND +is initialized to 1 each time the shell or a shell script +is invoked. When an option requires an argument, +.B getopts +places that argument into the variable +.SM +.BR OPTARG . +The shell does not reset +.SM +.B OPTIND +automatically; it must be manually reset between multiple +calls to +.B getopts +within the same shell invocation if a new set of parameters +is to be used. +.sp 1 +When the end of options is encountered, \fBgetopts\fP exits with a +return value greater than zero. +\fBOPTIND\fP is set to the index of the first non-option argument, +and \fBname\fP is set to ?. +.sp 1 +.B getopts +normally parses the positional parameters, but if more arguments are +given in +.IR args , +.B getopts +parses those instead. +.sp 1 +.B getopts +can report errors in two ways. If the first character of +.I optstring +is a colon, +.I silent +error reporting is used. In normal operation diagnostic messages +are printed when invalid options or missing option arguments are +encountered. +If the variable +.SM +.B OPTERR +is set to 0, no error messages will be displayed, even if the first +character of +.I optstring +is not a colon. +.sp 1 +If an invalid option is seen, +.B getopts +places ? into +.I name +and, if not silent, +prints an error message and unsets +.SM +.BR OPTARG . +If +.B getopts +is silent, +the option character found is placed in +.SM +.B OPTARG +and no diagnostic message is printed. +.sp 1 +If a required argument is not found, and +.B getopts +is not silent, +a question mark (\^\fB?\fP\^) is placed in +.IR name , +.SM +.B OPTARG +is unset, and a diagnostic message is printed. +If +.B getopts +is silent, then a colon (\^\fB:\fP\^) is placed in +.I name +and +.SM +.B OPTARG +is set to the option character found. +.sp 1 +.B getopts +returns true if an option, specified or unspecified, is found. +It returns false if the end of options is encountered or an +error occurs. +.TP +\fBhash\fP [\fB\-lr\fP] [\fB\-p\fP \fIfilename\fP] [\fB\-dt\fP] [\fIname\fP] +For each +.IR name , +the full file name of the command is determined by searching +the directories in +.B $PATH +and remembered. +If the +.B \-p +option is supplied, no path search is performed, and +.I filename +is used as the full file name of the command. +The +.B \-r +option causes the shell to forget all +remembered locations. +The +.B \-d +option causes the shell to forget the remembered location of each \fIname\fP. +If the +.B \-t +option is supplied, the full pathname to which each \fIname\fP corresponds +is printed. If multiple \fIname\fP arguments are supplied with \fB\-t\fP, +the \fIname\fP is printed before the hashed full pathname. +The +.B \-l +option causes output to be displayed in a format that may be reused as input. +If no arguments are given, or if only \fB\-l\fP is supplied, +information about remembered commands is printed. +The return status is true unless a +.I name +is not found or an invalid option is supplied. +.TP +\fBhelp\fP [\fB\-s\fP] [\fIpattern\fP] +Display helpful information about builtin commands. If +.I pattern +is specified, +.B help +gives detailed help on all commands matching +.IR pattern ; +otherwise help for all the builtins and shell control structures +is printed. +The \fB\-s\fP option restricts the information displayed to a short +usage synopsis. +The return status is 0 unless no command matches +.IR pattern . +.TP +\fBhistory [\fIn\fP] +.PD 0 +.TP +\fBhistory\fP \fB\-c\fP +.TP +\fBhistory \-d\fP \fIoffset\fP +.TP +\fBhistory\fP \fB\-anrw\fP [\fIfilename\fP] +.TP +\fBhistory\fP \fB\-p\fP \fIarg\fP [\fIarg ...\fP] +.TP +\fBhistory\fP \fB\-s\fP \fIarg\fP [\fIarg ...\fP] +.PD +With no options, display the command +history list with line numbers. Lines listed +with a +.B * +have been modified. An argument of +.I n +lists only the last +.I n +lines. If \fIfilename\fP is supplied, it is used as the +name of the history file; if not, the value of +.SM +.B HISTFILE +is used. Options, if supplied, have the following meanings: +.RS +.PD 0 +.TP +.B \-c +Clear the history list by deleting all the entries. +.TP +\fB\-d\fP \fIoffset\fP +Delete the history entry at position \fIoffset\fP. +.TP +.B \-a +Append the ``new'' history lines (history lines entered since the +beginning of the current \fBbash\fP session) to the history file. +.TP +.B \-n +Read the history lines not already read from the history +file into the current history list. These are lines +appended to the history file since the beginning of the +current \fBbash\fP session. +.TP +.B \-r +Read the contents of the history file +and use them as the current history. +.TP +.B \-w +Write the current history to the history file, overwriting the +history file's contents. +.TP +.B \-p +Perform history substitution on the following \fIargs\fP and display +the result on the standard output. +Does not store the results in the history list. +Each \fIarg\fP must be quoted to disable normal history expansion. +.TP +.B \-s +Store the +.I args +in the history list as a single entry. The last command in the +history list is removed before the +.I args +are added. +.PD +.PP +The return value is 0 unless an invalid option is encountered, an +error occurs while reading or writing the history file, an invalid +\fIoffset\fP is supplied as an argument to \fB\-d\fP, or the +history expansion supplied as an argument to \fB\-p\fP fails. +.RE +.TP +\fBjobs\fP [\fB\-lnprs\fP] [ \fIjobspec\fP ... ] +.PD 0 +.TP +\fBjobs\fP \fB\-x\fP \fIcommand\fP [ \fIargs\fP ... ] +.PD +The first form lists the active jobs. The options have the following +meanings: +.RS +.PD 0 +.TP +.B \-l +List process IDs +in addition to the normal information. +.TP +.B \-p +List only the process ID of the job's process group +leader. +.TP +.B \-n +Display information only about jobs that have changed status since +the user was last notified of their status. +.TP +.B \-r +Restrict output to running jobs. +.TP +.B \-s +Restrict output to stopped jobs. +.PD +.PP +If +.I jobspec +is given, output is restricted to information about that job. +The return status is 0 unless an invalid option is encountered +or an invalid +.I jobspec +is supplied. +.PP +If the +.B \-x +option is supplied, +.B jobs +replaces any +.I jobspec +found in +.I command +or +.I args +with the corresponding process group ID, and executes +.I command +passing it +.IR args , +returning its exit status. +.RE +.TP +\fBkill\fP [\fB\-s\fP \fIsigspec\fP | \fB\-n\fP \fIsignum\fP | \fB\-\fP\fIsigspec\fP] [\fIpid\fP | \fIjobspec\fP] ... +.PD 0 +.TP +\fBkill\fP \fB\-l\fP [\fIsigspec\fP | \fIexit_status\fP] +.PD +Send the signal named by +.I sigspec +or +.I signum +to the processes named by +.I pid +or +.IR jobspec . +.I sigspec +is either a signal name such as +.SM +.B SIGKILL +or a signal number; +.I signum +is a signal number. If +.I sigspec +is a signal name, the name may be +given with or without the +.SM +.B SIG +prefix. +If +.I sigspec +is not present, then +.SM +.B SIGTERM +is assumed. +An argument of +.B \-l +lists the signal names. +If any arguments are supplied when +.B \-l +is given, the names of the signals corresponding to the arguments are +listed, and the return status is 0. +The \fIexit_status\fP argument to +.B \-l +is a number specifying either a signal number or the exit status of +a process terminated by a signal. +.B kill +returns true if at least one signal was successfully sent, or false +if an error occurs or an invalid option is encountered. +.TP +\fBlet\fP \fIarg\fP [\fIarg\fP ...] +Each +.I arg +is an arithmetic expression to be evaluated (see +.SM +.BR "ARITHMETIC EVALUATION" ). +If the last +.I arg +evaluates to 0, +.B let +returns 1; 0 is returned otherwise. +.TP +\fBlocal\fP [\fIoption\fP] [\fIname\fP[=\fIvalue\fP] ...] +For each argument, a local variable named +.I name +is created, and assigned +.IR value . +The \fIoption\fP can be any of the options accepted by \fBdeclare\fP. +When +.B local +is used within a function, it causes the variable +.I name +to have a visible scope restricted to that function and its children. +With no operands, +.B local +writes a list of local variables to the standard output. It is +an error to use +.B local +when not within a function. The return status is 0 unless +.B local +is used outside a function, an invalid +.I name +is supplied, or +\fIname\fP is a readonly variable. +.TP +.B logout +Exit a login shell. +.TP +\fBpopd\fP [\-\fBn\fP] [+\fIn\fP] [\-\fIn\fP] +Removes entries from the directory stack. With no arguments, +removes the top directory from the stack, and performs a +.B cd +to the new top directory. +Arguments, if supplied, have the following meanings: +.RS +.PD 0 +.TP +\fB+\fP\fIn\fP +Removes the \fIn\fPth entry counting from the left of the list +shown by +.BR dirs , +starting with zero. For example: +.if n ``popd +0'' +.if t \f(CWpopd +0\fP +removes the first directory, +.if n ``popd +1'' +.if t \f(CWpopd +1\fP +the second. +.TP +\fB\-\fP\fIn\fP +Removes the \fIn\fPth entry counting from the right of the list +shown by +.BR dirs , +starting with zero. For example: +.if n ``popd -0'' +.if t \f(CWpopd -0\fP +removes the last directory, +.if n ``popd -1'' +.if t \f(CWpopd -1\fP +the next to last. +.TP +.B \-n +Suppresses the normal change of directory when removing directories +from the stack, so that only the stack is manipulated. +.PD +.PP +If the +.B popd +command is successful, a +.B dirs +is performed as well, and the return status is 0. +.B popd +returns false if an invalid option is encountered, the directory stack +is empty, a non-existent directory stack entry is specified, or the +directory change fails. +.RE +.TP +\fBprintf\fP \fIformat\fP [\fIarguments\fP] +Write the formatted \fIarguments\fP to the standard output under the +control of the \fIformat\fP. +The \fIformat\fP is a character string which contains three types of objects: +plain characters, which are simply copied to standard output, character +escape sequences, which are converted and copied to the standard output, and +format specifications, each of which causes printing of the next successive +\fIargument\fP. +In addition to the standard \fIprintf\fP(1) formats, \fB%b\fP causes +\fBprintf\fP to expand backslash escape sequences in the corresponding +\fIargument\fP, and \fB%q\fP causes \fBprintf\fP to output the corresponding +\fIargument\fP in a format that can be reused as shell input. +.sp 1 +The \fIformat\fP is reused as necessary to consume all of the \fIarguments\fP. +If the \fIformat\fP requires more \fIarguments\fP than are supplied, the +extra format specifications behave as if a zero value or null string, as +appropriate, had been supplied. The return value is zero on success, +non-zero on failure. +.TP +\fBpushd\fP [\fB\-n\fP] [\fIdir\fP] +.PD 0 +.TP +\fBpushd\fP [\fB\-n\fP] [+\fIn\fP] [\-\fIn\fP] +.PD +Adds a directory to the top of the directory stack, or rotates +the stack, making the new top of the stack the current working +directory. With no arguments, exchanges the top two directories +and returns 0, unless the directory stack is empty. +Arguments, if supplied, have the following meanings: +.RS +.PD 0 +.TP +\fB+\fP\fIn\fP +Rotates the stack so that the \fIn\fPth directory +(counting from the left of the list shown by +.BR dirs , +starting with zero) +is at the top. +.TP +\fB\-\fP\fIn\fP +Rotates the stack so that the \fIn\fPth directory +(counting from the right of the list shown by +.BR dirs , +starting with zero) is at the top. +.TP +.B \-n +Suppresses the normal change of directory when adding directories +to the stack, so that only the stack is manipulated. +.TP +.I dir +Adds +.I dir +to the directory stack at the top, making it the +new current working directory. +.PD +.PP +If the +.B pushd +command is successful, a +.B dirs +is performed as well. +If the first form is used, +.B pushd +returns 0 unless the cd to +.I dir +fails. With the second form, +.B pushd +returns 0 unless the directory stack is empty, +a non-existent directory stack element is specified, +or the directory change to the specified new current directory +fails. +.RE +.TP +\fBpwd\fP [\fB\-LP\fP] +Print the absolute pathname of the current working directory. +The pathname printed contains no symbolic links if the +.B \-P +option is supplied or the +.B \-o physical +option to the +.B set +builtin command is enabled. +If the +.B \-L +option is used, the pathname printed may contain symbolic links. +The return status is 0 unless an error occurs while +reading the name of the current directory or an +invalid option is supplied. +.TP +\fBread\fP [\fB\-ers\fP] [\fB\-u\fP \fIfd\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-a\fP \fIaname\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-n\fP \fInchars\fP] [\fB\-d\fP \fIdelim\fP] [\fIname\fP ...] +One line is read from the standard input, or from the file descriptor +\fIfd\fP supplied as an argument to the \fB\-u\fP option, and the first word +is assigned to the first +.IR name , +the second word to the second +.IR name , +and so on, with leftover words and their intervening separators assigned +to the last +.IR name . +If there are fewer words read from the input stream than names, +the remaining names are assigned empty values. +The characters in +.SM +.B IFS +are used to split the line into words. +The backslash character (\fB\e\fP) may be used to remove any special +meaning for the next character read and for line continuation. +Options, if supplied, have the following meanings: +.RS +.PD 0 +.TP +.B \-a \fIaname\fP +The words are assigned to sequential indices +of the array variable +.IR aname , +starting at 0. +.I aname +is unset before any new values are assigned. +Other \fIname\fP arguments are ignored. +.TP +.B \-d \fIdelim\fP +The first character of \fIdelim\fP is used to terminate the input line, +rather than newline. +.TP +.B \-e +If the standard input +is coming from a terminal, +.B readline +(see +.SM +.B READLINE +above) is used to obtain the line. +.TP +.B \-n \fInchars\fP +\fBread\fP returns after reading \fInchars\fP characters rather than +waiting for a complete line of input. +.TP +.B \-p \fIprompt\fP +Display \fIprompt\fP on standard error, without a +trailing newline, before attempting to read any input. The prompt +is displayed only if input is coming from a terminal. +.TP +.B \-r +Backslash does not act as an escape character. +The backslash is considered to be part of the line. +In particular, a backslash-newline pair may not be used as a line +continuation. +.TP +.B \-s +Silent mode. If input is coming from a terminal, characters are +not echoed. +.TP +.B \-t \fItimeout\fP +Cause \fBread\fP to time out and return failure if a complete line of +input is not read within \fItimeout\fP seconds. +This option has no effect if \fBread\fP is not reading input from the +terminal or a pipe. +.TP +.B \-u \fIfd\FP +Read input from file descriptor \fIfd\fP. +.PD +.PP +If no +.I names +are supplied, the line read is assigned to the variable +.SM +.BR REPLY . +The return code is zero, unless end-of-file is encountered, \fBread\fP +times out, or an invalid file descriptor is supplied as the argument to +\fB\-u\fP. +.RE +.TP +\fBreadonly\fP [\fB\-apf\fP] [\fIname\fP ...] +.PD +The given +\fInames\fP are marked readonly; the values of these +.I names +may not be changed by subsequent assignment. +If the +.B \-f +option is supplied, the functions corresponding to the +\fInames\fP are so +marked. +The +.B \-a +option restricts the variables to arrays. +If no +.I name +arguments are given, or if the +.B \-p +option is supplied, a list of all readonly names is printed. +The +.B \-p +option causes output to be displayed in a format that +may be reused as input. +The return status is 0 unless an invalid option is encountered, +one of the +.I names +is not a valid shell variable name, or +.B \-f +is supplied with a +.I name +that is not a function. +.TP +\fBreturn\fP [\fIn\fP] +Causes a function to exit with the return value specified by +.IR n . +If +.I n +is omitted, the return status is that of the last command +executed in the function body. If used outside a function, +but during execution of a script by the +.B . +(\fBsource\fP) command, it causes the shell to stop executing +that script and return either +.I n +or the exit status of the last command executed within the +script as the exit status of the script. If used outside a +function and not during execution of a script by \fB.\fP\^, +the return status is false. +.TP +\fBset\fP [\fB\-\-abefhkmnptuvxBCHP\fP] [\fB\-o\fP \fIoption\fP] [\fIarg\fP ...] +Without options, the name and value of each shell variable are displayed +in a format that can be reused as input. +The output is sorted according to the current locale. +When options are specified, they set or unset shell attributes. +Any arguments remaining after the options are processed are treated +as values for the positional parameters and are assigned, in order, to +.BR $1 , +.BR $2 , +.B ... +.BR $\fIn\fP . +Options, if specified, have the following meanings: +.RS +.PD 0 +.TP 8 +.B \-a +Automatically mark variables and functions which are modified or created +for export to the environment of subsequent commands. +.TP 8 +.B \-b +Report the status of terminated background jobs +immediately, rather than before the next primary prompt. This is +effective only when job control is enabled. +.TP 8 +.B \-e +Exit immediately if a \fIsimple command\fP (see +.SM +.B SHELL GRAMMAR +above) exits with a non-zero status. The shell does not exit if the +command that fails is part of an +.I until +or +.I while +loop, +part of an +.I if +statement, part of a +.B && +or +.B \(bv\(bv +list, or if the command's return value is +being inverted via +.BR ! . +A trap on \fBERR\fP, if set, is executed before the shell exits. +.TP 8 +.B \-f +Disable pathname expansion. +.TP 8 +.B \-h +Remember the location of commands as they are looked up for execution. +This is enabled by default. +.TP 8 +.B \-k +All arguments in the form of assignment statements +are placed in the environment for a command, not just +those that precede the command name. +.TP 8 +.B \-m +Monitor mode. Job control is enabled. This option is on +by default for interactive shells on systems that support +it (see +.SM +.B JOB CONTROL +above). Background processes run in a separate process +group and a line containing their exit status is printed +upon their completion. +.TP 8 +.B \-n +Read commands but do not execute them. This may be used to +check a shell script for syntax errors. This is ignored by +interactive shells. +.TP 8 +.B \-o \fIoption\-name\fP +The \fIoption\-name\fP can be one of the following: +.RS +.TP 8 +.B allexport +Same as +.BR \-a . +.TP 8 +.B braceexpand +Same as +.BR \-B . +.TP 8 +.B emacs +Use an emacs-style command line editing interface. This is enabled +by default when the shell is interactive, unless the shell is started +with the +.B \-\-noediting +option. +.TP 8 +.B errexit +Same as +.BR \-e . +.TP 8 +.B hashall +Same as +.BR \-h . +.TP 8 +.B histexpand +Same as +.BR \-H . +.TP 8 +.B history +Enable command history, as described above under +.SM +.BR HISTORY . +This option is on by default in interactive shells. +.TP 8 +.B ignoreeof +The effect is as if the shell command +.if t \f(CWIGNOREEOF=10\fP +.if n ``IGNOREEOF=10'' +had been executed +(see +.B Shell Variables +above). +.TP 8 +.B keyword +Same as +.BR \-k . +.TP 8 +.B monitor +Same as +.BR \-m . +.TP 8 +.B noclobber +Same as +.BR \-C . +.TP 8 +.B noexec +Same as +.BR \-n . +.TP 8 +.B noglob +Same as +.BR \-f . +.B nolog +Currently ignored. +.TP 8 +.B notify +Same as +.BR \-b . +.TP 8 +.B nounset +Same as +.BR \-u . +.TP 8 +.B onecmd +Same as +.BR \-t . +.TP 8 +.B physical +Same as +.BR \-P . +.TP 8 +.B posix +Change the behavior of +.B bash +where the default operation differs +from the POSIX 1003.2 standard to match the standard (\fIposix mode\fP). +.TP 8 +.B privileged +Same as +.BR \-p . +.TP 8 +.B verbose +Same as +.BR \-v . +.TP 8 +.B vi +Use a vi-style command line editing interface. +.TP 8 +.B xtrace +Same as +.BR \-x . +.sp .5 +.PP +If +.B \-o +is supplied with no \fIoption\-name\fP, the values of the current options are +printed. +If +.B +o +is supplied with no \fIoption\-name\fP, a series of +.B set +commands to recreate the current option settings is displayed on +the standard output. +.RE +.TP 8 +.B \-p +Turn on +.I privileged +mode. In this mode, the +.SM +.B $ENV +and +.SM +.B $BASH_ENV +files are not processed, shell functions are not inherited from the +environment, and the +.SM +.B SHELLOPTS +variable, if it appears in the environment, is ignored. +If the shell is started with the effective user (group) id not equal to the +real user (group) id, and the \fB\-p\fP option is not supplied, these actions +are taken and the effective user id is set to the real user id. +If the \fB\-p\fP option is supplied at startup, the effective user id is +not reset. +Turning this option off causes the effective user +and group ids to be set to the real user and group ids. +.TP 8 +.B \-t +Exit after reading and executing one command. +.TP 8 +.B \-u +Treat unset variables as an error when performing +parameter expansion. If expansion is attempted on an +unset variable, the shell prints an error message, and, +if not interactive, exits with a non-zero status. +.TP 8 +.B \-v +Print shell input lines as they are read. +.TP 8 +.B \-x +After expanding each \fIsimple command\fP, +display the expanded value of +.SM +.BR PS4 , +followed by the command and its expanded arguments. +.TP 8 +.B \-B +The shell performs brace expansion (see +.B Brace Expansion +above). This is on by default. +.TP 8 +.B \-C +If set, +.B bash +does not overwrite an existing file with the +.BR > , +.BR >& , +and +.B <> +redirection operators. This may be overridden when +creating output files by using the redirection operator +.B >| +instead of +.BR > . +.TP 8 +.B \-H +Enable +.B ! +style history substitution. This option is on by +default when the shell is interactive. +.TP 8 +.B \-P +If set, the shell does not follow symbolic links when executing +commands such as +.B cd +that change the current working directory. It uses the +physical directory structure instead. By default, +.B bash +follows the logical chain of directories when performing commands +which change the current directory. +.TP 8 +.B \-\- +If no arguments follow this option, then the positional parameters are +unset. Otherwise, the positional parameters are set to the +\fIarg\fPs, even if some of them begin with a +.BR \- . +.TP 8 +.B \- +Signal the end of options, cause all remaining \fIarg\fPs to be +assigned to the positional parameters. The +.B \-x +and +.B \-v +options are turned off. +If there are no \fIarg\fPs, +the positional parameters remain unchanged. +.PD +.PP +The options are off by default unless otherwise noted. +Using + rather than \- causes these options to be turned off. +The options can also be specified as arguments to an invocation of +the shell. +The current set of options may be found in +.BR $\- . +The return status is always true unless an invalid option is encountered. +.RE +.TP +\fBshift\fP [\fIn\fP] +The positional parameters from \fIn\fP+1 ... are renamed to +.B $1 +.B .... +Parameters represented by the numbers \fB$#\fP +down to \fB$#\fP\-\fIn\fP+1 are unset. +.I n +must be a non-negative number less than or equal to \fB$#\fP. +If +.I n +is 0, no parameters are changed. +If +.I n +is not given, it is assumed to be 1. +If +.I n +is greater than \fB$#\fP, the positional parameters are not changed. +The return status is greater than zero if +.I n +is greater than +.B $# +or less than zero; otherwise 0. +.TP +\fBshopt\fP [\fB\-pqsu\fP] [\fB\-o\fP] [\fIoptname\fP ...] +Toggle the values of variables controlling optional shell behavior. +With no options, or with the +.B \-p +option, a list of all settable options is displayed, with +an indication of whether or not each is set. +The \fB\-p\fP option causes output to be displayed in a form that +may be reused as input. +Other options have the following meanings: +.RS +.PD 0 +.TP +.B \-s +Enable (set) each \fIoptname\fP. +.TP +.B \-u +Disable (unset) each \fIoptname\fP. +.TP +.B \-q +Suppresses normal output (quiet mode); the return status indicates +whether the \fIoptname\fP is set or unset. +If multiple \fIoptname\fP arguments are given with +.BR \-q , +the return status is zero if all \fIoptnames\fP are enabled; non-zero +otherwise. +.TP +.B \-o +Restricts the values of \fIoptname\fP to be those defined for the +.B \-o +option to the +.B set +builtin. +.PD +.PP +If either +.B \-s +or +.B \-u +is used with no \fIoptname\fP arguments, the display is limited to +those options which are set or unset, respectively. +Unless otherwise noted, the \fBshopt\fP options are disabled (unset) +by default. +.PP +The return status when listing options is zero if all \fIoptnames\fP +are enabled, non-zero otherwise. When setting or unsetting options, +the return status is zero unless an \fIoptname\fP is not a valid shell +option. +.PP +The list of \fBshopt\fP options is: +.if t .sp .5v +.if n .sp 1v +.PD 0 +.TP 8 +.B cdable_vars +If set, an argument to the +.B cd +builtin command that +is not a directory is assumed to be the name of a variable whose +value is the directory to change to. +.TP 8 +.B cdspell +If set, minor errors in the spelling of a directory component in a +.B cd +command will be corrected. +The errors checked for are transposed characters, +a missing character, and one character too many. +If a correction is found, the corrected file name is printed, +and the command proceeds. +This option is only used by interactive shells. +.TP 8 +.B checkhash +If set, \fBbash\fP checks that a command found in the hash +table exists before trying to execute it. If a hashed command no +longer exists, a normal path search is performed. +.TP 8 +.B checkwinsize +If set, \fBbash\fP checks the window size after each command +and, if necessary, updates the values of +.SM +.B LINES +and +.SM +.BR COLUMNS . +.TP 8 +.B cmdhist +If set, +.B bash +attempts to save all lines of a multiple-line +command in the same history entry. This allows +easy re-editing of multi-line commands. +.TP 8 +.B dotglob +If set, +.B bash +includes filenames beginning with a `.' in the results of pathname +expansion. +.TP 8 +.B execfail +If set, a non-interactive shell will not exit if +it cannot execute the file specified as an argument to the +.B exec +builtin command. An interactive shell does not exit if +.B exec +fails. +.TP 8 +.B expand_aliases +If set, aliases are expanded as described above under +.SM +.BR ALIASES . +This option is enabled by default for interactive shells. +.TP 8 +.B extglob +If set, the extended pattern matching features described above under +\fBPathname Expansion\fP are enabled. +.TP 8 +.B histappend +If set, the history list is appended to the file named by the value +of the +.B HISTFILE +variable when the shell exits, rather than overwriting the file. +.TP 8 +.B histreedit +If set, and +.B readline +is being used, a user is given the opportunity to re-edit a +failed history substitution. +.TP 8 +.B histverify +If set, and +.B readline +is being used, the results of history substitution are not immediately +passed to the shell parser. Instead, the resulting line is loaded into +the \fBreadline\fP editing buffer, allowing further modification. +.TP 8 +.B hostcomplete +If set, and +.B readline +is being used, \fBbash\fP will attempt to perform hostname completion when a +word containing a \fB@\fP is being completed (see +.B Completing +under +.SM +.B READLINE +above). +This is enabled by default. +.TP 8 +.B huponexit +If set, \fBbash\fP will send +.SM +.B SIGHUP +to all jobs when an interactive login shell exits. +.TP 8 +.B interactive_comments +If set, allow a word beginning with +.B # +to cause that word and all remaining characters on that +line to be ignored in an interactive shell (see +.SM +.B COMMENTS +above). This option is enabled by default. +.TP 8 +.B lithist +If set, and the +.B cmdhist +option is enabled, multi-line commands are saved to the history with +embedded newlines rather than using semicolon separators where possible. +.TP 8 +.B login_shell +The shell sets this option if it is started as a login shell (see +.SM +.B "INVOCATION" +above). +The value may not be changed. +.TP 8 +.B mailwarn +If set, and a file that \fBbash\fP is checking for mail has been +accessed since the last time it was checked, the message ``The mail in +\fImailfile\fP has been read'' is displayed. +.TP 8 +.B no_empty_cmd_completion +If set, and +.B readline +is being used, +.B bash +will not attempt to search the \fBPATH\fP for possible completions when +completion is attempted on an empty line. +.TP 8 +.B nocaseglob +If set, +.B bash +matches filenames in a case\-insensitive fashion when performing pathname +expansion (see +.B Pathname Expansion +above). +.TP 8 +.B nullglob +If set, +.B bash +allows patterns which match no +files (see +.B Pathname Expansion +above) +to expand to a null string, rather than themselves. +.TP 8 +.B progcomp +If set, the programmable completion facilities (see +\fBProgrammable Completion\fP above) are enabled. +This option is enabled by default. +.TP 8 +.B promptvars +If set, prompt strings undergo variable and parameter expansion after +being expanded as described in +.SM +.B PROMPTING +above. This option is enabled by default. +.TP 8 +.B restricted_shell +The shell sets this option if it is started in restricted mode (see +.SM +.B "RESTRICTED SHELL" +below). +The value may not be changed. +This is not reset when the startup files are executed, allowing +the startup files to discover whether or not a shell is restricted. +.TP 8 +.B shift_verbose +If set, the +.B shift +builtin prints an error message when the shift count exceeds the +number of positional parameters. +.TP 8 +.B sourcepath +If set, the +\fBsource\fP (\fB.\fP) builtin uses the value of +.SM +.B PATH +to find the directory containing the file supplied as an argument. +This option is enabled by default. +.TP 8 +.B xpg_echo +If set, the \fBecho\fP builtin expands backslash-escape sequences +by default. +.RE +.TP +\fBsuspend\fP [\fB\-f\fP] +Suspend the execution of this shell until it receives a +.SM +.B SIGCONT +signal. The +.B \-f +option says not to complain if this is +a login shell; just suspend anyway. The return status is 0 unless +the shell is a login shell and +.B \-f +is not supplied, or if job control is not enabled. +.TP +\fBtest\fP \fIexpr\fP +.PD 0 +.TP +\fB[\fP \fIexpr\fP \fB]\fP +Return a status of 0 or 1 depending on +the evaluation of the conditional expression +.IR expr . +Each operator and operand must be a separate argument. +Expressions are composed of the primaries described above under +.SM +.BR "CONDITIONAL EXPRESSIONS" . +.if t .sp 0.5 +.if n .sp 1 +Expressions may be combined using the following operators, listed +in decreasing order of precedence. +.RS +.PD 0 +.TP +.B ! \fIexpr\fP +True if +.I expr +is false. +.TP +.B ( \fIexpr\fP ) +Returns the value of \fIexpr\fP. +This may be used to override the normal precedence of operators. +.TP +\fIexpr1\fP \-\fBa\fP \fIexpr2\fP +True if both +.I expr1 +and +.I expr2 +are true. +.TP +\fIexpr1\fP \-\fBo\fP \fIexpr2\fP +True if either +.I expr1 +or +.I expr2 +is true. +.PD +.PP +\fBtest\fP and \fB[\fP evaluate conditional +expressions using a set of rules based on the number of arguments. +.if t .sp 0.5 +.if n .sp 1 +.PD 0 +.TP +0 arguments +The expression is false. +.TP +1 argument +The expression is true if and only if the argument is not null. +.TP +2 arguments +If the first argument is \fB!\fP, the expression is true if and +only if the second argument is null. +If the first argument is one of the unary conditional operators listed above +under +.SM +.BR "CONDITIONAL EXPRESSIONS" , +the expression is true if the unary test is true. +If the first argument is not a valid unary conditional operator, the expression +is false. +.TP +3 arguments +If the second argument is one of the binary conditional operators listed above +under +.SM +.BR "CONDITIONAL EXPRESSIONS" , +the result of the expression is the result of the binary test using +the first and third arguments as operands. +If the first argument is \fB!\fP, the value is the negation of +the two-argument test using the second and third arguments. +If the first argument is exactly \fB(\fP and the third argument is +exactly \fB)\fP, the result is the one-argument test of the second +argument. +Otherwise, the expression is false. +The \fB\-a\fP and \fB\-o\fP operators are considered binary operators +in this case. +.TP +4 arguments +If the first argument is \fB!\fP, the result is the negation of +the three-argument expression composed of the remaining arguments. +Otherwise, the expression is parsed and evaluated according to +precedence using the rules listed above. +.TP +5 or more arguments +The expression is parsed and evaluated according to precedence +using the rules listed above. +.RE +.PD +.TP +.B times +Print the accumulated user and system times for the shell and +for processes run from the shell. The return status is 0. +.TP +\fBtrap\fP [\fB\-lp\fP] [\fIarg\fP] [\fIsigspec\fP ...] +The command +.I arg +is to be read and executed when the shell receives +signal(s) +.IR sigspec . +If +.I arg +is absent or +.BR \- , +all specified signals are +reset to their original values (the values they had +upon entrance to the shell). +If +.I arg +is the null string the signal specified by each +.I sigspec +is ignored by the shell and by the commands it invokes. +If +.I arg +is not present and +.B \-p +has been supplied, then the trap commands associated with each +.I sigspec +are displayed. +If no arguments are supplied or if only +.B \-p +is given, +.B trap +prints the list of commands associated with each signal number. +Each +.I sigspec +is either +a signal name defined in <\fIsignal.h\fP>, or a signal number. +If a +.I sigspec +is +.SM +.B EXIT +(0) the command +.I arg +is executed on exit from the shell. +If a +.I sigspec +is +.SM +.BR DEBUG , +the command +.I arg +is executed after every \fIsimple command\fP (see +.SM +.B SHELL GRAMMAR +above). +If a +.I sigspec +is +.SM +.BR ERR , +the command +.I arg +is executed whenever a simple command has a non\-zero exit status. +The +.SM +.BR ERR +trap is not executed if the failed command is part of an +.I until +or +.I while +loop, +part of an +.I if +statement, part of a +.B && +or +.B \(bv\(bv +list, or if the command's return value is +being inverted via +.BR ! . +The +.B \-l +option causes the shell to print a list of signal names and +their corresponding numbers. +Signals ignored upon entry to the shell cannot be trapped or reset. +Trapped signals are reset to their original values in a child +process when it is created. +The return status is false if any +.I sigspec +is invalid; otherwise +.B trap +returns true. +.TP +\fBtype\fP [\fB\-aftpP\fP] \fIname\fP [\fIname\fP ...] +With no options, +indicate how each +.I name +would be interpreted if used as a command name. +If the +.B \-t +option is used, +.B type +prints a string which is one of +.IR alias , +.IR keyword , +.IR function , +.IR builtin , +or +.I file +if +.I name +is an alias, shell reserved word, function, builtin, or disk file, +respectively. +If the +.I name +is not found, then nothing is printed, and an exit status of false +is returned. +If the +.B \-p +option is used, +.B type +either returns the name of the disk file +that would be executed if +.I name +were specified as a command name, +or nothing if +.if t \f(CWtype -t name\fP +.if n ``type -t name'' +would not return +.IR file . +The +.B \-P +option forces a +.SM +.B PATH +search for each \fIname\fP, even if +.if t \f(CWtype -t name\fP +.if n ``type -t name'' +would not return +.IR file . +If a command is hashed, +.B \-p +and +.B \-P +print the hashed value, not necessarily the file that appears +first in +.SM +.BR PATH . +If the +.B \-a +option is used, +.B type +prints all of the places that contain +an executable named +.IR name . +This includes aliases and functions, +if and only if the +.B \-p +option is not also used. +The table of hashed commands is not consulted +when using +.BR \-a . +The +.B \-f +option suppresses shell function lookup, as with the \fBcommand\fP builtin. +.B type +returns true if any of the arguments are found, false if +none are found. +.TP +\fBulimit\fP [\fB\-SHacdflmnpstuv\fP [\fIlimit\fP]] +Provides control over the resources available to the shell and to +processes started by it, on systems that allow such control. +The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is +set for the given resource. A hard limit cannot be increased once it +is set; a soft limit may be increased up to the value of the hard limit. +If neither \fB\-H\fP nor \fB\-S\fP is specified, both the soft and hard +limits are set. +The value of +.I limit +can be a number in the unit specified for the resource +or one of the special values +.BR hard , +.BR soft , +or +.BR unlimited , +which stand for the current hard limit, the current soft limit, and +no limit, respectively. +If +.I limit +is omitted, the current value of the soft limit of the resource is +printed, unless the \fB\-H\fP option is given. When more than one +resource is specified, the limit name and unit are printed before the value. +Other options are interpreted as follows: +.RS +.PD 0 +.TP +.B \-a +All current limits are reported +.TP +.B \-c +The maximum size of core files created +.TP +.B \-d +The maximum size of a process's data segment +.TP +.B \-f +The maximum size of files created by the shell +.TP +.B \-l +The maximum size that may be locked into memory +.TP +.B \-m +The maximum resident set size +.TP +.B \-n +The maximum number of open file descriptors (most systems do not +allow this value to be set) +.TP +.B \-p +The pipe size in 512-byte blocks (this may not be set) +.TP +.B \-s +The maximum stack size +.TP +.B \-t +The maximum amount of cpu time in seconds +.TP +.B \-u +The maximum number of processes available to a single user +.TP +.B \-v +The maximum amount of virtual memory available to the shell +.PD +.PP +If +.I limit +is given, it is the new value of the specified resource (the +.B \-a +option is display only). +If no option is given, then +.B \-f +is assumed. Values are in 1024-byte increments, except for +.BR \-t , +which is in seconds, +.BR \-p , +which is in units of 512-byte blocks, +and +.B \-n +and +.BR \-u , +which are unscaled values. +The return status is 0 unless an invalid option or argument is supplied, +or an error occurs while setting a new limit. +.RE +.TP +\fBumask\fP [\fB\-p\fP] [\fB\-S\fP] [\fImode\fP] +The user file-creation mask is set to +.IR mode . +If +.I mode +begins with a digit, it +is interpreted as an octal number; otherwise +it is interpreted as a symbolic mode mask similar +to that accepted by +.IR chmod (1). +If +.I mode +is omitted, the current value of the mask is printed. +The +.B \-S +option causes the mask to be printed in symbolic form; the +default output is an octal number. +If the +.B \-p +option is supplied, and +.I mode +is omitted, the output is in a form that may be reused as input. +The return status is 0 if the mode was successfully changed or if +no \fImode\fP argument was supplied, and false otherwise. +.TP +\fBunalias\fP [\-\fBa\fP] [\fIname\fP ...] +Remove each \fIname\fP from the list of defined aliases. If +.B \-a +is supplied, all alias definitions are removed. The return +value is true unless a supplied +.I name +is not a defined alias. +.TP +\fBunset\fP [\-\fBfv\fP] [\fIname\fP ...] +For each +.IR name , +remove the corresponding variable or function. +If no options are supplied, or the +.B \-v +option is given, each +.I name +refers to a shell variable. +Read-only variables may not be unset. +If +.B \-f +is specifed, +each +.I name +refers to a shell function, and the function definition +is removed. +Each unset variable or function is removed from the environment +passed to subsequent commands. +If any of +.SM +.BR RANDOM , +.SM +.BR SECONDS , +.SM +.BR LINENO , +.SM +.BR HISTCMD , +.SM +.BR FUNCNAME , +.SM +.BR GROUPS , +or +.SM +.B DIRSTACK +are unset, they lose their special properties, even if they are +subsequently reset. The exit status is true unless a +.I name +does not exist or is readonly. +.TP +\fBwait\fP [\fIn\fP] +Wait for the specified process and return its termination +status. +.I n +may be a process +ID or a job specification; if a job spec is given, all processes +in that job's pipeline are waited for. If +.I n +is not given, all currently active child processes +are waited for, and the return status is zero. If +.I n +specifies a non-existent process or job, the return status is +127. Otherwise, the return status is the exit status of the last +process or job waited for. +.\" bash_builtins +.if \n(zZ=1 .ig zZ +.SH "RESTRICTED SHELL" +.\" rbash.1 +.zY +.PP +If +.B bash +is started with the name +.BR rbash , +or the +.B \-r +option is supplied at invocation, +the shell becomes restricted. +A restricted shell is used to +set up an environment more controlled than the standard shell. +It behaves identically to +.B bash +with the exception that the following are disallowed or not performed: +.IP \(bu +changing directories with \fBcd\fP +.IP \(bu +setting or unsetting the values of +.BR SHELL , +.BR PATH , +.BR ENV , +or +.B BASH_ENV +.IP \(bu +specifying command names containing +.B / +.IP \(bu +specifying a file name containing a +.B / +as an argument to the +.B . +builtin command +.IP \(bu +Specifying a filename containing a slash as an argument to the +.B \-p +option to the +.B hash +builtin command +.IP \(bu +importing function definitions from the shell environment at startup +.IP \(bu +parsing the value of \fBSHELLOPTS\fP from the shell environment at startup +.IP \(bu +redirecting output using the >, >|, <>, >&, &>, and >> redirection operators +.IP \(bu +using the +.B exec +builtin command to replace the shell with another command +.IP \(bu +adding or deleting builtin commands with the +.B \-f +and +.B \-d +options to the +.B enable +builtin command +.IP \(bu +Using the \fBenable\fP builtin command to enable disabled shell builtins +.IP \(bu +specifying the +.B \-p +option to the +.B command +builtin command +.IP \(bu +turning off restricted mode with +\fBset +r\fP or \fBset +o restricted\fP. +.PP +These restrictions are enforced after any startup files are read. +.PP +When a command that is found to be a shell script is executed (see +.SM +.B "COMMAND EXECUTION" +above), +.B rbash +turns off any restrictions in the shell spawned to execute the +script. +.\" end of rbash.1 +.if \n(zY=1 .ig zY +.SH "SEE ALSO" +.PD 0 +.TP +\fIBash Reference Manual\fP, Brian Fox and Chet Ramey +.TP +\fIThe Gnu Readline Library\fP, Brian Fox and Chet Ramey +.TP +\fIThe Gnu History Library\fP, Brian Fox and Chet Ramey +.TP +\fIPortable Operating System Interface (POSIX) Part 2: Shell and Utilities\fP, IEEE +.TP +\fIsh\fP(1), \fIksh\fP(1), \fIcsh\fP(1) +.TP +\fIemacs\fP(1), \fIvi\fP(1) +.TP +\fIreadline\fP(3) +.PD +.SH FILES +.PD 0 +.TP +.FN /bin/bash +The \fBbash\fP executable +.TP +.FN /etc/profile +The systemwide initialization file, executed for login shells +.TP +.FN ~/.bash_profile +The personal initialization file, executed for login shells +.TP +.FN ~/.bashrc +The individual per-interactive-shell startup file +.TP +.FN ~/.bash_logout +The individual login shell cleanup file, executed when a login shell exits +.TP +.FN ~/.inputrc +Individual \fIreadline\fP initialization file +.PD +.SH AUTHORS +Brian Fox, Free Software Foundation +.br +bfox@gnu.org +.PP +Chet Ramey, Case Western Reserve University +.br +chet@ins.CWRU.Edu +.SH BUG REPORTS +If you find a bug in +.B bash, +you should report it. But first, you should +make sure that it really is a bug, and that it appears in the latest +version of +.B bash +that you have. +.PP +Once you have determined that a bug actually exists, use the +.I bashbug +command to submit a bug report. +If you have a fix, you are encouraged to mail that as well! +Suggestions and `philosophical' bug reports may be mailed +to \fIbug-bash@gnu.org\fP or posted to the Usenet +newsgroup +.BR gnu.bash.bug . +.PP +ALL bug reports should include: +.PP +.PD 0 +.TP 20 +The version number of \fBbash\fR +.TP +The hardware and operating system +.TP +The compiler used to compile +.TP +A description of the bug behaviour +.TP +A short script or `recipe' which exercises the bug +.PD +.PP +.I bashbug +inserts the first three items automatically into the template +it provides for filing a bug report. +.PP +Comments and bug reports concerning +this manual page should be directed to +.IR chet@ins.CWRU.Edu . +.SH BUGS +.PP +It's too big and too slow. +.PP +There are some subtle differences between +.B bash +and traditional versions of +.BR sh , +mostly because of the +.SM +.B POSIX +specification. +.PP +Aliases are confusing in some uses. +.PP +Shell builtin commands and functions are not stoppable/restartable. +.PP +Compound commands and command sequences of the form `a ; b ; c' +are not handled gracefully when process suspension is attempted. +When a process is stopped, the shell immediately executes the next +command in the sequence. +It suffices to place the sequence of commands between +parentheses to force it into a subshell, which may be stopped as +a unit. +.PP +Commands inside of \fB$(\fP...\fB)\fP command substitution are not +parsed until substitution is attempted. This will delay error +reporting until some time after the command is entered. +.PP +Array variables may not (yet) be exported. +.zZ +.zY diff --git a/raw/man1/bg.1 b/raw/man1/bg.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/bg.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/bind.1 b/raw/man1/bind.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/bind.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/break.1 b/raw/man1/break.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/break.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/builtin.1 b/raw/man1/builtin.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/builtin.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/builtins.1 b/raw/man1/builtins.1 new file mode 100644 index 00000000..5b5ffe08 --- /dev/null +++ b/raw/man1/builtins.1 @@ -0,0 +1,15 @@ +.\" This is a hack to force bash builtins into the whatis database +.\" and to get the list of builtins to come up with the man command. +.TH BASH_BUILTINS 1 "2001 November 27" "GNU Bash-2.05a" +.SH NAME +bash, :, ., [, alias, bg, bind, break, builtin, cd, command, compgen, complete, +continue, declare, dirs, disown, echo, enable, eval, exec, exit, +export, fc, fg, getopts, hash, help, history, jobs, kill, +let, local, logout, popd, printf, pushd, pwd, read, readonly, return, set, +shift, shopt, source, suspend, test, times, trap, type, typeset, +ulimit, umask, unalias, unset, wait \- bash built-in commands, see \fBbash\fR(1) +.SH BASH BUILTIN COMMANDS +.nr zZ 1 +.so man1/bash.1 +.SH SEE ALSO +bash(1), sh(1) diff --git a/raw/man1/bunzip2.1 b/raw/man1/bunzip2.1 new file mode 100644 index 00000000..623435c2 --- /dev/null +++ b/raw/man1/bunzip2.1 @@ -0,0 +1,453 @@ +.PU +.TH bzip2 1 +.SH NAME +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.2 +.br +bzcat \- decompresses files to stdout +.br +bzip2recover \- recovers data from damaged bzip2 files + +.SH SYNOPSIS +.ll +8 +.B bzip2 +.RB [ " \-cdfkqstvzVL123456789 " ] +[ +.I "filenames \&..." +] +.ll -8 +.br +.B bunzip2 +.RB [ " \-fkvsVL " ] +[ +.I "filenames \&..." +] +.br +.B bzcat +.RB [ " \-s " ] +[ +.I "filenames \&..." +] +.br +.B bzip2recover +.I "filename" + +.SH DESCRIPTION +.I bzip2 +compresses files using the Burrows-Wheeler block sorting +text compression algorithm, and Huffman coding. Compression is +generally considerably better than that achieved by more conventional +LZ77/LZ78-based compressors, and approaches the performance of the PPM +family of statistical compressors. + +The command-line options are deliberately very similar to +those of +.I GNU gzip, +but they are not identical. + +.I bzip2 +expects a list of file names to accompany the +command-line flags. Each file is replaced by a compressed version of +itself, with the name "original_name.bz2". +Each compressed file +has the same modification date, permissions, and, when possible, +ownership as the corresponding original, so that these properties can +be correctly restored at decompression time. File name handling is +naive in the sense that there is no mechanism for preserving original +file names, permissions, ownerships or dates in filesystems which lack +these concepts, or have serious file name length restrictions, such as +MS-DOS. + +.I bzip2 +and +.I bunzip2 +will by default not overwrite existing +files. If you want this to happen, specify the \-f flag. + +If no file names are specified, +.I bzip2 +compresses from standard +input to standard output. In this case, +.I bzip2 +will decline to +write compressed output to a terminal, as this would be entirely +incomprehensible and therefore pointless. + +.I bunzip2 +(or +.I bzip2 \-d) +decompresses all +specified files. Files which were not created by +.I bzip2 +will be detected and ignored, and a warning issued. +.I bzip2 +attempts to guess the filename for the decompressed file +from that of the compressed file as follows: + + filename.bz2 becomes filename + filename.bz becomes filename + filename.tbz2 becomes filename.tar + filename.tbz becomes filename.tar + anyothername becomes anyothername.out + +If the file does not end in one of the recognised endings, +.I .bz2, +.I .bz, +.I .tbz2 +or +.I .tbz, +.I bzip2 +complains that it cannot +guess the name of the original file, and uses the original name +with +.I .out +appended. + +As with compression, supplying no +filenames causes decompression from +standard input to standard output. + +.I bunzip2 +will correctly decompress a file which is the +concatenation of two or more compressed files. The result is the +concatenation of the corresponding uncompressed files. Integrity +testing (\-t) +of concatenated +compressed files is also supported. + +You can also compress or decompress files to the standard output by +giving the \-c flag. Multiple files may be compressed and +decompressed like this. The resulting outputs are fed sequentially to +stdout. Compression of multiple files +in this manner generates a stream +containing multiple compressed file representations. Such a stream +can be decompressed correctly only by +.I bzip2 +version 0.9.0 or +later. Earlier versions of +.I bzip2 +will stop after decompressing +the first file in the stream. + +.I bzcat +(or +.I bzip2 -dc) +decompresses all specified files to +the standard output. + +.I bzip2 +will read arguments from the environment variables +.I BZIP2 +and +.I BZIP, +in that order, and will process them +before any arguments read from the command line. This gives a +convenient way to supply default arguments. + +Compression is always performed, even if the compressed +file is slightly +larger than the original. Files of less than about one hundred bytes +tend to get larger, since the compression mechanism has a constant +overhead in the region of 50 bytes. Random data (including the output +of most file compressors) is coded at about 8.05 bits per byte, giving +an expansion of around 0.5%. + +As a self-check for your protection, +.I +bzip2 +uses 32-bit CRCs to +make sure that the decompressed version of a file is identical to the +original. This guards against corruption of the compressed data, and +against undetected bugs in +.I bzip2 +(hopefully very unlikely). The +chances of data corruption going undetected is microscopic, about one +chance in four billion for each file processed. Be aware, though, that +the check occurs upon decompression, so it can only tell you that +something is wrong. It can't help you +recover the original uncompressed +data. You can use +.I bzip2recover +to try to recover data from +damaged files. + +Return values: 0 for a normal exit, 1 for environmental problems (file +not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt +compressed file, 3 for an internal consistency error (eg, bug) which +caused +.I bzip2 +to panic. + +.SH OPTIONS +.TP +.B \-c --stdout +Compress or decompress to standard output. +.TP +.B \-d --decompress +Force decompression. +.I bzip2, +.I bunzip2 +and +.I bzcat +are +really the same program, and the decision about what actions to take is +done on the basis of which name is used. This flag overrides that +mechanism, and forces +.I bzip2 +to decompress. +.TP +.B \-z --compress +The complement to \-d: forces compression, regardless of the +invocation name. +.TP +.B \-t --test +Check integrity of the specified file(s), but don't decompress them. +This really performs a trial decompression and throws away the result. +.TP +.B \-f --force +Force overwrite of output files. Normally, +.I bzip2 +will not overwrite +existing output files. Also forces +.I bzip2 +to break hard links +to files, which it otherwise wouldn't do. + +bzip2 normally declines to decompress files which don't have the +correct magic header bytes. If forced (-f), however, it will pass +such files through unmodified. This is how GNU gzip behaves. +.TP +.B \-k --keep +Keep (don't delete) input files during compression +or decompression. +.TP +.B \-s --small +Reduce memory usage, for compression, decompression and testing. Files +are decompressed and tested using a modified algorithm which only +requires 2.5 bytes per block byte. This means any file can be +decompressed in 2300k of memory, albeit at about half the normal speed. + +During compression, \-s selects a block size of 200k, which limits +memory use to around the same figure, at the expense of your compression +ratio. In short, if your machine is low on memory (8 megabytes or +less), use \-s for everything. See MEMORY MANAGEMENT below. +.TP +.B \-q --quiet +Suppress non-essential warning messages. Messages pertaining to +I/O errors and other critical events will not be suppressed. +.TP +.B \-v --verbose +Verbose mode -- show the compression ratio for each file processed. +Further \-v's increase the verbosity level, spewing out lots of +information which is primarily of interest for diagnostic purposes. +.TP +.B \-L --license -V --version +Display the software version, license terms and conditions. +.TP +.B \-1 (or \-\-fast) to \-9 (or \-\-best) +Set the block size to 100 k, 200 k .. 900 k when compressing. Has no +effect when decompressing. See MEMORY MANAGEMENT below. +The \-\-fast and \-\-best aliases are primarily for GNU gzip +compatibility. In particular, \-\-fast doesn't make things +significantly faster. +And \-\-best merely selects the default behaviour. +.TP +.B \-- +Treats all subsequent arguments as file names, even if they start +with a dash. This is so you can handle files with names beginning +with a dash, for example: bzip2 \-- \-myfilename. +.TP +.B \--repetitive-fast --repetitive-best +These flags are redundant in versions 0.9.5 and above. They provided +some coarse control over the behaviour of the sorting algorithm in +earlier versions, which was sometimes useful. 0.9.5 and above have an +improved algorithm which renders these flags irrelevant. + +.SH MEMORY MANAGEMENT +.I bzip2 +compresses large files in blocks. The block size affects +both the compression ratio achieved, and the amount of memory needed for +compression and decompression. The flags \-1 through \-9 +specify the block size to be 100,000 bytes through 900,000 bytes (the +default) respectively. At decompression time, the block size used for +compression is read from the header of the compressed file, and +.I bunzip2 +then allocates itself just enough memory to decompress +the file. Since block sizes are stored in compressed files, it follows +that the flags \-1 to \-9 are irrelevant to and so ignored +during decompression. + +Compression and decompression requirements, +in bytes, can be estimated as: + + Compression: 400k + ( 8 x block size ) + + Decompression: 100k + ( 4 x block size ), or + 100k + ( 2.5 x block size ) + +Larger block sizes give rapidly diminishing marginal returns. Most of +the compression comes from the first two or three hundred k of block +size, a fact worth bearing in mind when using +.I bzip2 +on small machines. +It is also important to appreciate that the decompression memory +requirement is set at compression time by the choice of block size. + +For files compressed with the default 900k block size, +.I bunzip2 +will require about 3700 kbytes to decompress. To support decompression +of any file on a 4 megabyte machine, +.I bunzip2 +has an option to +decompress using approximately half this amount of memory, about 2300 +kbytes. Decompression speed is also halved, so you should use this +option only where necessary. The relevant flag is -s. + +In general, try and use the largest block size memory constraints allow, +since that maximises the compression achieved. Compression and +decompression speed are virtually unaffected by block size. + +Another significant point applies to files which fit in a single block +-- that means most files you'd encounter using a large block size. The +amount of real memory touched is proportional to the size of the file, +since the file is smaller than a block. For example, compressing a file +20,000 bytes long with the flag -9 will cause the compressor to +allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560 +kbytes of it. Similarly, the decompressor will allocate 3700k but only +touch 100k + 20000 * 4 = 180 kbytes. + +Here is a table which summarises the maximum memory usage for different +block sizes. Also recorded is the total compressed size for 14 files of +the Calgary Text Compression Corpus totalling 3,141,622 bytes. This +column gives some feel for how compression varies with block size. +These figures tend to understate the advantage of larger block sizes for +larger files, since the Corpus is dominated by smaller files. + + Compress Decompress Decompress Corpus + Flag usage usage -s usage Size + + -1 1200k 500k 350k 914704 + -2 2000k 900k 600k 877703 + -3 2800k 1300k 850k 860338 + -4 3600k 1700k 1100k 846899 + -5 4400k 2100k 1350k 845160 + -6 5200k 2500k 1600k 838626 + -7 6100k 2900k 1850k 834096 + -8 6800k 3300k 2100k 828642 + -9 7600k 3700k 2350k 828642 + +.SH RECOVERING DATA FROM DAMAGED FILES +.I bzip2 +compresses files in blocks, usually 900kbytes long. Each +block is handled independently. If a media or transmission error causes +a multi-block .bz2 +file to become damaged, it may be possible to +recover data from the undamaged blocks in the file. + +The compressed representation of each block is delimited by a 48-bit +pattern, which makes it possible to find the block boundaries with +reasonable certainty. Each block also carries its own 32-bit CRC, so +damaged blocks can be distinguished from undamaged ones. + +.I bzip2recover +is a simple program whose purpose is to search for +blocks in .bz2 files, and write each block out into its own .bz2 +file. You can then use +.I bzip2 +\-t +to test the +integrity of the resulting files, and decompress those which are +undamaged. + +.I bzip2recover +takes a single argument, the name of the damaged file, +and writes a number of files "rec00001file.bz2", +"rec00002file.bz2", etc, containing the extracted blocks. +The output filenames are designed so that the use of +wildcards in subsequent processing -- for example, +"bzip2 -dc rec*file.bz2 > recovered_data" -- processes the files in +the correct order. + +.I bzip2recover +should be of most use dealing with large .bz2 +files, as these will contain many blocks. It is clearly +futile to use it on damaged single-block files, since a +damaged block cannot be recovered. If you wish to minimise +any potential data loss through media or transmission errors, +you might consider compressing with a smaller +block size. + +.SH PERFORMANCE NOTES +The sorting phase of compression gathers together similar strings in the +file. Because of this, files containing very long runs of repeated +symbols, like "aabaabaabaab ..." (repeated several hundred times) may +compress more slowly than normal. Versions 0.9.5 and above fare much +better than previous versions in this respect. The ratio between +worst-case and average-case compression time is in the region of 10:1. +For previous versions, this figure was more like 100:1. You can use the +\-vvvv option to monitor progress in great detail, if you want. + +Decompression speed is unaffected by these phenomena. + +.I bzip2 +usually allocates several megabytes of memory to operate +in, and then charges all over it in a fairly random fashion. This means +that performance, both for compressing and decompressing, is largely +determined by the speed at which your machine can service cache misses. +Because of this, small changes to the code to reduce the miss rate have +been observed to give disproportionately large performance improvements. +I imagine +.I bzip2 +will perform best on machines with very large caches. + +.SH CAVEATS +I/O error messages are not as helpful as they could be. +.I bzip2 +tries hard to detect I/O errors and exit cleanly, but the details of +what the problem is sometimes seem rather misleading. + +This manual page pertains to version 1.0.2 of +.I bzip2. +Compressed data created by this version is entirely forwards and +backwards compatible with the previous public releases, versions +0.1pl2, 0.9.0, 0.9.5, 1.0.0 and 1.0.1, but with the following +exception: 0.9.0 and above can correctly decompress multiple +concatenated compressed files. 0.1pl2 cannot do this; it will stop +after decompressing just the first file in the stream. + +.I bzip2recover +versions prior to this one, 1.0.2, used 32-bit integers to represent +bit positions in compressed files, so it could not handle compressed +files more than 512 megabytes long. Version 1.0.2 and above uses +64-bit ints on some platforms which support them (GNU supported +targets, and Windows). To establish whether or not bzip2recover was +built with such a limitation, run it without arguments. In any event +you can build yourself an unlimited version if you can recompile it +with MaybeUInt64 set to be an unsigned 64-bit integer. + + + +.SH AUTHOR +Julian Seward, jseward@acm.org. + +http://sources.redhat.com/bzip2 + +The ideas embodied in +.I bzip2 +are due to (at least) the following +people: Michael Burrows and David Wheeler (for the block sorting +transformation), David Wheeler (again, for the Huffman coder), Peter +Fenwick (for the structured coding model in the original +.I bzip, +and many refinements), and Alistair Moffat, Radford Neal and Ian Witten +(for the arithmetic coder in the original +.I bzip). +I am much +indebted for their help, support and advice. See the manual in the +source distribution for pointers to sources of documentation. Christian +von Roques encouraged me to look for faster sorting algorithms, so as to +speed up compression. Bela Lubkin encouraged me to improve the +worst-case compression performance. +The bz* scripts are derived from those of GNU gzip. +Many people sent patches, helped +with portability problems, lent machines, gave advice and were generally +helpful. diff --git a/raw/man1/bzcat.1 b/raw/man1/bzcat.1 new file mode 100644 index 00000000..623435c2 --- /dev/null +++ b/raw/man1/bzcat.1 @@ -0,0 +1,453 @@ +.PU +.TH bzip2 1 +.SH NAME +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.2 +.br +bzcat \- decompresses files to stdout +.br +bzip2recover \- recovers data from damaged bzip2 files + +.SH SYNOPSIS +.ll +8 +.B bzip2 +.RB [ " \-cdfkqstvzVL123456789 " ] +[ +.I "filenames \&..." +] +.ll -8 +.br +.B bunzip2 +.RB [ " \-fkvsVL " ] +[ +.I "filenames \&..." +] +.br +.B bzcat +.RB [ " \-s " ] +[ +.I "filenames \&..." +] +.br +.B bzip2recover +.I "filename" + +.SH DESCRIPTION +.I bzip2 +compresses files using the Burrows-Wheeler block sorting +text compression algorithm, and Huffman coding. Compression is +generally considerably better than that achieved by more conventional +LZ77/LZ78-based compressors, and approaches the performance of the PPM +family of statistical compressors. + +The command-line options are deliberately very similar to +those of +.I GNU gzip, +but they are not identical. + +.I bzip2 +expects a list of file names to accompany the +command-line flags. Each file is replaced by a compressed version of +itself, with the name "original_name.bz2". +Each compressed file +has the same modification date, permissions, and, when possible, +ownership as the corresponding original, so that these properties can +be correctly restored at decompression time. File name handling is +naive in the sense that there is no mechanism for preserving original +file names, permissions, ownerships or dates in filesystems which lack +these concepts, or have serious file name length restrictions, such as +MS-DOS. + +.I bzip2 +and +.I bunzip2 +will by default not overwrite existing +files. If you want this to happen, specify the \-f flag. + +If no file names are specified, +.I bzip2 +compresses from standard +input to standard output. In this case, +.I bzip2 +will decline to +write compressed output to a terminal, as this would be entirely +incomprehensible and therefore pointless. + +.I bunzip2 +(or +.I bzip2 \-d) +decompresses all +specified files. Files which were not created by +.I bzip2 +will be detected and ignored, and a warning issued. +.I bzip2 +attempts to guess the filename for the decompressed file +from that of the compressed file as follows: + + filename.bz2 becomes filename + filename.bz becomes filename + filename.tbz2 becomes filename.tar + filename.tbz becomes filename.tar + anyothername becomes anyothername.out + +If the file does not end in one of the recognised endings, +.I .bz2, +.I .bz, +.I .tbz2 +or +.I .tbz, +.I bzip2 +complains that it cannot +guess the name of the original file, and uses the original name +with +.I .out +appended. + +As with compression, supplying no +filenames causes decompression from +standard input to standard output. + +.I bunzip2 +will correctly decompress a file which is the +concatenation of two or more compressed files. The result is the +concatenation of the corresponding uncompressed files. Integrity +testing (\-t) +of concatenated +compressed files is also supported. + +You can also compress or decompress files to the standard output by +giving the \-c flag. Multiple files may be compressed and +decompressed like this. The resulting outputs are fed sequentially to +stdout. Compression of multiple files +in this manner generates a stream +containing multiple compressed file representations. Such a stream +can be decompressed correctly only by +.I bzip2 +version 0.9.0 or +later. Earlier versions of +.I bzip2 +will stop after decompressing +the first file in the stream. + +.I bzcat +(or +.I bzip2 -dc) +decompresses all specified files to +the standard output. + +.I bzip2 +will read arguments from the environment variables +.I BZIP2 +and +.I BZIP, +in that order, and will process them +before any arguments read from the command line. This gives a +convenient way to supply default arguments. + +Compression is always performed, even if the compressed +file is slightly +larger than the original. Files of less than about one hundred bytes +tend to get larger, since the compression mechanism has a constant +overhead in the region of 50 bytes. Random data (including the output +of most file compressors) is coded at about 8.05 bits per byte, giving +an expansion of around 0.5%. + +As a self-check for your protection, +.I +bzip2 +uses 32-bit CRCs to +make sure that the decompressed version of a file is identical to the +original. This guards against corruption of the compressed data, and +against undetected bugs in +.I bzip2 +(hopefully very unlikely). The +chances of data corruption going undetected is microscopic, about one +chance in four billion for each file processed. Be aware, though, that +the check occurs upon decompression, so it can only tell you that +something is wrong. It can't help you +recover the original uncompressed +data. You can use +.I bzip2recover +to try to recover data from +damaged files. + +Return values: 0 for a normal exit, 1 for environmental problems (file +not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt +compressed file, 3 for an internal consistency error (eg, bug) which +caused +.I bzip2 +to panic. + +.SH OPTIONS +.TP +.B \-c --stdout +Compress or decompress to standard output. +.TP +.B \-d --decompress +Force decompression. +.I bzip2, +.I bunzip2 +and +.I bzcat +are +really the same program, and the decision about what actions to take is +done on the basis of which name is used. This flag overrides that +mechanism, and forces +.I bzip2 +to decompress. +.TP +.B \-z --compress +The complement to \-d: forces compression, regardless of the +invocation name. +.TP +.B \-t --test +Check integrity of the specified file(s), but don't decompress them. +This really performs a trial decompression and throws away the result. +.TP +.B \-f --force +Force overwrite of output files. Normally, +.I bzip2 +will not overwrite +existing output files. Also forces +.I bzip2 +to break hard links +to files, which it otherwise wouldn't do. + +bzip2 normally declines to decompress files which don't have the +correct magic header bytes. If forced (-f), however, it will pass +such files through unmodified. This is how GNU gzip behaves. +.TP +.B \-k --keep +Keep (don't delete) input files during compression +or decompression. +.TP +.B \-s --small +Reduce memory usage, for compression, decompression and testing. Files +are decompressed and tested using a modified algorithm which only +requires 2.5 bytes per block byte. This means any file can be +decompressed in 2300k of memory, albeit at about half the normal speed. + +During compression, \-s selects a block size of 200k, which limits +memory use to around the same figure, at the expense of your compression +ratio. In short, if your machine is low on memory (8 megabytes or +less), use \-s for everything. See MEMORY MANAGEMENT below. +.TP +.B \-q --quiet +Suppress non-essential warning messages. Messages pertaining to +I/O errors and other critical events will not be suppressed. +.TP +.B \-v --verbose +Verbose mode -- show the compression ratio for each file processed. +Further \-v's increase the verbosity level, spewing out lots of +information which is primarily of interest for diagnostic purposes. +.TP +.B \-L --license -V --version +Display the software version, license terms and conditions. +.TP +.B \-1 (or \-\-fast) to \-9 (or \-\-best) +Set the block size to 100 k, 200 k .. 900 k when compressing. Has no +effect when decompressing. See MEMORY MANAGEMENT below. +The \-\-fast and \-\-best aliases are primarily for GNU gzip +compatibility. In particular, \-\-fast doesn't make things +significantly faster. +And \-\-best merely selects the default behaviour. +.TP +.B \-- +Treats all subsequent arguments as file names, even if they start +with a dash. This is so you can handle files with names beginning +with a dash, for example: bzip2 \-- \-myfilename. +.TP +.B \--repetitive-fast --repetitive-best +These flags are redundant in versions 0.9.5 and above. They provided +some coarse control over the behaviour of the sorting algorithm in +earlier versions, which was sometimes useful. 0.9.5 and above have an +improved algorithm which renders these flags irrelevant. + +.SH MEMORY MANAGEMENT +.I bzip2 +compresses large files in blocks. The block size affects +both the compression ratio achieved, and the amount of memory needed for +compression and decompression. The flags \-1 through \-9 +specify the block size to be 100,000 bytes through 900,000 bytes (the +default) respectively. At decompression time, the block size used for +compression is read from the header of the compressed file, and +.I bunzip2 +then allocates itself just enough memory to decompress +the file. Since block sizes are stored in compressed files, it follows +that the flags \-1 to \-9 are irrelevant to and so ignored +during decompression. + +Compression and decompression requirements, +in bytes, can be estimated as: + + Compression: 400k + ( 8 x block size ) + + Decompression: 100k + ( 4 x block size ), or + 100k + ( 2.5 x block size ) + +Larger block sizes give rapidly diminishing marginal returns. Most of +the compression comes from the first two or three hundred k of block +size, a fact worth bearing in mind when using +.I bzip2 +on small machines. +It is also important to appreciate that the decompression memory +requirement is set at compression time by the choice of block size. + +For files compressed with the default 900k block size, +.I bunzip2 +will require about 3700 kbytes to decompress. To support decompression +of any file on a 4 megabyte machine, +.I bunzip2 +has an option to +decompress using approximately half this amount of memory, about 2300 +kbytes. Decompression speed is also halved, so you should use this +option only where necessary. The relevant flag is -s. + +In general, try and use the largest block size memory constraints allow, +since that maximises the compression achieved. Compression and +decompression speed are virtually unaffected by block size. + +Another significant point applies to files which fit in a single block +-- that means most files you'd encounter using a large block size. The +amount of real memory touched is proportional to the size of the file, +since the file is smaller than a block. For example, compressing a file +20,000 bytes long with the flag -9 will cause the compressor to +allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560 +kbytes of it. Similarly, the decompressor will allocate 3700k but only +touch 100k + 20000 * 4 = 180 kbytes. + +Here is a table which summarises the maximum memory usage for different +block sizes. Also recorded is the total compressed size for 14 files of +the Calgary Text Compression Corpus totalling 3,141,622 bytes. This +column gives some feel for how compression varies with block size. +These figures tend to understate the advantage of larger block sizes for +larger files, since the Corpus is dominated by smaller files. + + Compress Decompress Decompress Corpus + Flag usage usage -s usage Size + + -1 1200k 500k 350k 914704 + -2 2000k 900k 600k 877703 + -3 2800k 1300k 850k 860338 + -4 3600k 1700k 1100k 846899 + -5 4400k 2100k 1350k 845160 + -6 5200k 2500k 1600k 838626 + -7 6100k 2900k 1850k 834096 + -8 6800k 3300k 2100k 828642 + -9 7600k 3700k 2350k 828642 + +.SH RECOVERING DATA FROM DAMAGED FILES +.I bzip2 +compresses files in blocks, usually 900kbytes long. Each +block is handled independently. If a media or transmission error causes +a multi-block .bz2 +file to become damaged, it may be possible to +recover data from the undamaged blocks in the file. + +The compressed representation of each block is delimited by a 48-bit +pattern, which makes it possible to find the block boundaries with +reasonable certainty. Each block also carries its own 32-bit CRC, so +damaged blocks can be distinguished from undamaged ones. + +.I bzip2recover +is a simple program whose purpose is to search for +blocks in .bz2 files, and write each block out into its own .bz2 +file. You can then use +.I bzip2 +\-t +to test the +integrity of the resulting files, and decompress those which are +undamaged. + +.I bzip2recover +takes a single argument, the name of the damaged file, +and writes a number of files "rec00001file.bz2", +"rec00002file.bz2", etc, containing the extracted blocks. +The output filenames are designed so that the use of +wildcards in subsequent processing -- for example, +"bzip2 -dc rec*file.bz2 > recovered_data" -- processes the files in +the correct order. + +.I bzip2recover +should be of most use dealing with large .bz2 +files, as these will contain many blocks. It is clearly +futile to use it on damaged single-block files, since a +damaged block cannot be recovered. If you wish to minimise +any potential data loss through media or transmission errors, +you might consider compressing with a smaller +block size. + +.SH PERFORMANCE NOTES +The sorting phase of compression gathers together similar strings in the +file. Because of this, files containing very long runs of repeated +symbols, like "aabaabaabaab ..." (repeated several hundred times) may +compress more slowly than normal. Versions 0.9.5 and above fare much +better than previous versions in this respect. The ratio between +worst-case and average-case compression time is in the region of 10:1. +For previous versions, this figure was more like 100:1. You can use the +\-vvvv option to monitor progress in great detail, if you want. + +Decompression speed is unaffected by these phenomena. + +.I bzip2 +usually allocates several megabytes of memory to operate +in, and then charges all over it in a fairly random fashion. This means +that performance, both for compressing and decompressing, is largely +determined by the speed at which your machine can service cache misses. +Because of this, small changes to the code to reduce the miss rate have +been observed to give disproportionately large performance improvements. +I imagine +.I bzip2 +will perform best on machines with very large caches. + +.SH CAVEATS +I/O error messages are not as helpful as they could be. +.I bzip2 +tries hard to detect I/O errors and exit cleanly, but the details of +what the problem is sometimes seem rather misleading. + +This manual page pertains to version 1.0.2 of +.I bzip2. +Compressed data created by this version is entirely forwards and +backwards compatible with the previous public releases, versions +0.1pl2, 0.9.0, 0.9.5, 1.0.0 and 1.0.1, but with the following +exception: 0.9.0 and above can correctly decompress multiple +concatenated compressed files. 0.1pl2 cannot do this; it will stop +after decompressing just the first file in the stream. + +.I bzip2recover +versions prior to this one, 1.0.2, used 32-bit integers to represent +bit positions in compressed files, so it could not handle compressed +files more than 512 megabytes long. Version 1.0.2 and above uses +64-bit ints on some platforms which support them (GNU supported +targets, and Windows). To establish whether or not bzip2recover was +built with such a limitation, run it without arguments. In any event +you can build yourself an unlimited version if you can recompile it +with MaybeUInt64 set to be an unsigned 64-bit integer. + + + +.SH AUTHOR +Julian Seward, jseward@acm.org. + +http://sources.redhat.com/bzip2 + +The ideas embodied in +.I bzip2 +are due to (at least) the following +people: Michael Burrows and David Wheeler (for the block sorting +transformation), David Wheeler (again, for the Huffman coder), Peter +Fenwick (for the structured coding model in the original +.I bzip, +and many refinements), and Alistair Moffat, Radford Neal and Ian Witten +(for the arithmetic coder in the original +.I bzip). +I am much +indebted for their help, support and advice. See the manual in the +source distribution for pointers to sources of documentation. Christian +von Roques encouraged me to look for faster sorting algorithms, so as to +speed up compression. Bela Lubkin encouraged me to improve the +worst-case compression performance. +The bz* scripts are derived from those of GNU gzip. +Many people sent patches, helped +with portability problems, lent machines, gave advice and were generally +helpful. diff --git a/raw/man1/bzip2.1 b/raw/man1/bzip2.1 new file mode 100644 index 00000000..623435c2 --- /dev/null +++ b/raw/man1/bzip2.1 @@ -0,0 +1,453 @@ +.PU +.TH bzip2 1 +.SH NAME +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.2 +.br +bzcat \- decompresses files to stdout +.br +bzip2recover \- recovers data from damaged bzip2 files + +.SH SYNOPSIS +.ll +8 +.B bzip2 +.RB [ " \-cdfkqstvzVL123456789 " ] +[ +.I "filenames \&..." +] +.ll -8 +.br +.B bunzip2 +.RB [ " \-fkvsVL " ] +[ +.I "filenames \&..." +] +.br +.B bzcat +.RB [ " \-s " ] +[ +.I "filenames \&..." +] +.br +.B bzip2recover +.I "filename" + +.SH DESCRIPTION +.I bzip2 +compresses files using the Burrows-Wheeler block sorting +text compression algorithm, and Huffman coding. Compression is +generally considerably better than that achieved by more conventional +LZ77/LZ78-based compressors, and approaches the performance of the PPM +family of statistical compressors. + +The command-line options are deliberately very similar to +those of +.I GNU gzip, +but they are not identical. + +.I bzip2 +expects a list of file names to accompany the +command-line flags. Each file is replaced by a compressed version of +itself, with the name "original_name.bz2". +Each compressed file +has the same modification date, permissions, and, when possible, +ownership as the corresponding original, so that these properties can +be correctly restored at decompression time. File name handling is +naive in the sense that there is no mechanism for preserving original +file names, permissions, ownerships or dates in filesystems which lack +these concepts, or have serious file name length restrictions, such as +MS-DOS. + +.I bzip2 +and +.I bunzip2 +will by default not overwrite existing +files. If you want this to happen, specify the \-f flag. + +If no file names are specified, +.I bzip2 +compresses from standard +input to standard output. In this case, +.I bzip2 +will decline to +write compressed output to a terminal, as this would be entirely +incomprehensible and therefore pointless. + +.I bunzip2 +(or +.I bzip2 \-d) +decompresses all +specified files. Files which were not created by +.I bzip2 +will be detected and ignored, and a warning issued. +.I bzip2 +attempts to guess the filename for the decompressed file +from that of the compressed file as follows: + + filename.bz2 becomes filename + filename.bz becomes filename + filename.tbz2 becomes filename.tar + filename.tbz becomes filename.tar + anyothername becomes anyothername.out + +If the file does not end in one of the recognised endings, +.I .bz2, +.I .bz, +.I .tbz2 +or +.I .tbz, +.I bzip2 +complains that it cannot +guess the name of the original file, and uses the original name +with +.I .out +appended. + +As with compression, supplying no +filenames causes decompression from +standard input to standard output. + +.I bunzip2 +will correctly decompress a file which is the +concatenation of two or more compressed files. The result is the +concatenation of the corresponding uncompressed files. Integrity +testing (\-t) +of concatenated +compressed files is also supported. + +You can also compress or decompress files to the standard output by +giving the \-c flag. Multiple files may be compressed and +decompressed like this. The resulting outputs are fed sequentially to +stdout. Compression of multiple files +in this manner generates a stream +containing multiple compressed file representations. Such a stream +can be decompressed correctly only by +.I bzip2 +version 0.9.0 or +later. Earlier versions of +.I bzip2 +will stop after decompressing +the first file in the stream. + +.I bzcat +(or +.I bzip2 -dc) +decompresses all specified files to +the standard output. + +.I bzip2 +will read arguments from the environment variables +.I BZIP2 +and +.I BZIP, +in that order, and will process them +before any arguments read from the command line. This gives a +convenient way to supply default arguments. + +Compression is always performed, even if the compressed +file is slightly +larger than the original. Files of less than about one hundred bytes +tend to get larger, since the compression mechanism has a constant +overhead in the region of 50 bytes. Random data (including the output +of most file compressors) is coded at about 8.05 bits per byte, giving +an expansion of around 0.5%. + +As a self-check for your protection, +.I +bzip2 +uses 32-bit CRCs to +make sure that the decompressed version of a file is identical to the +original. This guards against corruption of the compressed data, and +against undetected bugs in +.I bzip2 +(hopefully very unlikely). The +chances of data corruption going undetected is microscopic, about one +chance in four billion for each file processed. Be aware, though, that +the check occurs upon decompression, so it can only tell you that +something is wrong. It can't help you +recover the original uncompressed +data. You can use +.I bzip2recover +to try to recover data from +damaged files. + +Return values: 0 for a normal exit, 1 for environmental problems (file +not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt +compressed file, 3 for an internal consistency error (eg, bug) which +caused +.I bzip2 +to panic. + +.SH OPTIONS +.TP +.B \-c --stdout +Compress or decompress to standard output. +.TP +.B \-d --decompress +Force decompression. +.I bzip2, +.I bunzip2 +and +.I bzcat +are +really the same program, and the decision about what actions to take is +done on the basis of which name is used. This flag overrides that +mechanism, and forces +.I bzip2 +to decompress. +.TP +.B \-z --compress +The complement to \-d: forces compression, regardless of the +invocation name. +.TP +.B \-t --test +Check integrity of the specified file(s), but don't decompress them. +This really performs a trial decompression and throws away the result. +.TP +.B \-f --force +Force overwrite of output files. Normally, +.I bzip2 +will not overwrite +existing output files. Also forces +.I bzip2 +to break hard links +to files, which it otherwise wouldn't do. + +bzip2 normally declines to decompress files which don't have the +correct magic header bytes. If forced (-f), however, it will pass +such files through unmodified. This is how GNU gzip behaves. +.TP +.B \-k --keep +Keep (don't delete) input files during compression +or decompression. +.TP +.B \-s --small +Reduce memory usage, for compression, decompression and testing. Files +are decompressed and tested using a modified algorithm which only +requires 2.5 bytes per block byte. This means any file can be +decompressed in 2300k of memory, albeit at about half the normal speed. + +During compression, \-s selects a block size of 200k, which limits +memory use to around the same figure, at the expense of your compression +ratio. In short, if your machine is low on memory (8 megabytes or +less), use \-s for everything. See MEMORY MANAGEMENT below. +.TP +.B \-q --quiet +Suppress non-essential warning messages. Messages pertaining to +I/O errors and other critical events will not be suppressed. +.TP +.B \-v --verbose +Verbose mode -- show the compression ratio for each file processed. +Further \-v's increase the verbosity level, spewing out lots of +information which is primarily of interest for diagnostic purposes. +.TP +.B \-L --license -V --version +Display the software version, license terms and conditions. +.TP +.B \-1 (or \-\-fast) to \-9 (or \-\-best) +Set the block size to 100 k, 200 k .. 900 k when compressing. Has no +effect when decompressing. See MEMORY MANAGEMENT below. +The \-\-fast and \-\-best aliases are primarily for GNU gzip +compatibility. In particular, \-\-fast doesn't make things +significantly faster. +And \-\-best merely selects the default behaviour. +.TP +.B \-- +Treats all subsequent arguments as file names, even if they start +with a dash. This is so you can handle files with names beginning +with a dash, for example: bzip2 \-- \-myfilename. +.TP +.B \--repetitive-fast --repetitive-best +These flags are redundant in versions 0.9.5 and above. They provided +some coarse control over the behaviour of the sorting algorithm in +earlier versions, which was sometimes useful. 0.9.5 and above have an +improved algorithm which renders these flags irrelevant. + +.SH MEMORY MANAGEMENT +.I bzip2 +compresses large files in blocks. The block size affects +both the compression ratio achieved, and the amount of memory needed for +compression and decompression. The flags \-1 through \-9 +specify the block size to be 100,000 bytes through 900,000 bytes (the +default) respectively. At decompression time, the block size used for +compression is read from the header of the compressed file, and +.I bunzip2 +then allocates itself just enough memory to decompress +the file. Since block sizes are stored in compressed files, it follows +that the flags \-1 to \-9 are irrelevant to and so ignored +during decompression. + +Compression and decompression requirements, +in bytes, can be estimated as: + + Compression: 400k + ( 8 x block size ) + + Decompression: 100k + ( 4 x block size ), or + 100k + ( 2.5 x block size ) + +Larger block sizes give rapidly diminishing marginal returns. Most of +the compression comes from the first two or three hundred k of block +size, a fact worth bearing in mind when using +.I bzip2 +on small machines. +It is also important to appreciate that the decompression memory +requirement is set at compression time by the choice of block size. + +For files compressed with the default 900k block size, +.I bunzip2 +will require about 3700 kbytes to decompress. To support decompression +of any file on a 4 megabyte machine, +.I bunzip2 +has an option to +decompress using approximately half this amount of memory, about 2300 +kbytes. Decompression speed is also halved, so you should use this +option only where necessary. The relevant flag is -s. + +In general, try and use the largest block size memory constraints allow, +since that maximises the compression achieved. Compression and +decompression speed are virtually unaffected by block size. + +Another significant point applies to files which fit in a single block +-- that means most files you'd encounter using a large block size. The +amount of real memory touched is proportional to the size of the file, +since the file is smaller than a block. For example, compressing a file +20,000 bytes long with the flag -9 will cause the compressor to +allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560 +kbytes of it. Similarly, the decompressor will allocate 3700k but only +touch 100k + 20000 * 4 = 180 kbytes. + +Here is a table which summarises the maximum memory usage for different +block sizes. Also recorded is the total compressed size for 14 files of +the Calgary Text Compression Corpus totalling 3,141,622 bytes. This +column gives some feel for how compression varies with block size. +These figures tend to understate the advantage of larger block sizes for +larger files, since the Corpus is dominated by smaller files. + + Compress Decompress Decompress Corpus + Flag usage usage -s usage Size + + -1 1200k 500k 350k 914704 + -2 2000k 900k 600k 877703 + -3 2800k 1300k 850k 860338 + -4 3600k 1700k 1100k 846899 + -5 4400k 2100k 1350k 845160 + -6 5200k 2500k 1600k 838626 + -7 6100k 2900k 1850k 834096 + -8 6800k 3300k 2100k 828642 + -9 7600k 3700k 2350k 828642 + +.SH RECOVERING DATA FROM DAMAGED FILES +.I bzip2 +compresses files in blocks, usually 900kbytes long. Each +block is handled independently. If a media or transmission error causes +a multi-block .bz2 +file to become damaged, it may be possible to +recover data from the undamaged blocks in the file. + +The compressed representation of each block is delimited by a 48-bit +pattern, which makes it possible to find the block boundaries with +reasonable certainty. Each block also carries its own 32-bit CRC, so +damaged blocks can be distinguished from undamaged ones. + +.I bzip2recover +is a simple program whose purpose is to search for +blocks in .bz2 files, and write each block out into its own .bz2 +file. You can then use +.I bzip2 +\-t +to test the +integrity of the resulting files, and decompress those which are +undamaged. + +.I bzip2recover +takes a single argument, the name of the damaged file, +and writes a number of files "rec00001file.bz2", +"rec00002file.bz2", etc, containing the extracted blocks. +The output filenames are designed so that the use of +wildcards in subsequent processing -- for example, +"bzip2 -dc rec*file.bz2 > recovered_data" -- processes the files in +the correct order. + +.I bzip2recover +should be of most use dealing with large .bz2 +files, as these will contain many blocks. It is clearly +futile to use it on damaged single-block files, since a +damaged block cannot be recovered. If you wish to minimise +any potential data loss through media or transmission errors, +you might consider compressing with a smaller +block size. + +.SH PERFORMANCE NOTES +The sorting phase of compression gathers together similar strings in the +file. Because of this, files containing very long runs of repeated +symbols, like "aabaabaabaab ..." (repeated several hundred times) may +compress more slowly than normal. Versions 0.9.5 and above fare much +better than previous versions in this respect. The ratio between +worst-case and average-case compression time is in the region of 10:1. +For previous versions, this figure was more like 100:1. You can use the +\-vvvv option to monitor progress in great detail, if you want. + +Decompression speed is unaffected by these phenomena. + +.I bzip2 +usually allocates several megabytes of memory to operate +in, and then charges all over it in a fairly random fashion. This means +that performance, both for compressing and decompressing, is largely +determined by the speed at which your machine can service cache misses. +Because of this, small changes to the code to reduce the miss rate have +been observed to give disproportionately large performance improvements. +I imagine +.I bzip2 +will perform best on machines with very large caches. + +.SH CAVEATS +I/O error messages are not as helpful as they could be. +.I bzip2 +tries hard to detect I/O errors and exit cleanly, but the details of +what the problem is sometimes seem rather misleading. + +This manual page pertains to version 1.0.2 of +.I bzip2. +Compressed data created by this version is entirely forwards and +backwards compatible with the previous public releases, versions +0.1pl2, 0.9.0, 0.9.5, 1.0.0 and 1.0.1, but with the following +exception: 0.9.0 and above can correctly decompress multiple +concatenated compressed files. 0.1pl2 cannot do this; it will stop +after decompressing just the first file in the stream. + +.I bzip2recover +versions prior to this one, 1.0.2, used 32-bit integers to represent +bit positions in compressed files, so it could not handle compressed +files more than 512 megabytes long. Version 1.0.2 and above uses +64-bit ints on some platforms which support them (GNU supported +targets, and Windows). To establish whether or not bzip2recover was +built with such a limitation, run it without arguments. In any event +you can build yourself an unlimited version if you can recompile it +with MaybeUInt64 set to be an unsigned 64-bit integer. + + + +.SH AUTHOR +Julian Seward, jseward@acm.org. + +http://sources.redhat.com/bzip2 + +The ideas embodied in +.I bzip2 +are due to (at least) the following +people: Michael Burrows and David Wheeler (for the block sorting +transformation), David Wheeler (again, for the Huffman coder), Peter +Fenwick (for the structured coding model in the original +.I bzip, +and many refinements), and Alistair Moffat, Radford Neal and Ian Witten +(for the arithmetic coder in the original +.I bzip). +I am much +indebted for their help, support and advice. See the manual in the +source distribution for pointers to sources of documentation. Christian +von Roques encouraged me to look for faster sorting algorithms, so as to +speed up compression. Bela Lubkin encouraged me to improve the +worst-case compression performance. +The bz* scripts are derived from those of GNU gzip. +Many people sent patches, helped +with portability problems, lent machines, gave advice and were generally +helpful. diff --git a/raw/man1/bzip2recover.1 b/raw/man1/bzip2recover.1 new file mode 100644 index 00000000..623435c2 --- /dev/null +++ b/raw/man1/bzip2recover.1 @@ -0,0 +1,453 @@ +.PU +.TH bzip2 1 +.SH NAME +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.2 +.br +bzcat \- decompresses files to stdout +.br +bzip2recover \- recovers data from damaged bzip2 files + +.SH SYNOPSIS +.ll +8 +.B bzip2 +.RB [ " \-cdfkqstvzVL123456789 " ] +[ +.I "filenames \&..." +] +.ll -8 +.br +.B bunzip2 +.RB [ " \-fkvsVL " ] +[ +.I "filenames \&..." +] +.br +.B bzcat +.RB [ " \-s " ] +[ +.I "filenames \&..." +] +.br +.B bzip2recover +.I "filename" + +.SH DESCRIPTION +.I bzip2 +compresses files using the Burrows-Wheeler block sorting +text compression algorithm, and Huffman coding. Compression is +generally considerably better than that achieved by more conventional +LZ77/LZ78-based compressors, and approaches the performance of the PPM +family of statistical compressors. + +The command-line options are deliberately very similar to +those of +.I GNU gzip, +but they are not identical. + +.I bzip2 +expects a list of file names to accompany the +command-line flags. Each file is replaced by a compressed version of +itself, with the name "original_name.bz2". +Each compressed file +has the same modification date, permissions, and, when possible, +ownership as the corresponding original, so that these properties can +be correctly restored at decompression time. File name handling is +naive in the sense that there is no mechanism for preserving original +file names, permissions, ownerships or dates in filesystems which lack +these concepts, or have serious file name length restrictions, such as +MS-DOS. + +.I bzip2 +and +.I bunzip2 +will by default not overwrite existing +files. If you want this to happen, specify the \-f flag. + +If no file names are specified, +.I bzip2 +compresses from standard +input to standard output. In this case, +.I bzip2 +will decline to +write compressed output to a terminal, as this would be entirely +incomprehensible and therefore pointless. + +.I bunzip2 +(or +.I bzip2 \-d) +decompresses all +specified files. Files which were not created by +.I bzip2 +will be detected and ignored, and a warning issued. +.I bzip2 +attempts to guess the filename for the decompressed file +from that of the compressed file as follows: + + filename.bz2 becomes filename + filename.bz becomes filename + filename.tbz2 becomes filename.tar + filename.tbz becomes filename.tar + anyothername becomes anyothername.out + +If the file does not end in one of the recognised endings, +.I .bz2, +.I .bz, +.I .tbz2 +or +.I .tbz, +.I bzip2 +complains that it cannot +guess the name of the original file, and uses the original name +with +.I .out +appended. + +As with compression, supplying no +filenames causes decompression from +standard input to standard output. + +.I bunzip2 +will correctly decompress a file which is the +concatenation of two or more compressed files. The result is the +concatenation of the corresponding uncompressed files. Integrity +testing (\-t) +of concatenated +compressed files is also supported. + +You can also compress or decompress files to the standard output by +giving the \-c flag. Multiple files may be compressed and +decompressed like this. The resulting outputs are fed sequentially to +stdout. Compression of multiple files +in this manner generates a stream +containing multiple compressed file representations. Such a stream +can be decompressed correctly only by +.I bzip2 +version 0.9.0 or +later. Earlier versions of +.I bzip2 +will stop after decompressing +the first file in the stream. + +.I bzcat +(or +.I bzip2 -dc) +decompresses all specified files to +the standard output. + +.I bzip2 +will read arguments from the environment variables +.I BZIP2 +and +.I BZIP, +in that order, and will process them +before any arguments read from the command line. This gives a +convenient way to supply default arguments. + +Compression is always performed, even if the compressed +file is slightly +larger than the original. Files of less than about one hundred bytes +tend to get larger, since the compression mechanism has a constant +overhead in the region of 50 bytes. Random data (including the output +of most file compressors) is coded at about 8.05 bits per byte, giving +an expansion of around 0.5%. + +As a self-check for your protection, +.I +bzip2 +uses 32-bit CRCs to +make sure that the decompressed version of a file is identical to the +original. This guards against corruption of the compressed data, and +against undetected bugs in +.I bzip2 +(hopefully very unlikely). The +chances of data corruption going undetected is microscopic, about one +chance in four billion for each file processed. Be aware, though, that +the check occurs upon decompression, so it can only tell you that +something is wrong. It can't help you +recover the original uncompressed +data. You can use +.I bzip2recover +to try to recover data from +damaged files. + +Return values: 0 for a normal exit, 1 for environmental problems (file +not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt +compressed file, 3 for an internal consistency error (eg, bug) which +caused +.I bzip2 +to panic. + +.SH OPTIONS +.TP +.B \-c --stdout +Compress or decompress to standard output. +.TP +.B \-d --decompress +Force decompression. +.I bzip2, +.I bunzip2 +and +.I bzcat +are +really the same program, and the decision about what actions to take is +done on the basis of which name is used. This flag overrides that +mechanism, and forces +.I bzip2 +to decompress. +.TP +.B \-z --compress +The complement to \-d: forces compression, regardless of the +invocation name. +.TP +.B \-t --test +Check integrity of the specified file(s), but don't decompress them. +This really performs a trial decompression and throws away the result. +.TP +.B \-f --force +Force overwrite of output files. Normally, +.I bzip2 +will not overwrite +existing output files. Also forces +.I bzip2 +to break hard links +to files, which it otherwise wouldn't do. + +bzip2 normally declines to decompress files which don't have the +correct magic header bytes. If forced (-f), however, it will pass +such files through unmodified. This is how GNU gzip behaves. +.TP +.B \-k --keep +Keep (don't delete) input files during compression +or decompression. +.TP +.B \-s --small +Reduce memory usage, for compression, decompression and testing. Files +are decompressed and tested using a modified algorithm which only +requires 2.5 bytes per block byte. This means any file can be +decompressed in 2300k of memory, albeit at about half the normal speed. + +During compression, \-s selects a block size of 200k, which limits +memory use to around the same figure, at the expense of your compression +ratio. In short, if your machine is low on memory (8 megabytes or +less), use \-s for everything. See MEMORY MANAGEMENT below. +.TP +.B \-q --quiet +Suppress non-essential warning messages. Messages pertaining to +I/O errors and other critical events will not be suppressed. +.TP +.B \-v --verbose +Verbose mode -- show the compression ratio for each file processed. +Further \-v's increase the verbosity level, spewing out lots of +information which is primarily of interest for diagnostic purposes. +.TP +.B \-L --license -V --version +Display the software version, license terms and conditions. +.TP +.B \-1 (or \-\-fast) to \-9 (or \-\-best) +Set the block size to 100 k, 200 k .. 900 k when compressing. Has no +effect when decompressing. See MEMORY MANAGEMENT below. +The \-\-fast and \-\-best aliases are primarily for GNU gzip +compatibility. In particular, \-\-fast doesn't make things +significantly faster. +And \-\-best merely selects the default behaviour. +.TP +.B \-- +Treats all subsequent arguments as file names, even if they start +with a dash. This is so you can handle files with names beginning +with a dash, for example: bzip2 \-- \-myfilename. +.TP +.B \--repetitive-fast --repetitive-best +These flags are redundant in versions 0.9.5 and above. They provided +some coarse control over the behaviour of the sorting algorithm in +earlier versions, which was sometimes useful. 0.9.5 and above have an +improved algorithm which renders these flags irrelevant. + +.SH MEMORY MANAGEMENT +.I bzip2 +compresses large files in blocks. The block size affects +both the compression ratio achieved, and the amount of memory needed for +compression and decompression. The flags \-1 through \-9 +specify the block size to be 100,000 bytes through 900,000 bytes (the +default) respectively. At decompression time, the block size used for +compression is read from the header of the compressed file, and +.I bunzip2 +then allocates itself just enough memory to decompress +the file. Since block sizes are stored in compressed files, it follows +that the flags \-1 to \-9 are irrelevant to and so ignored +during decompression. + +Compression and decompression requirements, +in bytes, can be estimated as: + + Compression: 400k + ( 8 x block size ) + + Decompression: 100k + ( 4 x block size ), or + 100k + ( 2.5 x block size ) + +Larger block sizes give rapidly diminishing marginal returns. Most of +the compression comes from the first two or three hundred k of block +size, a fact worth bearing in mind when using +.I bzip2 +on small machines. +It is also important to appreciate that the decompression memory +requirement is set at compression time by the choice of block size. + +For files compressed with the default 900k block size, +.I bunzip2 +will require about 3700 kbytes to decompress. To support decompression +of any file on a 4 megabyte machine, +.I bunzip2 +has an option to +decompress using approximately half this amount of memory, about 2300 +kbytes. Decompression speed is also halved, so you should use this +option only where necessary. The relevant flag is -s. + +In general, try and use the largest block size memory constraints allow, +since that maximises the compression achieved. Compression and +decompression speed are virtually unaffected by block size. + +Another significant point applies to files which fit in a single block +-- that means most files you'd encounter using a large block size. The +amount of real memory touched is proportional to the size of the file, +since the file is smaller than a block. For example, compressing a file +20,000 bytes long with the flag -9 will cause the compressor to +allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560 +kbytes of it. Similarly, the decompressor will allocate 3700k but only +touch 100k + 20000 * 4 = 180 kbytes. + +Here is a table which summarises the maximum memory usage for different +block sizes. Also recorded is the total compressed size for 14 files of +the Calgary Text Compression Corpus totalling 3,141,622 bytes. This +column gives some feel for how compression varies with block size. +These figures tend to understate the advantage of larger block sizes for +larger files, since the Corpus is dominated by smaller files. + + Compress Decompress Decompress Corpus + Flag usage usage -s usage Size + + -1 1200k 500k 350k 914704 + -2 2000k 900k 600k 877703 + -3 2800k 1300k 850k 860338 + -4 3600k 1700k 1100k 846899 + -5 4400k 2100k 1350k 845160 + -6 5200k 2500k 1600k 838626 + -7 6100k 2900k 1850k 834096 + -8 6800k 3300k 2100k 828642 + -9 7600k 3700k 2350k 828642 + +.SH RECOVERING DATA FROM DAMAGED FILES +.I bzip2 +compresses files in blocks, usually 900kbytes long. Each +block is handled independently. If a media or transmission error causes +a multi-block .bz2 +file to become damaged, it may be possible to +recover data from the undamaged blocks in the file. + +The compressed representation of each block is delimited by a 48-bit +pattern, which makes it possible to find the block boundaries with +reasonable certainty. Each block also carries its own 32-bit CRC, so +damaged blocks can be distinguished from undamaged ones. + +.I bzip2recover +is a simple program whose purpose is to search for +blocks in .bz2 files, and write each block out into its own .bz2 +file. You can then use +.I bzip2 +\-t +to test the +integrity of the resulting files, and decompress those which are +undamaged. + +.I bzip2recover +takes a single argument, the name of the damaged file, +and writes a number of files "rec00001file.bz2", +"rec00002file.bz2", etc, containing the extracted blocks. +The output filenames are designed so that the use of +wildcards in subsequent processing -- for example, +"bzip2 -dc rec*file.bz2 > recovered_data" -- processes the files in +the correct order. + +.I bzip2recover +should be of most use dealing with large .bz2 +files, as these will contain many blocks. It is clearly +futile to use it on damaged single-block files, since a +damaged block cannot be recovered. If you wish to minimise +any potential data loss through media or transmission errors, +you might consider compressing with a smaller +block size. + +.SH PERFORMANCE NOTES +The sorting phase of compression gathers together similar strings in the +file. Because of this, files containing very long runs of repeated +symbols, like "aabaabaabaab ..." (repeated several hundred times) may +compress more slowly than normal. Versions 0.9.5 and above fare much +better than previous versions in this respect. The ratio between +worst-case and average-case compression time is in the region of 10:1. +For previous versions, this figure was more like 100:1. You can use the +\-vvvv option to monitor progress in great detail, if you want. + +Decompression speed is unaffected by these phenomena. + +.I bzip2 +usually allocates several megabytes of memory to operate +in, and then charges all over it in a fairly random fashion. This means +that performance, both for compressing and decompressing, is largely +determined by the speed at which your machine can service cache misses. +Because of this, small changes to the code to reduce the miss rate have +been observed to give disproportionately large performance improvements. +I imagine +.I bzip2 +will perform best on machines with very large caches. + +.SH CAVEATS +I/O error messages are not as helpful as they could be. +.I bzip2 +tries hard to detect I/O errors and exit cleanly, but the details of +what the problem is sometimes seem rather misleading. + +This manual page pertains to version 1.0.2 of +.I bzip2. +Compressed data created by this version is entirely forwards and +backwards compatible with the previous public releases, versions +0.1pl2, 0.9.0, 0.9.5, 1.0.0 and 1.0.1, but with the following +exception: 0.9.0 and above can correctly decompress multiple +concatenated compressed files. 0.1pl2 cannot do this; it will stop +after decompressing just the first file in the stream. + +.I bzip2recover +versions prior to this one, 1.0.2, used 32-bit integers to represent +bit positions in compressed files, so it could not handle compressed +files more than 512 megabytes long. Version 1.0.2 and above uses +64-bit ints on some platforms which support them (GNU supported +targets, and Windows). To establish whether or not bzip2recover was +built with such a limitation, run it without arguments. In any event +you can build yourself an unlimited version if you can recompile it +with MaybeUInt64 set to be an unsigned 64-bit integer. + + + +.SH AUTHOR +Julian Seward, jseward@acm.org. + +http://sources.redhat.com/bzip2 + +The ideas embodied in +.I bzip2 +are due to (at least) the following +people: Michael Burrows and David Wheeler (for the block sorting +transformation), David Wheeler (again, for the Huffman coder), Peter +Fenwick (for the structured coding model in the original +.I bzip, +and many refinements), and Alistair Moffat, Radford Neal and Ian Witten +(for the arithmetic coder in the original +.I bzip). +I am much +indebted for their help, support and advice. See the manual in the +source distribution for pointers to sources of documentation. Christian +von Roques encouraged me to look for faster sorting algorithms, so as to +speed up compression. Bela Lubkin encouraged me to improve the +worst-case compression performance. +The bz* scripts are derived from those of GNU gzip. +Many people sent patches, helped +with portability problems, lent machines, gave advice and were generally +helpful. diff --git a/raw/man1/cal.1 b/raw/man1/cal.1 new file mode 100644 index 00000000..7d5e71eb --- /dev/null +++ b/raw/man1/cal.1 @@ -0,0 +1,97 @@ +.\" Copyright (c) 1989, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Kim Letkeman. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)cal.1 8.1 (Berkeley) 6/6/93 +.\" +.Dd June 6, 1993 +.Dt CAL 1 +.Os +.Sh NAME +.Nm cal +.Nd displays a calendar +.Sh SYNOPSIS +.Nm cal +.Op Fl smjy13 +.Op [ Ar month ] Ar year +.Sh DESCRIPTION +.Nm Cal +displays a simple calendar. +If arguments are not specified, +the current month is displayed. +The options are as follows: +.Bl -tag -width Ds +.It Fl 1 +Display single month output. +(This is the default.) +.It Fl 3 +Display prev/current/next month output. +.It Fl s +Display Sunday as the first day of the week. +(This is the default.) +.It Fl m +Display Monday as the first day of the week. +.It Fl j +Display Julian dates (days one-based, numbered from January 1). +.It Fl y +Display a calendar for the current year. +.El +.Pp +A single parameter specifies the year (1 - 9999) to be displayed; +note the year must be fully specified: +.Dq Li cal 89 +will +.Em not +display a calendar for 1989. +Two parameters denote the month (1 - 12) and year. +If no parameters are specified, the current month's calendar is +displayed. +.Pp +A year starts on Jan 1. +.Pp +The Gregorian Reformation is assumed to have occurred in 1752 on the 3rd +of September. +By this time, most countries had recognized the reformation (although a +few did not recognize it until the early 1900's.) +Ten days following that date were eliminated by the reformation, so the +calendar for that month is a bit unusual. +.Sh HISTORY +A +.Nm +command appeared in Version 6 AT&T UNIX. +.Sh OTHER VERSIONS +Several much more elaborate versions of this program exist, +with support for colors, holidays, birthdays, reminders and +appointments, etc. For example, try the cal from +http://home.sprynet.com/~cbagwell/projects.html +or GNU gcal. diff --git a/raw/man1/cat.1 b/raw/man1/cat.1 new file mode 100644 index 00000000..5458c0f1 --- /dev/null +++ b/raw/man1/cat.1 @@ -0,0 +1,70 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH CAT "1" "October 2003" "cat (coreutils) 5.0" FSF +.SH NAME +cat \- concatenate files and print on the standard output +.SH SYNOPSIS +.B cat +[\fIOPTION\fR] [\fIFILE\fR]... +.SH DESCRIPTION +.\" Add any additional description here +.PP +Concatenate FILE(s), or standard input, to standard output. +.TP +\fB\-A\fR, \fB\-\-show\-all\fR +equivalent to \fB\-vET\fR +.TP +\fB\-b\fR, \fB\-\-number\-nonblank\fR +number nonblank output lines +.TP +\fB\-e\fR +equivalent to \fB\-vE\fR +.TP +\fB\-E\fR, \fB\-\-show\-ends\fR +display $ at end of each line +.TP +\fB\-n\fR, \fB\-\-number\fR +number all output lines +.TP +\fB\-s\fR, \fB\-\-squeeze\-blank\fR +never more than one single blank line +.TP +\fB\-t\fR +equivalent to \fB\-vT\fR +.TP +\fB\-T\fR, \fB\-\-show\-tabs\fR +display TAB characters as ^I +.TP +\fB\-u\fR +(ignored) +.TP +\fB\-v\fR, \fB\-\-show\-nonprinting\fR +use ^ and M- notation, except for LFD and TAB +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +With no FILE, or when FILE is -, read standard input. +.SH AUTHOR +Written by Torbjorn Granlund and Richard M. Stallman. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B cat +is maintained as a Texinfo manual. If the +.B info +and +.B cat +programs are properly installed at your site, the command +.IP +.B info cat +.PP +should give you access to the complete manual. diff --git a/raw/man1/cd.1 b/raw/man1/cd.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/cd.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/chattr.1 b/raw/man1/chattr.1 new file mode 100644 index 00000000..84d87437 --- /dev/null +++ b/raw/man1/chattr.1 @@ -0,0 +1,142 @@ +.\" -*- nroff -*- +.TH CHATTR 1 "July 2003" "E2fsprogs version 1.34" +.SH NAME +chattr \- change file attributes on a Linux second extended file system +.SH SYNOPSIS +.B chattr +[ +.B \-RV +] +[ +.B \-v +.I version +] +[ +.I mode +] +.I files... +.SH DESCRIPTION +.B chattr +changes the file attributes on a Linux second extended file system. +.PP +The format of a symbolic mode is +-=[ASacDdIijsTtu]. +.PP +The operator `+' causes the selected attributes to be added to the +existing attributes of the files; `-' causes them to be removed; and +`=' causes them to be the only attributes that the files have. +.PP +The letters `ASacDdijsu' select the new attributes for the files: +don't update atime (A), synchronous updates (S), synchronous directory +updates (D), append only (a), compressed (c), no dump (d), immutable (i), +data journalling (j), secure deletion (s), top of directory hierarchy +(T), no tail-merging (t), and undeletable (u). +.SH OPTIONS +.TP +.B \-R +Recursively change attributes of directories and their contents. +Symbolic links encountered during recursive directory traversals are +ignored. +.TP +.B \-V +Be verbose with chattr's output and print the program version. +.TP +.BI \-v " version" +Set the file's version/generation number. +.SH ATTRIBUTES +When a file with the 'A' attribute set is accessed, its atime record is +not modified. This avoids a certain amount of disk I/O for laptop +systems. +.PP +A file with the `a' attribute set can only be open in append mode for writing. +Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE +capability can set or clear this attribute. +.PP +A file with the `c' attribute set is automatically compressed on the disk +by the kernel. A read from this file returns uncompressed data. A write to +this file compresses data before storing them on the disk. +.PP +When a directory with the `D' attribute set is modified, +the changes are written synchronously on the disk; this is equivalent to +the `dirsync' mount option applied to a subset of the files. +.PP +A file with the `d' attribute set is not candidate for backup when the +.BR dump (8) +program is run. +.PP +The 'E' attribute is used by the experimental compression patches to +indicate that a compressed file has a compression error. It may not be +set or reset using +.BR chattr (1), +although it can be displayed by +.BR lsattr (1). +.PP +The 'I' attribute is used by the htree code to indicate that a directory +is behind indexed using hashed trees. It may not be set or reset using +.BR chattr (1), +although it can be displayed by +.BR lsattr (1). +.PP +A file with the `i' attribute cannot be modified: it cannot be deleted or +renamed, no link can be created to this file and no data can be written +to the file. Only the superuser or a process possessing the +CAP_LINUX_IMMUTABLE capability can set or clear this attribute. +.PP +A file with the `j' attribute has all of its data written to the ext3 +journal before being written to the file itself, if the filesystem is +mounted with the "data=ordered" or "data=writeback" options. When the +filesystem is mounted with the "data=journal" option all file data +is already journalled and this attribute has no effect. +Only the superuser or a process possessing the CAP_SYS_RESOURCE +capability can set or clear this attribute. +.PP +When a file with the `s' attribute set is deleted, its blocks are zeroed and +written back to the disk. +.PP +When a file with the `S' attribute set is modified, +the changes are written synchronously on the disk; this is equivalent to +the `sync' mount option applied to a subset of the files. +.PP +A directory with the 'T' attribute will be deemed to be the top of +directory hierarchies for the purposes of the Orlov block allocator +(which is used in on systems with Linux 2.5.46 or later). +.PP +A file with the 't' attribute will not have a partial block fragment at +the end of the file merged with other files (for those filesystems which +support tail-merging). This is necessary for applications such as LILO +which read the filesystem directly, and which don't understand tail-merged +files. Note: As of this writing, the ext2 or ext3 filesystems do not +(yet, except in very experimental patches) support tail-merging. +.PP +When a file with the `u' attribute set is deleted, its contents are saved. +This allows the user to ask for its undeletion. +.PP +The 'X' attribute is used by the experimental compression patches to +indicate that a raw contents of a compressed file can be accessed +directly. It currently may not be set or reset using +.BR chattr (1), +although it can be displayed by +.BR lsattr (1). +.PP +The 'Z' attribute is used by the experimental compression patches to +indicate a compressed file is dirty. It may not be set or reset using +.BR chattr (1), +although it can be displayed by +.BR lsattr (1). +.PP +.SH AUTHOR +.B chattr +was written by Remy Card . +.SH BUGS AND LIMITATIONS +As of Linux 2.2, the `c', 's', and `u' attribute are not honored +by the kernel filesystem code. These attributes will be implemented +in a future ext2 fs version. +.PP +The `j' option is only useful if the filesystem is mounted as ext3. +.PP +The `D' option is only useful on Linux kernel 2.5.19 and later. +.SH AVAILABILITY +.B chattr +is part of the e2fsprogs package and is available from +http://e2fsprogs.sourceforge.net. +.SH SEE ALSO +.BR lsattr (1) diff --git a/raw/man1/chfn.1 b/raw/man1/chfn.1 new file mode 100644 index 00000000..8f3213d4 --- /dev/null +++ b/raw/man1/chfn.1 @@ -0,0 +1,62 @@ +.\" +.\" chfn.1 -- change your finger information +.\" (c) 1994 by salvatore valente +.\" +.\" this program is free software. you can redistribute it and +.\" modify it under the terms of the gnu general public license. +.\" there is no warranty. +.\" +.TH CHFN 1 "October 13 1994" "chfn" "Linux Reference Manual" +.SH NAME +chfn \- change your finger information +.SH SYNOPSIS +.B chfn +[\ \-f\ full-name\ ] [\ \-o\ office\ ] [\ \-p\ office-phone\ ] +[\ \-h\ home-phone\ ] [\ \-u\ ] [\ \-v\ ] [\ username\ ] +.SH DESCRIPTION +.B chfn +is used to change your finger information. This information is +stored in the +.I /etc/passwd +file, and is displayed by the +.B finger +program. The Linux +.B finger +command will display four pieces of information that can be changed by +.B chfn +: your real name, your work room and phone, and your home phone. +.SS COMMAND LINE +Any of the four pieces of information can be specified on the command +line. If no information is given on the command line, +.B chfn +enters interactive mode. +.SS INTERACTIVE MODE +In interactive mode, +.B chfn +will prompt for each field. At a prompt, you can enter the new information, +or just press return to leave the field unchanged. Enter the keyword +"none" to make the field blank. +.SH OPTIONS +.TP +.I "\-f, \-\-full-name" +Specify your real name. +.TP +.I "\-o, \-\-office" +Specify your office room number. +.TP +.I "\-p, \-\-office-phone" +Specify your office phone number. +.TP +.I "\-h, \-\-home-phone" +Specify your home phone number. +.TP +.I "\-u, \-\-help" +Print a usage message and exit. +.TP +.I "-v, \-\-version" +Print version information and exit. +.SH "SEE ALSO" +.BR finger (1), +.BR passwd (5) +.SH AUTHOR +Salvatore Valente diff --git a/raw/man1/chgrp.1 b/raw/man1/chgrp.1 new file mode 100644 index 00000000..dd372f17 --- /dev/null +++ b/raw/man1/chgrp.1 @@ -0,0 +1,66 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH CHGRP "1" "October 2003" "chgrp (coreutils) 5.0" FSF +.SH NAME +chgrp \- change group ownership +.SH SYNOPSIS +.B chgrp +[\fIOPTION\fR]... \fIGROUP FILE\fR... +.br +.B chgrp +[\fIOPTION\fR]... \fI--reference=RFILE FILE\fR... +.SH DESCRIPTION +.\" Add any additional description here +.PP +Change the group membership of each FILE to GROUP. +.TP +\fB\-c\fR, \fB\-\-changes\fR +like verbose but report only when a change is made +.TP +\fB\-\-dereference\fR +affect the referent of each symbolic link, rather +than the symbolic link itself +.TP +\fB\-h\fR, \fB\-\-no\-dereference\fR +affect symbolic links instead of any referenced file +(available only on systems that can change the +ownership of a symlink) +.TP +\fB\-f\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR +suppress most error messages +.TP +\fB\-\-reference\fR=\fIRFILE\fR +use RFILE's group rather than the specified +GROUP value +.TP +\fB\-R\fR, \fB\-\-recursive\fR +operate on files and directories recursively +.TP +\fB\-v\fR, \fB\-\-verbose\fR +output a diagnostic for every file processed +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.SH AUTHOR +Written by David MacKenzie. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B chgrp +is maintained as a Texinfo manual. If the +.B info +and +.B chgrp +programs are properly installed at your site, the command +.IP +.B info chgrp +.PP +should give you access to the complete manual. diff --git a/raw/man1/chmod.1 b/raw/man1/chmod.1 new file mode 100644 index 00000000..5c0bdef4 --- /dev/null +++ b/raw/man1/chmod.1 @@ -0,0 +1,127 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH CHMOD "1" "October 2003" "chmod (coreutils) 5.0" FSF +.SH NAME +chmod \- change file access permissions +.SH SYNOPSIS +.B chmod +[\fIOPTION\fR]... \fIMODE\fR[\fI,MODE\fR]... \fIFILE\fR... +.br +.B chmod +[\fIOPTION\fR]... \fIOCTAL-MODE FILE\fR... +.br +.B chmod +[\fIOPTION\fR]... \fI--reference=RFILE FILE\fR... +.SH DESCRIPTION +This manual page +documents the GNU version of +.BR chmod . +.B chmod +changes the permissions of each given file according to +.IR mode , +which can be either a symbolic representation of changes to make, or +an octal number representing the bit pattern for the new permissions. +.PP +The format of a symbolic mode is +`[ugoa...][[+-=][rwxXstugo...]...][,...]'. Multiple symbolic +operations can be given, separated by commas. +.PP +A combination of the letters `ugoa' controls which users' access to +the file will be changed: the user who owns it (u), other users in the +file's group (g), other users not in the file's group (o), or all +users (a). If none of these are given, the effect is as if `a' were +given, but bits that are set in the umask are not affected. +.PP +The operator `+' causes the permissions selected to be added to the +existing permissions of each file; `-' causes them to be removed; and +`=' causes them to be the only permissions that the file has. +.PP +The letters `rwxXstugo' select the new permissions for the affected +users: read (r), write (w), execute (or access for directories) (x), +execute only if the file is a directory or already has execute +permission for some user (X), set user or group ID on execution (s), +sticky (t), the permissions granted to the user who owns the file (u), +the permissions granted to other users who are members of the file's group (g), +and the permissions granted to users that are in neither of the two preceding +categories (o). +.PP +A numeric mode is from one to four octal digits (0-7), derived by +adding up the bits with values 4, 2, and 1. Any omitted digits are +assumed to be leading zeros. The first digit selects the set user ID +(4) and set group ID (2) and sticky (1) attributes. The second digit +selects permissions for the user who owns the file: read (4), write (2), +and execute (1); the third selects permissions for other users in the +file's group, with the same values; and the fourth for other users not +in the file's group, with the same values. +.PP +.B chmod +never changes the permissions of symbolic links; the +.B chmod +system call cannot change their permissions. This is not a problem +since the permissions of symbolic links are never used. +However, for each symbolic link listed on the command line, +.B chmod +changes the permissions of the pointed-to file. +In contrast, +.B chmod +ignores symbolic links encountered during recursive directory +traversals. +.SH STICKY FILES +On older Unix systems, the sticky bit caused executable files to be +hoarded in swap space. This feature is not useful on modern VM +systems, and the Linux kernel ignores the sticky bit on files. Other +kernels may use the sticky bit on files for system-defined purposes. +On some systems, only the superuser can set the sticky bit on files. +.SH STICKY DIRECTORIES +When the sticky bit is set on a directory, files in that directory may +be unlinked or renamed only by root or their owner. Without the +sticky bit, anyone able to write to the directory can delete or rename +files. The sticky bit is commonly found on directories, such as /tmp, +that are world-writable. +.SH OPTIONS +.PP +Change the mode of each FILE to MODE. +.TP +\fB\-c\fR, \fB\-\-changes\fR +like verbose but report only when a change is made +.TP +\fB\-f\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR +suppress most error messages +.TP +\fB\-v\fR, \fB\-\-verbose\fR +output a diagnostic for every file processed +.TP +\fB\-\-reference\fR=\fIRFILE\fR +use RFILE's mode instead of MODE values +.TP +\fB\-R\fR, \fB\-\-recursive\fR +change files and directories recursively +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +Each MODE is one or more of the letters ugoa, one of the symbols +-= and +one or more of the letters rwxXstugo. +.SH AUTHOR +Written by David MacKenzie. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B chmod +is maintained as a Texinfo manual. If the +.B info +and +.B chmod +programs are properly installed at your site, the command +.IP +.B info chmod +.PP +should give you access to the complete manual. diff --git a/raw/man1/chown.1 b/raw/man1/chown.1 new file mode 100644 index 00000000..363d50ae --- /dev/null +++ b/raw/man1/chown.1 @@ -0,0 +1,97 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH CHOWN "1" "October 2003" "chown (coreutils) 5.0" FSF +.SH NAME +chown \- change file owner and group +.SH SYNOPSIS +.B chown +[\fIOPTION\fR]... \fIOWNER\fR[\fI:\fR[\fIGROUP\fR]] \fIFILE\fR... +.br +.B chown +[\fIOPTION\fR]... \fI:GROUP FILE\fR... +.br +.B chown +[\fIOPTION\fR]... \fI--reference=RFILE FILE\fR... +.SH DESCRIPTION +This manual page +documents the GNU version of +.BR chown . +.B chown +changes the user and/or group ownership of each given file, according +to its first non-option argument, which is interpreted as follows. If +only a user name (or numeric user ID) is given, that user is made the +owner of each given file, and the files' group is not changed. If the +user name is followed by a colon or dot and a group name (or numeric group ID), +with no spaces between them, the group ownership of the files is +changed as well. If a colon or dot but no group name follows the user name, +that user is made the owner of the files and the group of the files is +changed to that user's login group. If the colon or dot and group are given, +but the user name is omitted, only the group of the files is changed; +in this case, +.B chown +performs the same function as +.BR chgrp . +.SH OPTIONS +.PP +Change the owner and/or group of each FILE to OWNER and/or GROUP. +.TP +\fB\-c\fR, \fB\-\-changes\fR +like verbose but report only when a change is made +.TP +\fB\-\-dereference\fR +affect the referent of each symbolic link, rather +than the symbolic link itself +.TP +\fB\-h\fR, \fB\-\-no\-dereference\fR +affect symbolic links instead of any referenced file +(available only on systems that can change the +ownership of a symlink) +.TP +\fB\-\-from\fR=\fICURRENT_OWNER\fR:CURRENT_GROUP +change the owner and/or group of each file only if +its current owner and/or group match those specified +here. Either may be omitted, in which case a match +is not required for the omitted attribute. +.TP +\fB\-f\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR +suppress most error messages +.TP +\fB\-\-reference\fR=\fIRFILE\fR +use RFILE's owner and group rather than +the specified OWNER:GROUP values +.TP +\fB\-R\fR, \fB\-\-recursive\fR +operate on files and directories recursively +.TP +\fB\-v\fR, \fB\-\-verbose\fR +output a diagnostic for every file processed +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +Owner is unchanged if missing. Group is unchanged if missing, but changed +to login group if implied by a `:'. OWNER and GROUP may be numeric as well +as symbolic. +.SH AUTHOR +Written by David MacKenzie. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B chown +is maintained as a Texinfo manual. If the +.B info +and +.B chown +programs are properly installed at your site, the command +.IP +.B info chown +.PP +should give you access to the complete manual. diff --git a/raw/man1/chroot.1 b/raw/man1/chroot.1 new file mode 100644 index 00000000..57e9cc31 --- /dev/null +++ b/raw/man1/chroot.1 @@ -0,0 +1,43 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH CHROOT "1" "October 2003" "GNU coreutils 5.0" FSF +.SH NAME +chroot \- run command or interactive shell with special root directory +.SH SYNOPSIS +.B chroot +\fINEWROOT \fR[\fICOMMAND\fR...] +.br +.B chroot +\fIOPTION\fR +.SH DESCRIPTION +.\" Add any additional description here +.PP +Run COMMAND with root directory set to NEWROOT. +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +If no command is given, run ``${SHELL} \fB\-i\fR'' (default: /bin/sh). +.SH AUTHOR +Written by Roland McGrath. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B chroot +is maintained as a Texinfo manual. If the +.B info +and +.B chroot +programs are properly installed at your site, the command +.IP +.B info chroot +.PP +should give you access to the complete manual. diff --git a/raw/man1/chsh.1 b/raw/man1/chsh.1 new file mode 100644 index 00000000..7d869995 --- /dev/null +++ b/raw/man1/chsh.1 @@ -0,0 +1,49 @@ +.\" +.\" chsh.1 -- change your login shell +.\" (c) 1994 by salvatore valente +.\" +.\" this program is free software. you can redistribute it and +.\" modify it under the terms of the gnu general public license. +.\" there is no warranty. +.\" +.TH CHSH 1 "7 October 1998" "chsh" "Linux Reference Manual" +.SH NAME +chsh \- change your login shell +.SH SYNOPSIS +.B chsh +[\ \-s\ shell\ ] [\ \-l\ ] [\ \-u\ ] [\ \-v\ ] [\ username\ ] +.SH DESCRIPTION +.B chsh +is used to change your login shell. +If a shell is not given on the command line, +.B chsh +prompts for one. +.SS VALID SHELLS +.B chsh +will accept the full pathname of any executable file on the system. +However, it will issue a warning if the shell is not listed in the +.I /etc/shells +file. +On the other hand, it can also be configured such that it will +only accept shells listed in this file, unless you are root. +.SH OPTIONS +.TP +.I "\-s, \-\-shell" +Specify your login shell. +.TP +.I "\-l, \-\-list-shells" +Print the list of shells listed in +.I /etc/shells +and exit. +.TP +.I "\-u, \-\-help" +Print a usage message and exit. +.TP +.I "-v, \-\-version" +Print version information and exit. +.SH "SEE ALSO" +.BR login (1), +.BR passwd (5), +.BR shells (5) +.SH AUTHOR +Salvatore Valente diff --git a/raw/man1/chvt.1 b/raw/man1/chvt.1 new file mode 100644 index 00000000..c7b9105a --- /dev/null +++ b/raw/man1/chvt.1 @@ -0,0 +1,23 @@ +.\" @(#)chvt.1 1.0 970126 aeb +.TH CHVT 1 "26 January 1997" +.SH NAME +chvt \- change foreground virtual terminal +.SH SYNOPSIS +.B chvt +.I N +.SH DESCRIPTION +The command +.B chvt +.I N +makes +.I /dev/ttyN +the foreground terminal. +(The corresponding screen is created if it did not exist yet. +To get rid of unused VTs, +use +.BR deallocvt (1).) +The key combination +.RI (Ctrl-)LeftAlt-F N +(with +.I N +in the range 1-12) usually has a similar effect. diff --git a/raw/man1/cksum.1 b/raw/man1/cksum.1 new file mode 100644 index 00000000..54ff87df --- /dev/null +++ b/raw/man1/cksum.1 @@ -0,0 +1,41 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH CKSUM "1" "October 2003" "cksum (coreutils) 5.0" FSF +.SH NAME +cksum \- checksum and count the bytes in a file +.SH SYNOPSIS +.B cksum +[\fIFILE\fR]... +.br +.B cksum +[\fIOPTION\fR] +.SH DESCRIPTION +.\" Add any additional description here +.PP +Print CRC checksum and byte counts of each FILE. +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.SH AUTHOR +Written by Q. Frank Xia. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B cksum +is maintained as a Texinfo manual. If the +.B info +and +.B cksum +programs are properly installed at your site, the command +.IP +.B info cksum +.PP +should give you access to the complete manual. diff --git a/raw/man1/clear.1 b/raw/man1/clear.1 new file mode 100644 index 00000000..4dab1e2e --- /dev/null +++ b/raw/man1/clear.1 @@ -0,0 +1,47 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.TH clear 1 "" +.ds n 5 +.SH NAME +\fBclear\fR - clear the terminal screen +.SH SYNOPSIS +\fBclear\fR +.br +.SH DESCRIPTION +\fBclear\fR clears your screen if this is possible. It looks in the +environment for the terminal type and then in the \fBterminfo\fR database to +figure out how to clear the screen. +.SH SEE ALSO +\fBtput\fR(1), \fBterminfo\fR(\*n) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/raw/man1/clusterdb.1 b/raw/man1/clusterdb.1 new file mode 100644 index 00000000..4f96df76 --- /dev/null +++ b/raw/man1/clusterdb.1 @@ -0,0 +1,123 @@ +.\\" auto-generated by docbook2man-spec $Revision: 1.1 $ +.TH "CLUSTERDB" "1" "2003-11-02" "Application" "PostgreSQL Client Applications" +.SH NAME +clusterdb \- cluster a PostgreSQL database + +.SH SYNOPSIS +.sp +\fBclusterdb\fR\fR [ \fR\fB\fIconnection-option\fB\fR...\fB \fR\fR]\fR\fR [ \fR\fB--table | -t \fItable\fB \fR\fR]\fR\fR [ \fR\fB\fIdbname\fB \fR\fR]\fR + +\fBclusterdb\fR\fR [ \fR\fB\fIconnection-option\fB\fR...\fB \fR\fR]\fR \fR[\fR \fB--all\fR\fR | \fR\fB-a\fR\fR ]\fR +.SH "DESCRIPTION" +.PP +\fBclusterdb\fR is a utility for reclustering tables +in a PostgreSQL database. It finds tables +that have previously been clustered, and clusters them again on the same +index that was last used. Tables that have never been clustered are not +affected. +.PP +\fBclusterdb\fR is a wrapper around the SQL +command CLUSTER [\fBcluster\fR(7)]. +There is no effective difference between clustering databases via +this utility and via other methods for accessing the server. +.SH "OPTIONS" +.PP +\fBclusterdb\fR accepts the following command-line arguments: +.TP +\fB-a\fR +.TP +\fB--all\fR +Cluster all databases. +.TP +\fB[-d] \fIdbname\fB\fR +.TP +\fB[--dbname] \fIdbname\fB\fR +Specifies the name of the database to be clustered. +If this is not specified and \fB-a\fR (or +\fB--all\fR) is not used, the database name is read +from the environment variable \fBPGDATABASE\fR. If +that is not set, the user name specified for the connection is +used. +.TP +\fB-e\fR +.TP +\fB--echo\fR +Echo the commands that \fBclusterdb\fR generates +and sends to the server. +.TP +\fB-q\fR +.TP +\fB--quiet\fR +Do not display a response. +.TP +\fB-t \fItable\fB\fR +.TP +\fB--table \fItable\fB\fR +Cluster \fItable\fR only. +.PP +.PP +\fBclusterdb\fR also accepts +the following command-line arguments for connection parameters: +.TP +\fB-h \fIhost\fB\fR +.TP +\fB--host \fIhost\fB\fR +Specifies the host name of the machine on which the server is +running. If the value begins with a slash, it is used as the +directory for the Unix domain socket. +.TP +\fB-p \fIport\fB\fR +.TP +\fB--port \fIport\fB\fR +Specifies the TCP port or local Unix domain socket file +extension on which the server +is listening for connections. +.TP +\fB-U \fIusername\fB\fR +.TP +\fB--username \fIusername\fB\fR +User name to connect as. +.TP +\fB-W\fR +.TP +\fB--password\fR +Force password prompt. +.PP +.SH "ENVIRONMENT" +.TP +\fBPGDATABASE\fR +.TP +\fBPGHOST\fR +.TP +\fBPGPORT\fR +.TP +\fBPGUSER\fR +Default connection parameters +.SH "DIAGNOSTICS" +.PP +In case of difficulty, see CLUSTER [\fBcluster\fR(7)] and \fBpsql\fR(1) for +discussions of potential problems and error messages. +The database server must be running at the +targeted host. Also, any default connection settings and environment +variables used by the \fBlibpq\fR front-end +library will apply. +.SH "EXAMPLES" +.PP +To cluster the database test: +.sp +.nf +$ \fBclusterdb test\fR +.sp +.fi +.PP +To cluster a single table +foo in a database named +xyzzy: +.sp +.nf +$ \fBclusterdb --table foo xyzzy\fR +.sp +.fi +.SH "SEE ALSO" +CLUSTER [\fBcluster\fR(7)] + diff --git a/raw/man1/col.1 b/raw/man1/col.1 new file mode 100644 index 00000000..14151211 --- /dev/null +++ b/raw/man1/col.1 @@ -0,0 +1,138 @@ +.\" Copyright (c) 1990 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Michael Rendell. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)col.1 6.8 (Berkeley) 6/17/91 +.\" +.Dd June 17, 1991 +.Dt COL 1 +.Os +.Sh NAME +.Nm col +.Nd filter reverse line feeds from input +.Sh SYNOPSIS +.Nm col +.Op Fl bfpx +.Op Fl l Ar num +.Sh DESCRIPTION +.Nm Col +filters out reverse (and half reverse) line feeds so the output is +in the correct order with only forward and half forward line +feeds, and replaces white-space characters with tabs where possible. +This can be useful in processing the output of +.Xr nroff 1 +and +.Xr tbl 1 . +.Pp +.Nm Col +reads from standard input and writes to standard output. +.Pp +The options are as follows: +.Bl -tag -width "-lnum" +.It Fl b +Do not output any backspaces, printing only the last character +written to each column position. +.It Fl f +Forward half line feeds are permitted (``fine'' mode). +Normally characters printed on a half line boundary are printed +on the following line. +.It Fl p +Force unknown control sequences to be passed through unchanged. +Normally, +.Nm col +will filter out any control sequences from the input other than those +recognized and interpreted by itself, which are listed below. +.It Fl x +Output multiple spaces instead of tabs. +.It Fl l Ns Ar num +Buffer at least +.Ar num +lines in memory. +By default, 128 lines are buffered. +.El +.Pp +The control sequences for carriage motion that +.Nm col +understands and their decimal values are listed in the following +table: +.Pp +.Bl -tag -width "carriage return" -compact +.It ESC\-7 +reverse line feed (escape then 7) +.It ESC\-8 +half reverse line feed (escape then 8) +.It ESC\-9 +half forward line feed (escape then 9) +.It backspace +moves back one column (8); ignored in the first column +.It carriage return +(13) +.It newline +forward line feed (10); also does carriage return +.It shift in +shift to normal character set (15) +.It shift out +shift to alternate character set (14) +.It space +moves forward one column (32) +.It tab +moves forward to next tab stop (9) +.It vertical tab +reverse line feed (11) +.El +.Pp +All unrecognized control characters and escape sequences are +discarded. +.Pp +.Nm Col +keeps track of the character set as characters are read and makes +sure the character set is correct when they are output. +.Pp +If the input attempts to back up to the last flushed line, +.Nm col +will display a warning message. +.Sh SEE ALSO +.Xr expand 1 , +.Xr nroff 1 , +.Xr tbl 1 +.Sh STANDARDS +The +.Nm col +utility conforms to the Single UNIX Specification, Version 2. The +.Fl l +option is an extension to the standard. +.Sh HISTORY +A +.Nm col +command +appeared in Version 6 AT&T UNIX. diff --git a/raw/man1/comm.1 b/raw/man1/comm.1 new file mode 100644 index 00000000..6ae5d3a0 --- /dev/null +++ b/raw/man1/comm.1 @@ -0,0 +1,47 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH COMM "1" "October 2003" "comm (coreutils) 5.0" FSF +.SH NAME +comm \- compare two sorted files line by line +.SH SYNOPSIS +.B comm +[\fIOPTION\fR]... \fILEFT_FILE RIGHT_FILE\fR +.SH DESCRIPTION +.\" Add any additional description here +.PP +Compare sorted files LEFT_FILE and RIGHT_FILE line by line. +.TP +\fB\-1\fR +suppress lines unique to left file +.TP +\fB\-2\fR +suppress lines unique to right file +.TP +\fB\-3\fR +suppress lines that appear in both files +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.SH AUTHOR +Written by Richard Stallman and David MacKenzie. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B comm +is maintained as a Texinfo manual. If the +.B info +and +.B comm +programs are properly installed at your site, the command +.IP +.B info comm +.PP +should give you access to the complete manual. diff --git a/raw/man1/command.1 b/raw/man1/command.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/command.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/compgen.1 b/raw/man1/compgen.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/compgen.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/complete.1 b/raw/man1/complete.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/complete.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/continue.1 b/raw/man1/continue.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/continue.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/cp.1 b/raw/man1/cp.1 new file mode 100644 index 00000000..f036d71f --- /dev/null +++ b/raw/man1/cp.1 @@ -0,0 +1,160 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH CP "1" "October 2003" "cp (coreutils) 5.0" FSF +.SH NAME +cp \- copy files and directories +.SH SYNOPSIS +.B cp +[\fIOPTION\fR]... \fISOURCE DEST\fR +.br +.B cp +[\fIOPTION\fR]... \fISOURCE\fR... \fIDIRECTORY\fR +.br +.B cp +[\fIOPTION\fR]... \fI--target-directory=DIRECTORY SOURCE\fR... +.SH DESCRIPTION +.\" Add any additional description here +.PP +Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY. +.PP +Mandatory arguments to long options are mandatory for short options too. +.TP +\fB\-a\fR, \fB\-\-archive\fR +same as \fB\-dpR\fR +.TP +\fB\-\-backup\fR[=\fICONTROL\fR] +make a backup of each existing destination file +.TP +\fB\-b\fR +like \fB\-\-backup\fR but does not accept an argument +.TP +\fB\-\-copy\-contents\fR +copy contents of special files when recursive +.TP +\fB\-d\fR +same as \fB\-\-no\-dereference\fR \fB\-\-preserve\fR=\fIlink\fR +.TP +\fB\-\-no\-dereference\fR +never follow symbolic links +.TP +\fB\-f\fR, \fB\-\-force\fR +if an existing destination file cannot be +opened, remove it and try again +.TP +\fB\-i\fR, \fB\-\-interactive\fR +prompt before overwrite +.TP +\fB\-H\fR +follow command-line symbolic links +.TP +\fB\-l\fR, \fB\-\-link\fR +link files instead of copying +.TP +\fB\-L\fR, \fB\-\-dereference\fR +always follow symbolic links +.TP +\fB\-p\fR +same as \fB\-\-preserve\fR=\fImode\fR,ownership,timestamps +.TP +\fB\-\-preserve\fR[=\fIATTR_LIST\fR] +preserve the specified attributes (default: +mode,ownership,timestamps), if possible +additional attributes: links, all +.TP +\fB\-\-no\-preserve\fR=\fIATTR_LIST\fR +don't preserve the specified attributes +.TP +\fB\-\-parents\fR +append source path to DIRECTORY +.TP +\fB\-P\fR +same as `--no-dereference' +.TP +\fB\-R\fR, \fB\-r\fR, \fB\-\-recursive\fR +copy directories recursively +.TP +\fB\-\-remove\-destination\fR +remove each existing destination file before +attempting to open it (contrast with \fB\-\-force\fR) +.TP +\fB\-\-reply=\fR{yes,no,query} +specify how to handle the prompt about an +existing destination file +.TP +\fB\-\-sparse\fR=\fIWHEN\fR +control creation of sparse files +.TP +\fB\-\-strip\-trailing\-slashes\fR remove any trailing slashes from each SOURCE +argument +.TP +\fB\-s\fR, \fB\-\-symbolic\-link\fR +make symbolic links instead of copying +.TP +\fB\-S\fR, \fB\-\-suffix\fR=\fISUFFIX\fR +override the usual backup suffix +.TP +\fB\-\-target\-directory\fR=\fIDIRECTORY\fR +move all SOURCE arguments into DIRECTORY +.TP +\fB\-u\fR, \fB\-\-update\fR +copy only when the SOURCE file is newer +than the destination file or when the +destination file is missing +.TP +\fB\-v\fR, \fB\-\-verbose\fR +explain what is being done +.TP +\fB\-x\fR, \fB\-\-one\-file\-system\fR +stay on this file system +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +By default, sparse SOURCE files are detected by a crude heuristic and the +corresponding DEST file is made sparse as well. That is the behavior +selected by \fB\-\-sparse\fR=\fIauto\fR. Specify \fB\-\-sparse\fR=\fIalways\fR to create a sparse DEST +file whenever the SOURCE file contains a long enough sequence of zero bytes. +Use \fB\-\-sparse\fR=\fInever\fR to inhibit creation of sparse files. +.PP +The backup suffix is `~', unless set with \fB\-\-suffix\fR or SIMPLE_BACKUP_SUFFIX. +The version control method may be selected via the \fB\-\-backup\fR option or through +the VERSION_CONTROL environment variable. Here are the values: +.TP +none, off +never make backups (even if \fB\-\-backup\fR is given) +.TP +numbered, t +make numbered backups +.TP +existing, nil +numbered if numbered backups exist, simple otherwise +.TP +simple, never +always make simple backups +.PP +As a special case, cp makes a backup of SOURCE when the force and backup +options are given and SOURCE and DEST are the same name for an existing, +regular file. +.SH AUTHOR +Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B cp +is maintained as a Texinfo manual. If the +.B info +and +.B cp +programs are properly installed at your site, the command +.IP +.B info cp +.PP +should give you access to the complete manual. diff --git a/raw/man1/cpio.1 b/raw/man1/cpio.1 new file mode 100644 index 00000000..57667d41 --- /dev/null +++ b/raw/man1/cpio.1 @@ -0,0 +1,341 @@ +.TH CPIO 1L \" -*- nroff -*- +.SH NAME +cpio \- copy files to and from archives +.SH SYNOPSIS +.B cpio +{\-o|\-\-create} [\-0acvABLV] [\-C bytes] [\-H format] [\-M message] +[\-O [[user@]host:]archive] [\-F [[user@]host:]archive] +[\-\-file=[[user@]host:]archive] [\-\-format=format] [\-\-message=message] +[\-\-null] [\-\-reset-access-time] [\-\-verbose] [\-\-dot] [\-\-append] +[\-\-block-size=blocks] [\-\-dereference] [\-\-io-size=bytes] [\-\-quiet] +[\-\-force\-local] [\-\-rsh-command=command] [\-\-help] [\-\-version] +< name-list [> archive] + +.B cpio +{\-i|\-\-extract} [\-bcdfmnrtsuvBSV] [\-C bytes] [\-E file] [\-H format] +[\-M message] [\-R [user][:.][group]] [\-I [[user@]host:]archive] +[\-F [[user@]host:]archive] [\-\-file=[[user@]host:]archive] +[\-\-make-directories] [\-\-nonmatching] [\-\-preserve-modification-time] +[\-\-numeric-uid-gid] [\-\-rename] [\-t|\-\-list] [\-\-swap-bytes] [\-\-swap] [\-\-dot] +[\-\-unconditional] [\-\-verbose] [\-\-block-size=blocks] [\-\-swap-halfwords] +[\-\-io-size=bytes] [\-\-pattern-file=file] [\-\-format=format] +[\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message] +[\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse] +[\-\-only\-verify\-crc] [\-\-quiet] [\-\-rsh-command=command] [\-\-help] +[\-\-version] [pattern...] [< archive] + +.B cpio +{\-p|\-\-pass-through} [\-0adlmuvLV] [\-R [user][:.][group]] +[\-\-null] [\-\-reset-access-time] [\-\-make-directories] [\-\-link] [\-\-quiet] +[\-\-preserve-modification-time] [\-\-unconditional] [\-\-verbose] [\-\-dot] +[\-\-dereference] [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] +[\-\-sparse] [\-\-help] [\-\-version] destination-directory < name-list +.SH DESCRIPTION +This manual page +documents the GNU version of +.BR cpio . +.B cpio +copies files into or out of a cpio or tar archive, which is a file that +contains other files plus information about them, such as their +file name, owner, timestamps, and access permissions. The archive can +be another file on the disk, a magnetic tape, or a pipe. +.B cpio +has three operating modes. +.PP +In copy-out mode, +.B cpio +copies files into an archive. It reads a list of filenames, one per +line, on the standard input, and writes the archive onto the standard +output. A typical way to generate the list of filenames is with the +.B find +command; you should give +.B find +the \-depth option to minimize problems with permissions on +directories that are unwritable or not searchable. +.PP +In copy-in mode, +.B cpio +copies files out of an archive or lists the archive contents. It +reads the archive from the standard input. Any non-option command +line arguments are shell globbing patterns; only files in the archive +whose names match one or more of those patterns are copied from the +archive. Unlike in the shell, an initial `.' in a filename does +match a wildcard at the start of a pattern, and a `/' in a filename +can match wildcards. If no patterns are given, all files are +extracted. +.PP +In copy-pass mode, +.B cpio +copies files from one directory tree to another, combining the +copy-out and copy-in steps without actually using an archive. +It reads the list of files to copy from the standard input; the +directory into which it will copy them is given as a non-option +argument. +.PP +.B cpio +supports the following archive formats: binary, old ASCII, new +ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar. +The binary format +is obsolete because it encodes information about the files in a way +that is not portable between different machine architectures. +The old ASCII format is portable between different machine architectures, +but should not be used on file systems with more than 65536 i-nodes. +The new ASCII format is portable between different machine architectures +and can be used on any size file system, but is not supported by all +versions of +.BR cpio ; +currently, it is only supported by GNU and Unix System V R4. +The crc format is +like the new ASCII format, but also contains a checksum for each file +which +.B cpio +calculates when creating an archive +and verifies when the file is extracted from the archive. +The HPUX formats are provided for compatibility with HPUX's cpio which +stores device files differently. +.PP +The tar format is provided for compatability with +the +.B tar +program. It can not be used to archive files with names +longer than 100 characters, and can not be used to archive "special" +(block or character devices) files. +The POSIX.1 tar format can not be used to archive files with names longer +than 255 characters (less unless they have a "/" in just the right place). +.PP +By default, +.B cpio +creates binary format archives, for compatibility with +older +.B cpio +programs. +When extracting from archives, +.B cpio +automatically recognizes which kind of archive it is reading and can +read archives created on machines with a different byte-order. +.PP +Some of the options to +.B cpio +apply only to certain operating modes; see the SYNOPSIS section for a +list of which options are allowed in which modes. +.SS OPTIONS +.TP +.I "\-0, \-\-null" +In copy-out and copy-pass modes, read a list of filenames terminated +by a null character instead of a newline, so that files whose names +contain newlines can be archived. GNU +.B find +is one way to produce a list of null-terminated filenames. +.TP +.I "\-a, \-\-reset-access-time" +Reset the access times of files after reading them, so that it does +not look like they have just been read. +.TP +.I "\-A, \-\-append" +Append to an existing archive. Only works in copy-out mode. The +archive must be a disk file specified with the +.I \-O +or +.I "\-F (\-\-file)" +option. +.TP +.I "\-b, \-\-swap" +In copy-in mode, swap both halfwords of words and bytes of halfwords +in the data. Equivalent to +.IR "\-sS" . +Use this option to convert 32-bit integers between big-endian and +little-endian machines. +.TP +.I "\-B" +Set the I/O block size to 5120 bytes. Initially the block size is 512 +bytes. +.TP +.I "\-\-block-size=BLOCK-SIZE" +Set the I/O block size to BLOCK-SIZE * 512 bytes. +.TP +.I "\-c" +Identical to "-H newc", use the new (SVR4) portable format. +If you wish the old portable (ASCII) archive format, use "-H odc" instead. +.TP +.I "\-C IO-SIZE, \-\-io-size=IO-SIZE" +Set the I/O block size to IO-SIZE bytes. +.TP +.I "\-d, \-\-make-directories" +Create leading directories where needed. +.TP +.I "\-E FILE, \-\-pattern-file=FILE" +In copy-in mode, read additional patterns specifying filenames to +extract or list from FILE. The lines of FILE are treated as if they +had been non-option arguments to +.BR cpio . +.TP +.I "\-f, \-\-nonmatching" +Only copy files that do not match any of the given patterns. +.TP +.I "\-F, \-\-file=archive" +Archive filename to use instead of standard input or output. To use a +tape drive on another machine as the archive, use a filename that +starts with `HOSTNAME:'. The hostname can be preceded by a +username and an `@' to access the remote tape drive as that user, if +you have permission to do so (typically an entry in that user's +`~/.rhosts' file). +.TP +.I "\-\-force-local" +With +.IR \-F , +.IR \-I , +or +.IR \-O , +take the archive file name to be a local file even if it contains a +colon, which would ordinarily indicate a remote host name. +.TP +.I "\-H FORMAT, \-\-format=FORMAT" +Use archive format FORMAT. The valid formats are listed below; +the same names are also recognized in all-caps. The default in +copy-in mode is to automatically detect the archive format, and in +copy-out mode is "bin". +.RS +.IP bin +The obsolete binary format. +.IP odc +The old (POSIX.1) portable format. +.IP newc +The new (SVR4) portable format, which supports file systems having +more than 65536 i-nodes. +.IP crc +The new (SVR4) portable format with a checksum added. +.IP tar +The old tar format. +.IP ustar +The POSIX.1 tar format. Also recognizes GNU +.B tar +archives, which are similar but not identical. +.IP hpbin +The obsolete binary format used by HPUX's cpio (which stores device files +differently). +.IP hpodc +The portable format used by HPUX's cpio (which stores device files differently). +.RE +.TP +.I "\-i, \-\-extract" +Run in copy-in mode. +.TP +.I "\-I archive" +Archive filename to use instead of standard input. To use a +tape drive on another machine as the archive, use a filename that +starts with `HOSTNAME:'. The hostname can be preceded by a +username and an `@' to access the remote tape drive as that user, if +you have permission to do so (typically an entry in that user's +`~/.rhosts' file). +.TP +.I \-k +Ignored; for compatibility with other versions of +.BR cpio . +.TP +.I "\-l, \-\-link" +Link files instead of copying them, when possible. +.TP +.I "\-L, \-\-dereference" +Dereference symbolic links (copy the files that they point to instead +of copying the links). +.TP +.I "\-m, \-\-preserve-modification-time" +Retain previous file modification times when creating files. +.TP +.I "\-M MESSAGE, \-\-message=MESSAGE" +Print MESSAGE when the end of a volume of the backup media (such as a +tape or a floppy disk) is reached, to prompt the user to insert a new +volume. If MESSAGE contains the string "%d", it is replaced by the +current volume number (starting at 1). +.TP +.I "\-n, \-\-numeric-uid-gid" +In the verbose table of contents listing, show numeric UID and GID +instead of translating them into names. +Also extracts tar archives using the numeric UID and GID instead of the +user/group names. +.RB ( cpio +archives are always extracted using the numeric UID and GID.) +.TP +.I " \-\-no-absolute-filenames" +In copy-in mode, create all files relative to the current directory, +even if they have an absolute file name in the archive. +.TP +.I " \-\-no-preserve-owner" +In copy-in mode and copy-pass mode, do not change the ownership of the +files; leave them owned by the user extracting them. This is the +default for non-root users, so that users on System V don't +inadvertantly give away files. +.TP +.I "\-o, \-\-create" +Run in copy-out mode. +.TP +.I "\-O archive" +Archive filename to use instead of standard output. To use a tape +drive on another machine as the archive, use a filename that starts +with `HOSTNAME:'. The hostname can be preceded by a username and an +`@' to access the remote tape drive as that user, if you have +permission to do so (typically an entry in that user's `~/.rhosts' +file). +.TP +.I " \-\-only-verify-crc" +When reading a CRC format archive in copy-in mode, only verify the +CRC's of each file in the archive, don't actually extract the files. +.TP +.I "\-p, \-\-pass-through" +Run in copy-pass mode. +.TP +.I "\-\-quiet" +Do not print the number of blocks copied. +.TP +.I "\-r, \-\-rename" +Interactively rename files. +.TP +.I "\-R [user][:.][group], \-\-owner [user][:.][group]" +In copy-out and copy-pass modes, set the ownership of all files created +to the specified user and/or group. Either the user or the group, or +both, must be present. If the group is omitted but the ":" or "." +separator is given, use the given user's login group. Only the +super-user can change files' ownership. +.TP +.I "\-\-rsh-command=COMMAND" +Notifies +.B mt +that it should use COMMAND to communicate with remote devices instead of +.I /usr/bin/ssh +or +.IR /usr/bin/rsh . +.TP +.I "\-\-sparse" +In copy-in and copy-pass modes, write files with large blocks of zeros +as sparse files. +.TP +.I "\-s, \-\-swap-bytes" +In copy-in mode, swap the bytes of each halfword (pair of bytes) in the +files. +.TP +.I "\-S, \-\-swap-halfwords" +In copy-in mode, swap the halfwords of each word (4 bytes) in the +files. +.TP +.I "\-t, \-\-list" +Print a table of contents of the input. +.TP +.I "\-u, \-\-unconditional" +Replace all files, without asking whether to replace existing newer +files with older files. +.TP +.I "\-v, \-\-verbose" +List the files processed, or with +.IR \-t , +give an `ls \-l' style table of contents listing. In a verbose table +of contents of a ustar archive, user and group names in the archive +that do not exist on the local system are replaced by the names that +correspond locally to the numeric UID and GID stored in the archive. +.TP +.I "\-V \-\-dot" +Print a "." for each file processed. +.TP +.I "\-\-version" +Print the +.B cpio +program version number and exit. diff --git a/raw/man1/createdb.1 b/raw/man1/createdb.1 new file mode 100644 index 00000000..41bd4098 --- /dev/null +++ b/raw/man1/createdb.1 @@ -0,0 +1,149 @@ +.\\" auto-generated by docbook2man-spec $Revision: 1.1 $ +.TH "CREATEDB" "1" "2003-11-02" "Application" "PostgreSQL Client Applications" +.SH NAME +createdb \- create a new PostgreSQL database + +.SH SYNOPSIS +.sp +\fBcreatedb\fR\fR [ \fR\fB\fIoption\fB\fR...\fB \fR\fR]\fR\fR [ \fR\fB\fIdbname\fB \fR\fR]\fR\fR [ \fR\fB\fIdescription\fB \fR\fR]\fR +.SH "DESCRIPTION" +.PP +\fBcreatedb\fR creates a new PostgreSQL +database. +.PP +Normally, the database user who executes this command becomes the owner of +the new database. +However a different owner can be specified via the \fB-O\fR +option, if the executing user has appropriate privileges. +.PP +\fBcreatedb\fR is a wrapper around the +SQL command CREATE DATABASE [\fBcreate_database\fR(7)]. +There is no effective difference between creating databases via +this utility and via other methods for accessing the server. +.SH "OPTIONS" +.PP +\fBcreatedb\fR accepts the following command-line arguments: +.TP +\fB\fIdbname\fB\fR +Specifies the name of the database to be created. The name must be +unique among all PostgreSQL databases in this cluster. +The default is to create a database with the same name as the +current system user. +.TP +\fB\fIdescription\fB\fR +This optionally specifies a comment to be associated with the newly created +database. +.TP +\fB-D \fIlocation\fB\fR +.TP +\fB--location \fIlocation\fB\fR +Specifies the alternative location for the database. See also \fBinitlocation\fR(1). +.TP +\fB-e\fR +.TP +\fB--echo\fR +Echo the commands that \fBcreatedb\fR generates +and sends to the server. +.TP +\fB-E \fIencoding\fB\fR +.TP +\fB--encoding \fIencoding\fB\fR +Specifies the character encoding scheme to be used in this database. +.TP +\fB-O \fIowner\fB\fR +.TP +\fB--owner \fIowner\fB\fR +Specifies the database user who will own the new database. +.TP +\fB-q\fR +.TP +\fB--quiet\fR +Do not display a response. +.TP +\fB-T \fItemplate\fB\fR +.TP +\fB--template \fItemplate\fB\fR +Specifies the template database from which to build this database. +.PP +.PP +The options \fB-D\fR, \fB-E\fR, +\fB-O\fR, and +\fB-T\fR correspond to options of the underlying +SQL command CREATE DATABASE [\fBcreate_database\fR(7)]; see there for more information +about them. +.PP +\fBcreatedb\fR also accepts the following +command-line arguments for connection parameters: +.TP +\fB-h \fIhost\fB\fR +.TP +\fB--host \fIhost\fB\fR +Specifies the host name of the machine on which the +server is running. If the value begins with a slash, it is used +as the directory for the Unix domain socket. +.TP +\fB-p \fIport\fB\fR +.TP +\fB--port \fIport\fB\fR +Specifies the TCP port or the local Unix domain socket file +extension on which the server is listening for connections. +.TP +\fB-U \fIusername\fB\fR +.TP +\fB--username \fIusername\fB\fR +User name to connect as +.TP +\fB-W\fR +.TP +\fB--password\fR +Force password prompt. +.PP +.SH "ENVIRONMENT" +.TP +\fBPGDATABASE\fR +If set, the name of the database to create, unless overridden on +the command line. +.TP +\fBPGHOST\fR +.TP +\fBPGPORT\fR +.TP +\fBPGUSER\fR +Default connection parameters. \fBPGUSER\fR also +determines the name of the database to create, if it is not +specified on the command line or by \fBPGDATABASE\fR. +.SH "DIAGNOSTICS" +.PP +In case of difficulty, see CREATE DATABASE [\fBcreate_database\fR(7)] and \fBpsql\fR(1) for +discussions of potential problems and error messages. +The database server must be running at the +targeted host. Also, any default connection settings and environment +variables used by the \fBlibpq\fR front-end +library will apply. +.SH "EXAMPLES" +.PP +To create the database demo using the default +database server: +.sp +.nf +$ \fBcreatedb demo\fR +CREATE DATABASE +.sp +.fi +The response is the same as you would have gotten from running the +\fBCREATE DATABASE\fR SQL command. +.PP +To create the database demo using the +server on host eden, port 5000, using the +LATIN1 encoding scheme with a look at the +underlying command: +.sp +.nf +$ \fBcreatedb -p 5000 -h eden -E LATIN1 -e demo\fR +CREATE DATABASE "demo" WITH ENCODING = 'LATIN1' +CREATE DATABASE +.sp +.fi +.SH "SEE ALSO" +\fBdropdb\fR(1), CREATE DATABASE [\fBcreate_database\fR(7)] + diff --git a/raw/man1/createlang.1 b/raw/man1/createlang.1 new file mode 100644 index 00000000..f7481738 --- /dev/null +++ b/raw/man1/createlang.1 @@ -0,0 +1,114 @@ +.\\" auto-generated by docbook2man-spec $Revision: 1.1 $ +.TH "CREATELANG" "1" "2003-11-02" "Application" "PostgreSQL Client Applications" +.SH NAME +createlang \- define a new PostgreSQL procedural language + +.SH SYNOPSIS +.sp +\fBcreatelang\fR\fR [ \fR\fB\fIconnection-option\fB\fR...\fB \fR\fR]\fR \fB\fIlangname\fB\fR\fR [ \fR\fB\fIdbname\fB \fR\fR]\fR + +\fBcreatelang\fR\fR [ \fR\fB\fIconnection-option\fB\fR...\fB \fR\fR]\fR \fR\fR \fB--list\fR\fR | \fR\fB-l\fR\fR\fR \fB\fIdbname\fB\fR +.SH "DESCRIPTION" +.PP +\fBcreatelang\fR is a utility for adding a new +programming language to a PostgreSQL database. +\fBcreatelang\fR can handle all the languages +supplied in the default PostgreSQL distribution, but +not languages provided by other parties. +.PP +Although backend programming languages can be added directly using +several SQL commands, it is recommended to use +\fBcreatelang\fR because it performs a number +of checks and is much easier to use. See +CREATE LANGUAGE [\fBcreate_language\fR(7)] +for additional information. +.SH "OPTIONS" +.PP +\fBcreatelang\fR accepts the following command-line arguments: +.TP +\fB\fIlangname\fB\fR +Specifies the name of the procedural programming language to be +defined. +.TP +\fB[-d] \fIdbname\fB\fR +.TP +\fB[--dbname] \fIdbname\fB\fR +Specifies to which database the language should be added. +The default is to use the database with the same name as the +current system user. +.TP +\fB-e\fR +.TP +\fB--echo\fR +Display SQL commands as they are executed. +.TP +\fB-l\fR +.TP +\fB--list\fR +Show a list of already installed languages in the target database. +.TP +\fB-L \fIdirectory\fB\fR +Specifies the directory in which the language interpreter is +to be found. The directory is normally found automatically; this +option is primarily for debugging purposes. +.PP +.PP +\fBcreatelang\fR also accepts +the following command-line arguments for connection parameters: +.TP +\fB-h \fIhost\fB\fR +.TP +\fB--host \fIhost\fB\fR +Specifies the host name of the machine on which the +server +is running. If the value begins with a slash, it is used +as the directory for the Unix domain socket. +.TP +\fB-p \fIport\fB\fR +.TP +\fB--port \fIport\fB\fR +Specifies the TCP port or local Unix domain socket file +extension on which the server +is listening for connections. +.TP +\fB-U \fIusername\fB\fR +.TP +\fB--username \fIusername\fB\fR +User name to connect as. +.TP +\fB-W\fR +.TP +\fB--password\fR +Force password prompt. +.PP +.SH "ENVIRONMENT" +.TP +\fBPGDATABASE\fR +.TP +\fBPGHOST\fR +.TP +\fBPGPORT\fR +.TP +\fBPGUSER\fR +Default connection parameters +.SH "DIAGNOSTICS" +.PP +Most error messages are self-explanatory. If not, run +\fBcreatelang\fR with the \fB--echo\fR +option and see under the respective SQL command +for details. +.SH "NOTES" +.PP +Use \fBdroplang\fR(1) to remove a language. +.SH "EXAMPLES" +.PP +To install the language pltcl into the database +template1: +.sp +.nf +$ \fBcreatelang pltcl template1\fR +.sp +.fi +.SH "SEE ALSO" +\fBdroplang\fR(1), CREATE LANGUAGE [\fBcreate_language\fR(7)] + diff --git a/raw/man1/createuser.1 b/raw/man1/createuser.1 new file mode 100644 index 00000000..6fdcceae --- /dev/null +++ b/raw/man1/createuser.1 @@ -0,0 +1,170 @@ +.\\" auto-generated by docbook2man-spec $Revision: 1.1 $ +.TH "CREATEUSER" "1" "2003-11-02" "Application" "PostgreSQL Client Applications" +.SH NAME +createuser \- define a new PostgreSQL user account + +.SH SYNOPSIS +.sp +\fBcreateuser\fR\fR [ \fR\fB\fIoption\fB\fR...\fB \fR\fR]\fR\fR [ \fR\fB\fIusername\fB \fR\fR]\fR +.SH "DESCRIPTION" +.PP +\fBcreateuser\fR creates a +new PostgreSQL user. +Only superusers (users with usesuper set in +the pg_shadow table) can create +new PostgreSQL users, +so \fBcreateuser\fR must be +invoked by someone who can connect as a PostgreSQL +superuser. +.PP +Being a superuser also implies the ability to bypass access permission +checks within the database, so superuserdom should not be granted lightly. +.PP +\fBcreateuser\fR is a wrapper around the +SQL command CREATE USER [\fBcreate_user\fR(7)]. +There is no effective difference between creating users via +this utility and via other methods for accessing the server. +.SH "OPTIONS" +.PP +\fBcreateuser\fR accepts the following command-line arguments: +.TP +\fB\fIusername\fB\fR +Specifies the name of the PostgreSQL user to be created. +This name must be unique among all PostgreSQL users. +.TP +\fB-a\fR +.TP +\fB--adduser\fR +The new user is allowed to create other users. +(Note: Actually, this makes the new user a \fBsuperuser\fR. +The option is poorly named.) +.TP +\fB-A\fR +.TP +\fB--no-adduser\fR +The new user is not allowed to create other users (i.e., +the new user is a regular user, not a superuser). +This is the default. +.TP +\fB-d\fR +.TP +\fB--createdb\fR +The new user is allowed to create databases. +.TP +\fB-D\fR +.TP +\fB--no-createdb\fR +The new user is not allowed to create databases. +This is the default. +.TP +\fB-e\fR +.TP +\fB--echo\fR +Echo the commands that \fBcreateuser\fR generates +and sends to the server. +.TP +\fB-E\fR +.TP +\fB--encrypted\fR +Encrypts the user's password stored in the database. If not +specified, the default password behavior is used. +.TP +\fB-i \fInumber\fB\fR +.TP +\fB--sysid \fInumber\fB\fR +Allows you to pick a non-default user ID for the new user. This is not +necessary, but some people like it. +.TP +\fB-N\fR +.TP +\fB--unencrypted\fR +Does not encrypt the user's password stored in the database. If +not specified, the default password behavior is used. +.TP +\fB-P\fR +.TP +\fB--pwprompt\fR +If given, \fBcreateuser\fR will issue a prompt for +the password of the new user. This is not necessary if you do not plan +on using password authentication. +.TP +\fB-q\fR +.TP +\fB--quiet\fR +Do not display a response. +.PP +.PP +You will be prompted for a name and other missing information if it +is not specified on the command line. +.PP +\fBcreateuser\fR also accepts the following +command-line arguments for connection parameters: +.TP +\fB-h \fIhost\fB\fR +.TP +\fB--host \fIhost\fB\fR +Specifies the host name of the machine on which the +server +is running. If the value begins with a slash, it is used +as the directory for the Unix domain socket. +.TP +\fB-p \fIport\fB\fR +.TP +\fB--port \fIport\fB\fR +Specifies the TCP port or local Unix domain socket file +extension on which the server +is listening for connections. +.TP +\fB-U \fIusername\fB\fR +.TP +\fB--username \fIusername\fB\fR +User name to connect as (not the user name to create). +.TP +\fB-W\fR +.TP +\fB--password\fR +Force password prompt (to connect to the server, not for the +password of the new user). +.PP +.SH "ENVIRONMENT" +.TP +\fBPGHOST\fR +.TP +\fBPGPORT\fR +.TP +\fBPGUSER\fR +Default connection parameters +.SH "DIAGNOSTICS" +.PP +In case of difficulty, see CREATE USER [\fBcreate_user\fR(7)] and \fBpsql\fR(1) for +discussions of potential problems and error messages. +The database server must be running at the +targeted host. Also, any default connection settings and environment +variables used by the \fBlibpq\fR front-end +library will apply. +.SH "EXAMPLES" +.PP +To create a user joe on the default database +server: +.sp +.nf +$ \fBcreateuser joe\fR +Is the new user allowed to create databases? (y/n) \fBn\fR +Shall the new user be allowed to create more new users? (y/n) \fBn\fR +CREATE USER +.sp +.fi +.PP +To create the same user joe using the +server on host eden, port 5000, avoiding the prompts and +taking a look at the underlying command: +.sp +.nf +$ \fBcreateuser -p 5000 -h eden -D -A -e joe\fR +CREATE USER "joe" NOCREATEDB NOCREATEUSER +CREATE USER +.sp +.fi +.SH "SEE ALSO" +\fBdropuser\fR(1), CREATE USER [\fBcreate_user\fR(7)] + diff --git a/raw/man1/cut.1 b/raw/man1/cut.1 new file mode 100644 index 00000000..8428ba88 --- /dev/null +++ b/raw/man1/cut.1 @@ -0,0 +1,81 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH CUT "1" "October 2003" "cut (coreutils) 5.0" FSF +.SH NAME +cut \- remove sections from each line of files +.SH SYNOPSIS +.B cut +[\fIOPTION\fR]... [\fIFILE\fR]... +.SH DESCRIPTION +.\" Add any additional description here +.PP +Print selected parts of lines from each FILE to standard output. +.PP +Mandatory arguments to long options are mandatory for short options too. +.TP +\fB\-b\fR, \fB\-\-bytes\fR=\fILIST\fR +output only these bytes +.TP +\fB\-c\fR, \fB\-\-characters\fR=\fILIST\fR +output only these characters +.TP +\fB\-d\fR, \fB\-\-delimiter\fR=\fIDELIM\fR +use DELIM instead of TAB for field delimiter +.TP +\fB\-f\fR, \fB\-\-fields\fR=\fILIST\fR +output only these fields; also print any line +that contains no delimiter character, unless +the \fB\-s\fR option is specified +.TP +\fB\-n\fR +with \fB\-b\fR: don't split multibyte characters +.TP +\fB\-s\fR, \fB\-\-only\-delimited\fR +do not print lines not containing delimiters +.TP +\fB\-\-output\-delimiter\fR=\fISTRING\fR +use STRING as the output delimiter +the default is to use the input delimiter +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +Use one, and only one of \fB\-b\fR, \fB\-c\fR or \fB\-f\fR. Each LIST is made up of one +range, or many ranges separated by commas. Each range is one of: +.TP +N +N'th byte, character or field, counted from 1 +.TP +N- +from N'th byte, character or field, to end of line +.TP +N-M +from N'th to M'th (included) byte, character or field +.TP +\fB\-M\fR +from first to M'th (included) byte, character or field +.PP +With no FILE, or when FILE is -, read standard input. +.SH AUTHOR +Written by David Ihnat, David MacKenzie, and Jim Meyering. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B cut +is maintained as a Texinfo manual. If the +.B info +and +.B cut +programs are properly installed at your site, the command +.IP +.B info cut +.PP +should give you access to the complete manual. diff --git a/raw/man1/date.1 b/raw/man1/date.1 new file mode 100644 index 00000000..2eefa7c3 --- /dev/null +++ b/raw/man1/date.1 @@ -0,0 +1,206 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.29. +.TH DATE "1" "March 2003" "date (coreutils) 5.0" "User Commands" +.SH NAME +date \- print or set the system date and time +.SH SYNOPSIS +.B date +[\fIOPTION\fR]... [\fI+FORMAT\fR] +.br +.B date +[\fI-u|--utc|--universal\fR] [\fIMMDDhhmm\fR[[\fICC\fR]\fIYY\fR][\fI.ss\fR]] +.SH DESCRIPTION +.\" Add any additional description here +.PP +Display the current time in the given FORMAT, or set the system date. +.TP +\fB\-d\fR, \fB\-\-date\fR=\fISTRING\fR +display time described by STRING, not `now' +.TP +\fB\-f\fR, \fB\-\-file\fR=\fIDATEFILE\fR +like \fB\-\-date\fR once for each line of DATEFILE +.TP +\fB\-ITIMESPEC\fR, \fB\-\-iso\-8601\fR[=\fITIMESPEC\fR] +output date/time in ISO 8601 format. +TIMESPEC=`date' for date only, +`hours', `minutes', or `seconds' for date and +time to the indicated precision. +\fB\-\-iso\-8601\fR without TIMESPEC defaults to `date'. +.TP +\fB\-r\fR, \fB\-\-reference\fR=\fIFILE\fR +display the last modification time of FILE +.TP +\fB\-R\fR, \fB\-\-rfc\-822\fR +output RFC-822 compliant date string +.TP +\fB\-s\fR, \fB\-\-set\fR=\fISTRING\fR +set time described by STRING +.TP +\fB\-u\fR, \fB\-\-utc\fR, \fB\-\-universal\fR +print or set Coordinated Universal Time +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +FORMAT controls the output. The only valid option for the second form +specifies Coordinated Universal Time. Interpreted sequences are: +.TP +%% +a literal % +.TP +%a +locale's abbreviated weekday name (Sun..Sat) +.TP +%A +locale's full weekday name, variable length (Sunday..Saturday) +.TP +%b +locale's abbreviated month name (Jan..Dec) +.TP +%B +locale's full month name, variable length (January..December) +.TP +%c +locale's date and time (Sat Nov 04 12:02:33 EST 1989) +.TP +%C +century (year divided by 100 and truncated to an integer) [00-99] +.TP +%d +day of month (01..31) +.TP +%D +date (mm/dd/yy) +.TP +%e +day of month, blank padded ( 1..31) +.TP +%F +same as %Y-%m-%d +.TP +%g +the 2-digit year corresponding to the %V week number +.TP +%G +the 4-digit year corresponding to the %V week number +.TP +%h +same as %b +.TP +%H +hour (00..23) +.TP +%I +hour (01..12) +.TP +%j +day of year (001..366) +.TP +%k +hour ( 0..23) +.TP +%l +hour ( 1..12) +.TP +%m +month (01..12) +.TP +%M +minute (00..59) +.TP +%n +a newline +.TP +%N +nanoseconds (000000000..999999999) +.TP +%p +locale's upper case AM or PM indicator (blank in many locales) +.TP +%P +locale's lower case am or pm indicator (blank in many locales) +.TP +%r +time, 12-hour (hh:mm:ss [AP]M) +.TP +%R +time, 24-hour (hh:mm) +.TP +%s +seconds since `00:00:00 1970-01-01 UTC' (a GNU extension) +.TP +%S +second (00..60); the 60 is necessary to accommodate a leap second +.TP +%t +a horizontal tab +.TP +%T +time, 24-hour (hh:mm:ss) +.TP +%u +day of week (1..7); 1 represents Monday +.TP +%U +week number of year with Sunday as first day of week (00..53) +.TP +%V +week number of year with Monday as first day of week (01..53) +.TP +%w +day of week (0..6); 0 represents Sunday +.TP +%W +week number of year with Monday as first day of week (00..53) +.TP +%x +locale's date representation (mm/dd/yy) +.TP +%X +locale's time representation (%H:%M:%S) +.TP +%y +last two digits of year (00..99) +.TP +%Y +year (1970...) +.TP +%z +RFC-822 style numeric timezone (-0500) (a nonstandard extension) +.TP +%Z +time zone (e.g., EDT), or nothing if no time zone is determinable +.PP +By default, date pads numeric fields with zeroes. GNU date recognizes +the following modifiers between `%' and a numeric directive. +.IP +`-' (hyphen) do not pad the field +`_' (underscore) pad the field with spaces +.SH ENVIRONMENT +.TP +TZ +Specifies the timezone, unless overridden by command line parameters. +If neither is specified, the setting from /etc/localtime is used. +.SH AUTHOR +Written by David MacKenzie. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B date +is maintained as a Texinfo manual. If the +.B info +and +.B date +programs are properly installed at your site, the command +.IP +.B info date +.PP +should give you access to the complete manual. diff --git a/raw/man1/dd.1 b/raw/man1/dd.1 new file mode 100644 index 00000000..03bd1a30 --- /dev/null +++ b/raw/man1/dd.1 @@ -0,0 +1,108 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH DD "1" "October 2003" "dd (coreutils) 5.0" FSF +.SH NAME +dd \- convert and copy a file +.SH SYNOPSIS +.B dd +[\fIOPTION\fR]... +.SH DESCRIPTION +.\" Add any additional description here +.PP +Copy a file, converting and formatting according to the options. +.TP +bs=BYTES +force ibs=BYTES and obs=BYTES +.TP +cbs=BYTES +convert BYTES bytes at a time +.TP +conv=KEYWORDS +convert the file as per the comma separated keyword list +.TP +count=BLOCKS +copy only BLOCKS input blocks +.TP +ibs=BYTES +read BYTES bytes at a time +.TP +if=FILE +read from FILE instead of stdin +.TP +obs=BYTES +write BYTES bytes at a time +.TP +of=FILE +write to FILE instead of stdout +.TP +seek=BLOCKS +skip BLOCKS obs-sized blocks at start of output +.TP +skip=BLOCKS +skip BLOCKS ibs-sized blocks at start of input +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +BLOCKS and BYTES may be followed by the following multiplicative suffixes: +xM M, c 1, w 2, b 512, kB 1000, K 1024, MB 1,000,000, M 1,048,576, +GB 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y. +Each KEYWORD may be: +.TP +ascii +from EBCDIC to ASCII +.TP +ebcdic +from ASCII to EBCDIC +.TP +ibm +from ASCII to alternated EBCDIC +.TP +block +pad newline-terminated records with spaces to cbs-size +.TP +unblock +replace trailing spaces in cbs-size records with newline +.TP +lcase +change upper case to lower case +.TP +notrunc +do not truncate the output file +.TP +ucase +change lower case to upper case +.TP +swab +swap every pair of input bytes +.TP +noerror +continue after read errors +.TP +sync +pad every input block with NULs to ibs-size; when used +.IP +with block or unblock, pad with spaces rather than NULs +.SH AUTHOR +Written by Paul Rubin, David MacKenzie, and Stuart Kemp. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B dd +is maintained as a Texinfo manual. If the +.B info +and +.B dd +programs are properly installed at your site, the command +.IP +.B info dd +.PP +should give you access to the complete manual. diff --git a/raw/man1/deallocvt.1 b/raw/man1/deallocvt.1 new file mode 100644 index 00000000..45a329d1 --- /dev/null +++ b/raw/man1/deallocvt.1 @@ -0,0 +1,27 @@ +.\" @(#)deallocvt.1 1.0 970317 aeb +.TH DEALLOCVT 1 "17 Mar 1997" +.SH NAME +deallocvt \- deallocate unused virtual consoles +.SH SYNOPSIS +.B deallocvt +.RI [ N " ...]" +.SH DESCRIPTION +.LP +The command +.B deallocvt +deallocates kernel memory and data structures +for all unused virtual consoles. +If one or more arguments +.IR N " ..." +are given, only the corresponding consoles +.I /dev/ttyN +are deallocated. + +A virtual console is unused if it is not the foreground console, +and no process has it open for reading or writing, and no text +has been selected on its screen. +.SH "SEE ALSO" +.BR chvt (1), +.BR openvt (1) + + diff --git a/raw/man1/declare.1 b/raw/man1/declare.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/declare.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/df.1 b/raw/man1/df.1 new file mode 100644 index 00000000..df77219c --- /dev/null +++ b/raw/man1/df.1 @@ -0,0 +1,106 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH DF "1" "October 2003" "df (coreutils) 5.0" FSF +.SH NAME +df \- report filesystem disk space usage +.SH SYNOPSIS +.B df +[\fIOPTION\fR]... [\fIFILE\fR]... +.SH DESCRIPTION +This manual page +documents the GNU version of +.BR df . +.B df +displays the amount of disk space available on the filesystem +containing each file name argument. If no file name is given, the +space available on all currently mounted filesystems is shown. Disk +space is shown in 1K blocks by default, unless the environment +variable POSIXLY_CORRECT is set, in which case 512-byte blocks are +used. +.PP +If an argument is the absolute file name of a disk device node containing a +mounted filesystem, +.B df +shows the space available on that filesystem rather than on the +filesystem containing the device node (which is always the root +filesystem). This version of +.B df +cannot show the space available on unmounted filesystems, because on +most kinds of systems doing so requires very nonportable intimate +knowledge of filesystem structures. +.SH OPTIONS +.PP +Show information about the filesystem on which each FILE resides, +or all filesystems by default. +.PP +Mandatory arguments to long options are mandatory for short options too. +.TP +\fB\-a\fR, \fB\-\-all\fR +include filesystems having 0 blocks +.HP +\fB\-B\fR, \fB\-\-block\-size\fR=\fISIZE\fR use SIZE-byte blocks +.TP +\fB\-h\fR, \fB\-\-human\-readable\fR +print sizes in human readable format (e.g., 1K 234M 2G) +.TP +\fB\-H\fR, \fB\-\-si\fR +likewise, but use powers of 1000 not 1024 +.TP +\fB\-i\fR, \fB\-\-inodes\fR +list inode information instead of block usage +.TP +\fB\-k\fR +like \fB\-\-block\-size\fR=\fI1K\fR +.TP +\fB\-l\fR, \fB\-\-local\fR +limit listing to local filesystems +.TP +\fB\-\-no\-sync\fR +do not invoke sync before getting usage info (default) +.TP +\fB\-P\fR, \fB\-\-portability\fR +use the POSIX output format +.TP +\fB\-\-sync\fR +invoke sync before getting usage info +.TP +\fB\-t\fR, \fB\-\-type\fR=\fITYPE\fR +limit listing to filesystems of type TYPE +.TP +\fB\-T\fR, \fB\-\-print\-type\fR +print filesystem type +.TP +\fB\-x\fR, \fB\-\-exclude\-type\fR=\fITYPE\fR +limit listing to filesystems not of type TYPE +.TP +\fB\-v\fR +(ignored) +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +SIZE may be (or may be an integer optionally followed by) one of following: +kB 1000, K 1024, MB 1,000,000, M 1,048,576, and so on for G, T, P, E, Z, Y. +.SH AUTHOR +Written by Torbjorn Granlund, David MacKenzie, Larry McVoy, and Paul Eggert. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B df +is maintained as a Texinfo manual. If the +.B info +and +.B df +programs are properly installed at your site, the command +.IP +.B info df +.PP +should give you access to the complete manual. diff --git a/raw/man1/diff.1 b/raw/man1/diff.1 new file mode 100644 index 00000000..6a750dd5 --- /dev/null +++ b/raw/man1/diff.1 @@ -0,0 +1,485 @@ +.TH DIFF 1 "22sep1993" "GNU Tools" "GNU Tools" +.SH NAME +diff \- find differences between two files +.SH SYNOPSIS +.B diff +[options] from-file to-file +.SH DESCRIPTION +In the simplest case, +.I diff +compares the contents of the two files +.I from-file +and +.IR to-file . +A file name of +.B \- +stands for +text read from the standard input. As a special case, +.B "diff \- \-" +compares a copy of standard input to itself. + +If +.I from-file +is a directory and +.I to-file +is not, +.I diff +compares the file in +.I from-file +whose file name is that of +.IR to-file , +and vice versa. The non-directory file must not be +.BR \- . + +If both +.I from-file +and +.I to-file +are directories, +.I diff +compares corresponding files in both directories, in +alphabetical order; this comparison is not recursive unless the +.B \-r +or +.B \-\-recursive +option is given. +.I diff +never +compares the actual contents of a directory as if it were a file. The +file that is fully specified may not be standard input, because standard +input is nameless and the notion of ``file with the same name'' does not +apply. + +.B diff +options begin with +.BR \- , +so normally +.I from-file +and +.I to-file +may not begin with +.BR \- . +However, +.B \-\- +as an +argument by itself treats the remaining arguments as file names even if +they begin with +.BR \- . +.SS Options +Below is a summary of all of the options that GNU +.I diff +accepts. +Most options have two equivalent names, one of which is a single letter +preceded by +.BR \- , +and the other of which is a long name preceded by +.BR \-\- . +Multiple single letter options (unless they take an +argument) can be combined into a single command line word: +.B \-ac +is +equivalent to +.BR "\-a \-c" . +Long named options can be abbreviated to +any unique prefix of their name. Brackets +.RB ( [ +and +.BR ] ) +indicate that an +option takes an optional argument. +.TP +.BI \- lines +Show +.I lines +(an integer) lines of context. This option does not +specify an output format by itself; it has no effect unless it is +combined with +.B \-c +or +.BR \-u . +This option is obsolete. For proper +operation, +.I patch +typically needs at least two lines of context. +.TP +.B \-a +Treat all files as text and compare them line-by-line, even if they +do not seem to be text. +.TP +.B \-b +Ignore changes in amount of white space. +.TP +.B \-B +Ignore changes that just insert or delete blank lines. +.TP +.B \-\-brief +Report only whether the files differ, not the details of the +differences. +.TP +.B \-c +Use the context output format. +.TP +.BI "\-C " lines +.br +.ns +.TP +.BI \-\-context[= lines ] +Use the context output format, showing +.I lines +(an integer) lines of +context, or three if +.I lines +is not given. +For proper operation, +.I patch +typically needs at least two lines of +context. +.TP +.BI \-\-changed\-group\-format= format +Use +.I format +to output a line group containing differing lines from +both files in if-then-else format. +.TP +.B \-d +Change the algorithm to perhaps find a smaller set of changes. This makes +.I diff +slower (sometimes much slower). +.TP +.BI "\-D " name +Make merged if-then-else format output, conditional on the preprocessor +macro +.IR name . +.TP +.B \-e +.br +.ns +.TP +.B \-\-ed +Make output that is a valid +.I ed +script. +.TP +.BI \-\-exclude= pattern +When comparing directories, ignore files and subdirectories whose basenames +match +.IR pattern . +.TP +.BI \-\-exclude\-from= file +When comparing directories, ignore files and subdirectories whose basenames +match any pattern contained in +.IR file . +.TP +.B \-\-expand\-tabs +Expand tabs to spaces in the output, to preserve the alignment of tabs +in the input files. +.TP +.B \-f +Make output that looks vaguely like an +.I ed +script but has changes +in the order they appear in the file. +.TP +.BI "\-F " regexp +In context and unified format, for each hunk of differences, show some +of the last preceding line that matches +.IR regexp . +.TP +.B \-\-forward\-ed +Make output that looks vaguely like an +.B ed +script but has changes +in the order they appear in the file. +.TP +.B \-h +This option currently has no effect; it is present for Unix +compatibility. +.TP +.B \-H +Use heuristics to speed handling of large files that have numerous +scattered small changes. +.TP +.BI \-\-horizon\-lines= lines +Do not discard the last +.I lines +lines of the common prefix +and the first +.I lines +lines of the common suffix. +.TP +.B \-i +Ignore changes in case; consider upper- and lower-case letters +equivalent. +.TP +.BI "\-I " regexp +Ignore changes that just insert or delete lines that match +.IR regexp . +.TP +.BI \-\-ifdef= name +Make merged if-then-else format output, conditional on the preprocessor +macro +.IR name . +.TP +.B \-\-ignore\-all\-space +Ignore white space when comparing lines. +.TP +.B \-\-ignore\-blank\-lines +Ignore changes that just insert or delete blank lines. +.TP +.B \-\-ignore\-case +Ignore changes in case; consider upper- and lower-case to be the same. +.TP +.BI \-\-ignore\-matching\-lines= regexp +Ignore changes that just insert or delete lines that match +.IR regexp . +.TP +.B \-\-ignore\-space\-change +Ignore changes in amount of white space. +.TP +.B \-\-initial\-tab +Output a tab rather than a space before the text of a line in normal or +context format. This causes the alignment of tabs in the line to look +normal. +.TP +.B \-l +Pass the output through +.I pr +to paginate it. +.TP +.BI "\-L " label +.br +.ns +.TP +.BI \-\-label= label +Use +.I label +instead of the file name in the context format +and unified format +headers. +.TP +.B \-\-left\-column +Print only the left column of two common lines in side by side format. +.TP +.BI \-\-line\-format= format +Use +.I format +to output all input lines in in-then-else format. +.TP +.B \-\-minimal +Change the algorithm to perhaps find a smaller set of changes. This +makes +.I diff +slower (sometimes much slower). +.TP +.B \-n +Output RCS-format diffs; like +.B \-f +except that each command +specifies the number of lines affected. +.TP +.B \-N +.br +.ns +.TP +.B \-\-new\-file +In directory comparison, if a file is found in only one directory, +treat it as present but empty in the other directory. +.TP +.BI \-\-new\-group\-format= format +Use +.I format +to output a group of lines taken from just the second +file in if-then-else format. +.TP +.BI \-\-new\-line\-format= format +Use +.I format +to output a line taken from just the second file in +if-then-else format. +.TP +.BI \-\-old\-group\-format= format +Use +.I format +to output a group of lines taken from just the first +file in if-then-else format. +.TP +.BI \-\-old\-line\-format= format +Use +.I format +to output a line taken from just the first file in +if-then-else format. +.TP +.B \-p +Show which C function each change is in. +.TP +.B \-P +When comparing directories, if a file appears only in the second +directory of the two, treat it as present but empty in the other. +.TP +.B \-\-paginate +Pass the output through +.I pr +to paginate it. +.TP +.B \-q +Report only whether the files differ, not the details of the +differences. +.TP +.B \-r +When comparing directories, recursively compare any subdirectories +found. +.TP +.B \-\-rcs +Output RCS-format diffs; like +.B \-f +except that each command +specifies the number of lines affected. +.TP +.B \-\-recursive +When comparing directories, recursively compare any subdirectories +found. +.TP +.B \-\-report\-identical\-files +.br +.ns +.TP +.B \-s +Report when two files are the same. +.TP +.BI "\-S " file +When comparing directories, start with the file +.IR file . +This is +used for resuming an aborted comparison. +.TP +.BI \-\-from\-file= file +Compare +.I file +to all operands. +.I file +can be a directory. +.TP +.BI \-\-to\-file= file +Compare all operands to +.IR file . " file" +can be a directory. +.TP +.B \-\-sdiff\-merge\-assist +Print extra information to help +.IR sdiff . +.I sdiff +uses this +option when it runs +.IR diff . +This option is not intended for users +to use directly. +.TP +.B \-\-show\-c\-function +Show which C function each change is in. +.TP +.BI \-\-show\-function\-line= regexp +In context and unified format, for each hunk of differences, show some +of the last preceding line that matches +.IR regexp . +.TP +.B \-\-side\-by\-side +Use the side by side output format. +.TP +.B \-\-speed\-large\-files +Use heuristics to speed handling of large files that have numerous +scattered small changes. +.TP +.BI \-\-starting\-file= file +When comparing directories, start with the file +.IR file . +This is +used for resuming an aborted comparison. +.TP +.B \-\-suppress\-common\-lines +Do not print common lines in side by side format. +.TP +.B \-t +Expand tabs to spaces in the output, to preserve the alignment of tabs +in the input files. +.TP +.B \-T +Output a tab rather than a space before the text of a line in normal or +context format. This causes the alignment of tabs in the line to look +normal. +.TP +.B \-\-text +Treat all files as text and compare them line-by-line, even if they +do not appear to be text. +.TP +.B \-u +Use the unified output format. +.TP +.BI \-\-unchanged\-group\-format= format +Use +.I format +to output a group of common lines taken from both files +in if-then-else format. +.TP +.BI \-\-unchanged\-line\-format= format +Use +.I format +to output a line common to both files in if-then-else +format. +.TP +.B \-\-unidirectional\-new\-file +When comparing directories, if a file appears only in the second +directory of the two, treat it as present but empty in the other. +.TP +.BI "\-U " lines +.br +.ns +.TP +.BI \-\-unified[= lines ] +Use the unified output format, showing +.I lines +(an integer) lines of +context, or three if +.I lines +is not given. +For proper operation, +.I patch +typically needs at least two lines of +context. +.TP +.B \-v +.br +.ns +.TP +.B \-\-version +Output the version number of +.IR diff . +.TP +.B \-w +Ignore white space when comparing lines. +.TP +.BI "\-W " columns +.br +.ns +.TP +.BI \-\-width= columns +Use an output width of +.I columns +in side by side format. +.TP +.BI "\-x " pattern +When comparing directories, ignore files and subdirectories whose basenames +match +.IR pattern . +.TP +.BI "\-X " file +When comparing directories, ignore files and subdirectories whose basenames +match any pattern contained in +.IR file . +.TP +.B \-y +Use the side by side output format. +.SH SEE ALSO +cmp(1), comm(1), diff3(1), ed(1), patch(1), pr(1), sdiff(1). +.SH DIAGNOSTICS +An exit status of 0 means no differences were found, 1 means some +differences were found, and 2 means trouble. diff --git a/raw/man1/dig.1 b/raw/man1/dig.1 new file mode 100644 index 00000000..2f9dfd6c --- /dev/null +++ b/raw/man1/dig.1 @@ -0,0 +1,363 @@ +.\" +.\" Copyright (C) 2000, 2001 Internet Software Consortium. +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM +.\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +.\" INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, +.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +.\" FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +.\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +.\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.TH "DIG" "1" "Jun 30, 2000" "BIND9" "" +.SH NAME +dig \- DNS lookup utility +.SH SYNOPSIS +.sp +\fBdig\fR [ \fB@server\fR ] [ \fB-b \fIaddress\fB\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-f \fIfilename\fB\fR ] [ \fB-k \fIfilename\fB\fR ] [ \fB-p \fIport#\fB\fR ] [ \fB-t \fItype\fB\fR ] [ \fB-x \fIaddr\fB\fR ] [ \fB-y \fIname:key\fB\fR ] [ \fBname\fR ] [ \fBtype\fR ] [ \fBclass\fR ] [ \fBqueryopt\fR\fI...\fR ] +.sp +\fBdig\fR [ \fB-h\fR ] +.sp +\fBdig\fR [ \fBglobal-queryopt\fR\fI...\fR ] [ \fBquery\fR\fI...\fR ] +.SH "DESCRIPTION" +.PP +\fBdig\fR (domain information groper) is a flexible tool +for interrogating DNS name servers. It performs DNS lookups and +displays the answers that are returned from the name server(s) that +were queried. Most DNS administrators use \fBdig\fR to +troubleshoot DNS problems because of its flexibility, ease of use and +clarity of output. Other lookup tools tend to have less functionality +than \fBdig\fR. +.PP +Although \fBdig\fR is normally used with command-line +arguments, it also has a batch mode of operation for reading lookup +requests from a file. A brief summary of its command-line arguments +and options is printed when the \fB-h\fR option is given. +Unlike earlier versions, the BIND9 implementation of +\fBdig\fR allows multiple lookups to be issued from the +command line. +.PP +Unless it is told to query a specific name server, +\fBdig\fR will try each of the servers listed in +\fI/etc/resolv.conf\fR. +.PP +When no command line arguments or options are given, will perform an +NS query for "." (the root). +.SH "SIMPLE USAGE" +.PP +A typical invocation of \fBdig\fR looks like: +.sp +.nf + dig @server name type +.sp +.fi +where: +.TP +\fBserver\fR +is the name or IP address of the name server to query. This can be an IPv4 +address in dotted-decimal notation or an IPv6 +address in colon-delimited notation. When the supplied +\fIserver\fR argument is a hostname, +\fBdig\fR resolves that name before querying that name +server. If no \fIserver\fR argument is provided, +\fBdig\fR consults \fI/etc/resolv.conf\fR +and queries the name servers listed there. The reply from the name +server that responds is displayed. +.TP +\fBname\fR +is the name of the resource record that is to be looked up. +.TP +\fBtype\fR +indicates what type of query is required \(em +ANY, A, MX, SIG, etc. +\fItype\fR can be any valid query type. If no +\fItype\fR argument is supplied, +\fBdig\fR will perform a lookup for an A record. +.SH "OPTIONS" +.PP +The \fB-b\fR option sets the source IP address of the query +to \fIaddress\fR. This must be a valid address on +one of the host's network interfaces. +.PP +The default query class (IN for internet) is overridden by the +\fB-c\fR option. \fIclass\fR is any valid +class, such as HS for Hesiod records or CH for CHAOSNET records. +.PP +The \fB-f\fR option makes \fBdig \fR operate +in batch mode by reading a list of lookup requests to process from the +file \fIfilename\fR. The file contains a number of +queries, one per line. Each entry in the file should be organised in +the same way they would be presented as queries to +\fBdig\fR using the command-line interface. +.PP +If a non-standard port number is to be queried, the +\fB-p\fR option is used. \fIport#\fR is +the port number that \fBdig\fR will send its queries +instead of the standard DNS port number 53. This option would be used +to test a name server that has been configured to listen for queries +on a non-standard port number. +.PP +The \fB-t\fR option sets the query type to +\fItype\fR. It can be any valid query type which is +supported in BIND9. The default query type "A", unless the +\fB-x\fR option is supplied to indicate a reverse lookup. +A zone transfer can be requested by specifying a type of AXFR. When +an incremental zone transfer (IXFR) is required, +\fItype\fR is set to ixfr=N. +The incremental zone transfer will contain the changes made to the zone +since the serial number in the zone's SOA record was +\fIN\fR. +.PP +Reverse lookups - mapping addresses to names - are simplified by the +\fB-x\fR option. \fIaddr\fR is an IPv4 +address in dotted-decimal notation, or a colon-delimited IPv6 address. +When this option is used, there is no need to provide the +\fIname\fR, \fIclass\fR and +\fItype\fR arguments. \fBdig\fR +automatically performs a lookup for a name like +11.12.13.10.in-addr.arpa and sets the query type and +class to PTR and IN respectively. By default, IPv6 addresses are +looked up using the IP6.ARPA domain and binary labels as defined in +RFC2874. To use the older RFC1886 method using the IP6.INT domain and +"nibble" labels, specify the \fB-n\fR (nibble) option. +.PP +To sign the DNS queries sent by \fBdig\fR and their +responses using transaction signatures (TSIG), specify a TSIG key file +using the \fB-k\fR option. You can also specify the TSIG +key itself on the command line using the \fB-y\fR option; +\fIname\fR is the name of the TSIG key and +\fIkey\fR is the actual key. The key is a base-64 +encoded string, typically generated by \fBdnssec-keygen\fR(8). +Caution should be taken when using the \fB-y\fR option on +multi-user systems as the key can be visible in the output from +\fBps\fR(1) or in the shell's history file. When +using TSIG authentication with \fBdig\fR, the name +server that is queried needs to know the key and algorithm that is +being used. In BIND, this is done by providing appropriate +\fBkey\fR and \fBserver\fR statements in +\fInamed.conf\fR. +.SH "QUERY OPTIONS" +.PP +\fBdig\fR provides a number of query options which affect +the way in which lookups are made and the results displayed. Some of +these set or reset flag bits in the query header, some determine which +sections of the answer get printed, and others determine the timeout +and retry strategies. +.PP +Each query option is identified by a keyword preceded by a plus sign +(+). Some keywords set or reset an option. These may be preceded +by the string no to negate the meaning of that keyword. Other +keywords assign values to options like the timeout interval. They +have the form \fB+keyword=value\fR. +The query options are: +.TP +\fB+[no]tcp\fR +Use [do not use] TCP when querying name servers. The default +behaviour is to use UDP unless an AXFR or IXFR query is requested, in +which case a TCP connection is used. +.TP +\fB+[no]vc\fR +Use [do not use] TCP when querying name servers. This alternate +syntax to \fI+[no]tcp\fR is provided for backwards +compatibility. The "vc" stands for "virtual circuit". +.TP +\fB+[no]ignore\fR +Ignore truncation in UDP responses instead of retrying with TCP. By +default, TCP retries are performed. +.TP +\fB+domain=somename\fR +Set the search list to contain the single domain +\fIsomename\fR, as if specified in a +\fBdomain\fR directive in +\fI/etc/resolv.conf\fR, and enable search list +processing as if the \fI+search\fR option were given. +.TP +\fB+[no]search\fR +Use [do not use] the search list defined by the searchlist or domain +directive in \fIresolv.conf\fR (if any). +The search list is not used by default. +.TP +\fB+[no]defname\fR +Deprecated, treated as a synonym for \fI+[no]search\fR +.TP +\fB+[no]aaonly\fR +This option does nothing. It is provided for compatibility with old +versions of \fBdig\fR where it set an unimplemented +resolver flag. +.TP +\fB+[no]adflag\fR +Set [do not set] the AD (authentic data) bit in the query. The AD bit +currently has a standard meaning only in responses, not in queries, +but the ability to set the bit in the query is provided for +completeness. +.TP +\fB+[no]cdflag\fR +Set [do not set] the CD (checking disabled) bit in the query. This +requests the server to not perform DNSSEC validation of responses. +.TP +\fB+[no]recursive\fR +Toggle the setting of the RD (recursion desired) bit in the query. +This bit is set by default, which means \fBdig\fR +normally sends recursive queries. Recursion is automatically disabled +when the \fI+nssearch\fR or +\fI+trace\fR query options are used. +.TP +\fB+[no]nssearch\fR +When this option is set, \fBdig\fR attempts to find the +authoritative name servers for the zone containing the name being +looked up and display the SOA record that each name server has for the +zone. +.TP +\fB+[no]trace\fR +Toggle tracing of the delegation path from the root name servers for +the name being looked up. Tracing is disabled by default. When +tracing is enabled, \fBdig\fR makes iterative queries to +resolve the name being looked up. It will follow referrals from the +root servers, showing the answer from each server that was used to +resolve the lookup. +.TP +\fB+[no]cmd\fR +toggles the printing of the initial comment in the output identifying +the version of \fBdig\fR and the query options that have +been applied. This comment is printed by default. +.TP +\fB+[no]short\fR +Provide a terse answer. The default is to print the answer in a +verbose form. +.TP +\fB+[no]identify\fR +Show [or do not show] the IP address and port number that supplied the +answer when the \fI+short\fR option is enabled. If +short form answers are requested, the default is not to show the +source address and port number of the server that provided the answer. +.TP +\fB+[no]comments\fR +Toggle the display of comment lines in the output. The default is to +print comments. +.TP +\fB+[no]stats\fR +This query option toggles the printing of statistics: when the query +was made, the size of the reply and so on. The default behaviour is +to print the query statistics. +.TP +\fB+[no]qr\fR +Print [do not print] the query as it is sent. +By default, the query is not printed. +.TP +\fB+[no]question\fR +Print [do not print] the question section of a query when an answer is +returned. The default is to print the question section as a comment. +.TP +\fB+[no]answer\fR +Display [do not display] the answer section of a reply. The default +is to display it. +.TP +\fB+[no]authority\fR +Display [do not display] the authority section of a reply. The +default is to display it. +.TP +\fB+[no]additional\fR +Display [do not display] the additional section of a reply. +The default is to display it. +.TP +\fB+[no]all\fR +Set or clear all display flags. +.TP +\fB+time=T\fR +Sets the timeout for a query to +\fIT\fR seconds. The default time out is 5 seconds. +An attempt to set \fIT\fR to less than 1 will result +in a query timeout of 1 second being applied. +.TP +\fB+tries=T\fR +Sets the number of times to retry UDP queries to server to +\fIT\fR instead of the default, 3. If +\fIT\fR is less than or equal to zero, the number of +retries is silently rounded up to 1. +.TP +\fB+ndots=D\fR +Set the number of dots that have to appear in +\fIname\fR to \fID\fR for it to be +considered absolute. The default value is that defined using the +ndots statement in \fI/etc/resolv.conf\fR, or 1 if no +ndots statement is present. Names with fewer dots are interpreted as +relative names and will be searched for in the domains listed in the +\fBsearch\fR or \fBdomain\fR directive in +\fI/etc/resolv.conf\fR. +.TP +\fB+bufsize=B\fR +Set the UDP message buffer size advertised using EDNS0 to +\fIB\fR bytes. The maximum and minimum sizes of this +buffer are 65535 and 0 respectively. Values outside this range are +rounded up or down appropriately. +.TP +\fB+[no]multiline\fR +Print records like the SOA records in a verbose multi-line +format with human-readable comments. The default is to print +each record on a single line, to facilitate machine parsing +of the \fBdig\fR output. +.TP +\fB+[no]fail\fR +Do not try the next server if you receive a SERVFAIL. The default is +to not try the next server which is the reverse of normal stub resolver +behaviour. +.TP +\fB+[no]besteffort\fR +Attempt to display the contents of messages which are malformed. +The default is to not display malformed answers. +.TP +\fB+[no]dnssec\fR +Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO) +in the the OPT record in the additional section of the query. +.SH "MULTIPLE QUERIES" +.PP +The BIND 9 implementation of \fBdig \fR supports +specifying multiple queries on the command line (in addition to +supporting the \fB-f\fR batch file option). Each of those +queries can be supplied with its own set of flags, options and query +options. +.PP +In this case, each \fIquery\fR argument represent an +individual query in the command-line syntax described above. Each +consists of any of the standard options and flags, the name to be +looked up, an optional query type and class and any query options that +should be applied to that query. +.PP +A global set of query options, which should be applied to all queries, +can also be supplied. These global query options must precede the +first tuple of name, class, type, options, flags, and query options +supplied on the command line. Any global query options (except +the \fB+[no]cmd\fR option) can be +overridden by a query-specific set of query options. For example: +.sp +.nf +dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr +.sp +.fi +shows how \fBdig\fR could be used from the command line +to make three lookups: an ANY query for www.isc.org, a +reverse lookup of 127.0.0.1 and a query for the NS records of +isc.org. +A global query option of \fI+qr\fR is applied, so +that \fBdig\fR shows the initial query it made for each +lookup. The final query has a local query option of +\fI+noqr\fR which means that \fBdig\fR +will not print the initial query when it looks up the NS records for +isc.org. +.SH "FILES" +.PP +\fI/etc/resolv.conf\fR +.SH "SEE ALSO" +.PP +\fBhost\fR(1), +\fBnamed\fR(8), +\fBdnssec-keygen\fR(8), +\fIRFC1035\fR. +.SH "BUGS" +.PP +There are probably too many query options. diff --git a/raw/man1/dircolors.1 b/raw/man1/dircolors.1 new file mode 100644 index 00000000..7b9cffba --- /dev/null +++ b/raw/man1/dircolors.1 @@ -0,0 +1,52 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH DIRCOLORS "1" "October 2003" "dircolors (coreutils) 5.0" FSF +.SH NAME +dircolors \- color setup for ls +.SH SYNOPSIS +.B dircolors +[\fIOPTION\fR]... [\fIFILE\fR] +.SH DESCRIPTION +.\" Add any additional description here +.PP +Output commands to set the LS_COLORS environment variable. +.SS "Determine format of output:" +.TP +\fB\-b\fR, \fB\-\-sh\fR, \fB\-\-bourne\-shell\fR +output Bourne shell code to set LS_COLORS +.TP +\fB\-c\fR, \fB\-\-csh\fR, \fB\-\-c\-shell\fR +output C shell code to set LS_COLORS +.TP +\fB\-p\fR, \fB\-\-print\-database\fR +output defaults +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +If FILE is specified, read it to determine which colors to use for which +file types and extensions. Otherwise, a precompiled database is used. +For details on the format of these files, run `dircolors \fB\-\-print\-database\fR'. +.SH AUTHOR +Written by H. Peter Anvin. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B dircolors +is maintained as a Texinfo manual. If the +.B info +and +.B dircolors +programs are properly installed at your site, the command +.IP +.B info dircolors +.PP +should give you access to the complete manual. diff --git a/raw/man1/dirname.1 b/raw/man1/dirname.1 new file mode 100644 index 00000000..d195b14f --- /dev/null +++ b/raw/man1/dirname.1 @@ -0,0 +1,42 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH DIRNAME "1" "October 2003" "GNU coreutils 5.0" FSF +.SH NAME +dirname \- strip non-directory suffix from file name +.SH SYNOPSIS +.B dirname +\fINAME\fR +.br +.B dirname +\fIOPTION\fR +.SH DESCRIPTION +.\" Add any additional description here +.PP +Print NAME with its trailing /component removed; if NAME contains no /'s, +output `.' (meaning the current directory). +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.SH AUTHOR +Written by David MacKenzie and Jim Meyering. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B dirname +is maintained as a Texinfo manual. If the +.B info +and +.B dirname +programs are properly installed at your site, the command +.IP +.B info dirname +.PP +should give you access to the complete manual. diff --git a/raw/man1/dirs.1 b/raw/man1/dirs.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/dirs.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/disown.1 b/raw/man1/disown.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/disown.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/dropdb.1 b/raw/man1/dropdb.1 new file mode 100644 index 00000000..c2779e15 --- /dev/null +++ b/raw/man1/dropdb.1 @@ -0,0 +1,113 @@ +.\\" auto-generated by docbook2man-spec $Revision: 1.1 $ +.TH "DROPDB" "1" "2003-11-02" "Application" "PostgreSQL Client Applications" +.SH NAME +dropdb \- remove a PostgreSQL database + +.SH SYNOPSIS +.sp +\fBdropdb\fR\fR [ \fR\fB\fIoption\fB\fR...\fB \fR\fR]\fR \fB\fIdbname\fB\fR +.SH "DESCRIPTION" +.PP +\fBdropdb\fR destroys an existing +PostgreSQL database. +The user who executes this command must be a database +superuser or the owner of the database. +.PP +\fBdropdb\fR is a wrapper around the +SQL command DROP DATABASE [\fBdrop_database\fR(7)]. +There is no effective difference between dropping databases via +this utility and via other methods for accessing the server. +.SH "OPTIONS" +.PP +\fBdropdb\fR accepts the following command-line arguments: +.TP +\fB\fIdbname\fB\fR +Specifies the name of the database to be removed. +.TP +\fB-e\fR +.TP +\fB--echo\fR +Echo the commands that \fBdropdb\fR generates +and sends to the server. +.TP +\fB-i\fR +.TP +\fB--interactive\fR +Issues a verification prompt before doing anything destructive. +.TP +\fB-q\fR +.TP +\fB--quiet\fR +Do not display a response. +.PP +.PP +\fBdropdb\fR also accepts the following +command-line arguments for connection parameters: +.TP +\fB-h \fIhost\fB\fR +.TP +\fB--host \fIhost\fB\fR +Specifies the host name of the machine on which the +server +is running. If the value begins with a slash, it is used +as the directory for the Unix domain socket. +.TP +\fB-p \fIport\fB\fR +.TP +\fB--port \fIport\fB\fR +Specifies the TCP port or local Unix domain socket file +extension on which the server +is listening for connections. +.TP +\fB-U \fIusername\fB\fR +.TP +\fB--username \fIusername\fB\fR +User name to connect as +.TP +\fB-W\fR +.TP +\fB--password\fR +Force password prompt. +.PP +.SH "ENVIRONMENT" +.TP +\fBPGHOST\fR +.TP +\fBPGPORT\fR +.TP +\fBPGUSER\fR +Default connection parameters +.SH "DIAGNOSTICS" +.PP +In case of difficulty, see DROP DATABASE [\fBdrop_database\fR(7)] and \fBpsql\fR(1) for +discussions of potential problems and error messages. +The database server must be running at the +targeted host. Also, any default connection settings and environment +variables used by the \fBlibpq\fR front-end +library will apply. +.SH "EXAMPLES" +.PP +To destroy the database demo on the default +database server: +.sp +.nf +$ \fBdropdb demo\fR +DROP DATABASE +.sp +.fi +.PP +To destroy the database demo using the +server on host eden, port 5000, with verification and a peek +at the underlying command: +.sp +.nf +$ \fBdropdb -p 5000 -h eden -i -e demo\fR +Database "demo" will be permanently deleted. +Are you sure? (y/n) \fBy\fR +DROP DATABASE "demo" +DROP DATABASE +.sp +.fi +.SH "SEE ALSO" +\fBcreatedb\fR(1), DROP DATABASE [\fBdrop_database\fR(7)] + diff --git a/raw/man1/droplang.1 b/raw/man1/droplang.1 new file mode 100644 index 00000000..72e68e05 --- /dev/null +++ b/raw/man1/droplang.1 @@ -0,0 +1,107 @@ +.\\" auto-generated by docbook2man-spec $Revision: 1.1 $ +.TH "DROPLANG" "1" "2003-11-02" "Application" "PostgreSQL Client Applications" +.SH NAME +droplang \- remove a PostgreSQL procedural language + +.SH SYNOPSIS +.sp +\fBdroplang\fR\fR [ \fR\fB\fIconnection-option\fB\fR...\fB \fR\fR]\fR \fB\fIlangname\fB\fR\fR [ \fR\fB\fIdbname\fB \fR\fR]\fR + +\fBdroplang\fR\fR [ \fR\fB\fIconnection-option\fB\fR...\fB \fR\fR]\fR \fR\fR \fB--list\fR\fR | \fR\fB-l\fR\fR\fR \fB\fIdbname\fB\fR +.SH "DESCRIPTION" +.PP +\fBdroplang\fR is a utility for removing an +existing programming language from a +PostgreSQL database. +\fBdroplang\fR can drop any procedural language, +even those not supplied by the PostgreSQL distribution. +.PP +Although backend programming languages can be removed directly using +several SQL commands, it is recommended to use +\fBdroplang\fR because it performs a number +of checks and is much easier to use. See +DROP LANGUAGE [\fBdrop_language\fR(7)] +for more. +.SH "OPTIONS" +.PP +\fBdroplang\fR accepts the following command line arguments: +.TP +\fB\fIlangname\fB\fR +Specifies the name of the backend programming language to be removed. +.TP +\fB[-d] \fIdbname\fB\fR +.TP +\fB[--dbname] \fIdbname\fB\fR +Specifies from which database the language should be removed. +The default is to use the database with the same name as the +current system user. +.TP +\fB-e\fR +.TP +\fB--echo\fR +Display SQL commands as they are executed. +.TP +\fB-l\fR +.TP +\fB--list\fR +Show a list of already installed languages in the target database. +.PP +.PP +\fBdroplang\fR also accepts +the following command line arguments for connection parameters: +.TP +\fB-h \fIhost\fB\fR +.TP +\fB--host \fIhost\fB\fR +Specifies the host name of the machine on which the +server +is running. If host begins with a slash, it is used +as the directory for the Unix domain socket. +.TP +\fB-p \fIport\fB\fR +.TP +\fB--port \fIport\fB\fR +Specifies the Internet TCP/IP port or local Unix domain socket file +extension on which the server +is listening for connections. +.TP +\fB-U \fIusername\fB\fR +.TP +\fB--username \fIusername\fB\fR +User name to connect as +.TP +\fB-W\fR +.TP +\fB--password\fR +Force password prompt. +.PP +.SH "ENVIRONMENT" +.TP +\fBPGDATABASE\fR +.TP +\fBPGHOST\fR +.TP +\fBPGPORT\fR +.TP +\fBPGUSER\fR +Default connection parameters +.SH "DIAGNOSTICS" +.PP +Most error messages are self-explanatory. If not, run +\fBdroplang\fR with the \fB--echo\fR +option and see under the respective SQL command +for details. +.SH "NOTES" +.PP +Use \fBcreatelang\fR(1) to add a language. +.SH "EXAMPLES" +.PP +To remove the language pltcl: +.sp +.nf +$ \fBdroplang pltcl dbname\fR +.sp +.fi +.SH "SEE ALSO" +\fBcreatelang\fR(1), DROP LANGUAGE [\fBdrop_language\fR(7)] + diff --git a/raw/man1/dropuser.1 b/raw/man1/dropuser.1 new file mode 100644 index 00000000..77253174 --- /dev/null +++ b/raw/man1/dropuser.1 @@ -0,0 +1,117 @@ +.\\" auto-generated by docbook2man-spec $Revision: 1.1 $ +.TH "DROPUSER" "1" "2003-11-02" "Application" "PostgreSQL Client Applications" +.SH NAME +dropuser \- remove a PostgreSQL user account + +.SH SYNOPSIS +.sp +\fBdropuser\fR\fR [ \fR\fB\fIoption\fB\fR...\fB \fR\fR]\fR\fR [ \fR\fB\fIusername\fB \fR\fR]\fR +.SH "DESCRIPTION" +.PP +\fBdropuser\fR removes an existing +PostgreSQL user +\fBand\fR the databases which that user owned. +Only superusers (users with usesuper set in +the pg_shadow table) can destroy +PostgreSQL users. +.PP +\fBdropuser\fR is a wrapper around the +SQL command DROP USER [\fBdrop_user\fR(7)]. +There is no effective difference between dropping users via +this utility and via other methods for accessing the server. +.SH "OPTIONS" +.PP +\fBdropuser\fR accepts the following command-line arguments: +.TP +\fB\fIusername\fB\fR +Specifies the name of the PostgreSQL user to be removed. +You will be prompted for a name if none is specified on the command line. +.TP +\fB-e\fR +.TP +\fB--echo\fR +Echo the commands that \fBdropuser\fR generates +and sends to the server. +.TP +\fB-i\fR +.TP +\fB--interactive\fR +Prompt for confirmation before actually removing the user. +.TP +\fB-q\fR +.TP +\fB--quiet\fR +Do not display a response. +.PP +.PP +\fBdropuser\fR also accepts the following +command-line arguments for connection parameters: +.TP +\fB-h \fIhost\fB\fR +.TP +\fB--host \fIhost\fB\fR +Specifies the host name of the machine on which the +server +is running. If the value begins with a slash, it is used +as the directory for the Unix domain socket. +.TP +\fB-p \fIport\fB\fR +.TP +\fB--port \fIport\fB\fR +Specifies the TCP port or local Unix domain socket file +extension on which the server +is listening for connections. +.TP +\fB-U \fIusername\fB\fR +.TP +\fB--username \fIusername\fB\fR +User name to connect as (not the user name to drop) +.TP +\fB-W\fR +.TP +\fB--password\fR +Force password prompt (to connect to the server, not for the +password of the user to be dropped). +.PP +.SH "ENVIRONMENT" +.TP +\fBPGHOST\fR +.TP +\fBPGPORT\fR +.TP +\fBPGUSER\fR +Default connection parameters +.SH "DIAGNOSTICS" +.PP +In case of difficulty, see DROP USER [\fBdrop_user\fR(7)] and \fBpsql\fR(1) for +discussions of potential problems and error messages. +The database server must be running at the +targeted host. Also, any default connection settings and environment +variables used by the \fBlibpq\fR front-end +library will apply. +.SH "EXAMPLES" +.PP +To remove user joe from the default database +server: +.sp +.nf +$ \fBdropuser joe\fR +DROP USER +.sp +.fi +.PP +To remove user joe using the server on host +eden, port 5000, with verification and a peek at the underlying +command: +.sp +.nf +$ \fBdropuser -p 5000 -h eden -i -e joe\fR +User "joe" and any owned databases will be permanently deleted. +Are you sure? (y/n) \fBy\fR +DROP USER "joe" +DROP USER +.sp +.fi +.SH "SEE ALSO" +\fBcreateuser\fR(1), DROP USER [\fBdrop_user\fR(7)] + diff --git a/raw/man1/du.1 b/raw/man1/du.1 new file mode 100644 index 00000000..ddeee9f7 --- /dev/null +++ b/raw/man1/du.1 @@ -0,0 +1,117 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH DU "1" "October 2003" "du (coreutils) 5.0" FSF +.SH NAME +du \- estimate file space usage +.SH SYNOPSIS +.B du +[\fIOPTION\fR]... [\fIFILE\fR]... +.SH DESCRIPTION +.\" Add any additional description here +.PP +Summarize disk usage of each FILE, recursively for directories. +.PP +Mandatory arguments to long options are mandatory for short options too. +.TP +\fB\-a\fR, \fB\-\-all\fR +write counts for all files, not just directories +.TP +\fB\-\-apparent\-size\fR +print apparent sizes, rather than disk usage; although +the apparent size is usually smaller, it may be +larger due to holes in (`sparse') files, internal +fragmentation, indirect blocks, and the like +.HP +\fB\-B\fR, \fB\-\-block\-size\fR=\fISIZE\fR use SIZE-byte blocks +.TP +\fB\-b\fR, \fB\-\-bytes\fR +equivalent to `--apparent-size \fB\-\-block\-size\fR=\fI1\fR' +.TP +\fB\-c\fR, \fB\-\-total\fR +produce a grand total +.TP +\fB\-D\fR, \fB\-\-dereference\-args\fR +dereference FILEs that are symbolic links +.TP +\fB\-h\fR, \fB\-\-human\-readable\fR +print sizes in human readable format (e.g., 1K 234M 2G) +.TP +\fB\-H\fR, \fB\-\-si\fR +likewise, but use powers of 1000 not 1024 +.TP +\fB\-k\fR +like \fB\-\-block\-size\fR=\fI1K\fR +.TP +\fB\-l\fR, \fB\-\-count\-links\fR +count sizes many times if hard linked +.TP +\fB\-L\fR, \fB\-\-dereference\fR +dereference all symbolic links +.TP +\fB\-S\fR, \fB\-\-separate\-dirs\fR +do not include size of subdirectories +.TP +\fB\-s\fR, \fB\-\-summarize\fR +display only a total for each argument +.TP +\fB\-x\fR, \fB\-\-one\-file\-system\fR +skip directories on different filesystems +.TP +\fB\-X\fR FILE, \fB\-\-exclude\-from\fR=\fIFILE\fR +Exclude files that match any pattern in FILE. +.HP +\fB\-\-exclude\fR=\fIPATTERN\fR Exclude files that match PATTERN. +.TP +\fB\-\-max\-depth\fR=\fIN\fR +print the total for a directory (or file, with \fB\-\-all\fR) +only if it is N or fewer levels below the command +line argument; \fB\-\-max\-depth\fR=\fI0\fR is the same as +\fB\-\-summarize\fR +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +SIZE may be (or may be an integer optionally followed by) one of following: +kB 1000, K 1024, MB 1,000,000, M 1,048,576, and so on for G, T, P, E, Z, Y. +.SH PATTERNS +PATTERN is a shell pattern (not a regular expression). The pattern +.BR ? +matches any one character, whereas +.BR * +matches any string (composed of zero, one or multiple characters). For +example, +.BR *.o +will match any files whose names end in +.BR .o . +Therefore, the command +.IP +.B du --exclude='*.o' +.PP +will skip all files and subdirectories ending in +.BR .o +(including the file +.BR .o +itself). +.SH AUTHOR +Written by Torbjorn Granlund, David MacKenzie, Larry McVoy, Paul Eggert, and Jim Meyering. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B du +is maintained as a Texinfo manual. If the +.B info +and +.B du +programs are properly installed at your site, the command +.IP +.B info du +.PP +should give you access to the complete manual. diff --git a/raw/man1/dumpkeys.1 b/raw/man1/dumpkeys.1 new file mode 100644 index 00000000..04a19b43 --- /dev/null +++ b/raw/man1/dumpkeys.1 @@ -0,0 +1,209 @@ +.\" @(#)loadkeys.1 1.0 93/09/1 RK +.TH DUMPKEYS 1 "1 Sep 1993" +.SH NAME +dumpkeys \- dump keyboard translation tables +.SH SYNOPSIS +.B dumpkeys +[ +.B \-hilfn +.BI \-c charset +.B \-\-help \-\-short\-info \-\-long\-info \-\-numeric \-\-full\-table \-\-funcs\-only \-\-keys\-only \-\-compose\-only +.BI \-\-charset= charset +] +.SH DESCRIPTION +.IX "dumpkeys command" "" "\fLdumpkeys\fR command" +.LP +.B dumpkeys +writes, to the standard output, the current contents of the keyboard +driver's translation tables, in the format specified by +.BR keymaps (5). +.LP +Using the various options, the format of the output can be controlled +and also other information from the kernel and the programs +.BR dumpkeys (1) +and +.BR loadkeys (1) +can be obtained. +.SH OPTIONS +.TP +.B \-h \-\-help +Prints the program's version number and a short usage message to the +program's standard error output and exits. +.TP +.B \-i \-\-short-info +Prints some characteristics of the kernel's keyboard driver. The items +shown are: +.LP +.RS +Keycode range supported by the kernel +.LP +.RS +This tells what values can be used after the +.B keycode +keyword in keytable files. See +.BR keymaps (5) +for more information and the syntax of these files. +.RE +.LP +Number of actions bindable to a key +.LP +.RS +This tells how many different actions a single key can output using +various modifier keys. If the value is 16 for example, you can define up +to 16 different actions to a key combined with modifiers. When the value +is 16, the kernel probably knows about four modifier keys, which you can +press in different combinations with the key to access all the bound +actions. +.RE +.LP +Ranges of action codes supported by the kernel +.LP +.RS +This item contains a list of action code ranges in hexadecimal notation. +These are the values that can be used in the right hand side of a key +definition, ie. the +.IR vv 's +in a line +.LP +.RS +.B keycode +.I xx += +.I vv vv vv vv +.RE +.LP +(see +.BR keymaps (5) +for more information about the format of key definition lines). +.BR dumpkeys (1) +and +.BR loadkeys (1) +support a symbolic notation, which is preferable to the numeric one, as +the action codes may vary from kernel to kernel while the symbolic names +usually remain the same. However, the list of action code ranges can be +used to determine, if the kernel actually supports all the symbols +.BR loadkeys (1) +knows, or are there maybe some actions supported by the kernel that +have no symbolic name in your +.BR loadkeys (1) +program. To see this, you compare the range list with the action symbol +list, see option +.B --long-info +below. +.RE +.LP +Number of function keys supported by kernel +.LP +.RS +This tells the number of action codes that can be used to output +strings of characters. These action codes are traditionally bound to +the various function and editing keys of the keyboard and are defined +to send standard escape sequences. However, you can redefine these to +send common command lines, email addresses or whatever you like. +Especially if the number of this item is greater than the number of +function and editing keys in your keyboard, you may have some "spare" +action codes that you can bind to AltGr-letter combinations, for example, +to send some useful strings. See +.BR loadkeys (1) +for more details. +.RE +.LP +Function strings +.LP +.RS +You can see you current function key definitions with the command +.LP +.RS +.B dumpkeys --funcs-only +.RE +.LP +.RE +.RE +.LP +.TP +.B \-l \-\-long-info +This option instructs +.B dumpkeys +to print a long information listing. The output is the same as with the +.B --short-info +appended with the list of action symbols supported by +.BR loadkeys (1) +and +.BR dumpkeys (1), +along with the symbols' numeric values. +.LP +.TP +.B \-n \-\-numeric +This option causes +.B dumpkeys +to by-pass the conversion of action code values to symbolic notation and +to print the in hexadecimal format instead. +.LP +.TP +.B \-f \-\-full-table +This makes +.B dumpkeys +skip all the short-hand heuristics (see +.BR keymaps (5)) +and output the key bindings in the canonical form. First a keymaps +line describing the currently defined modifier combinations +is printed. Then for each key a row with a column for each +modifier combination is printed. For +example, if the current keymap in use uses seven modifiers, +every row will have seven action code columns. This format +can be useful for example to programs that post-process the +output of +.BR dumpkeys . +.LP +.TP +.B \-\-funcs-only +When this option is given, +.B dumpkeys +prints only the function key string definitions. Normally +.B dumpkeys +prints both the key bindings and the string definitions. +.LP +.TP +.B \-\-keys-only +When this option is given, +.B dumpkeys +prints only the key bindings. Normally +.B dumpkeys +prints both the key bindings and the string definitions. +.LP +.TP +.B \-\-compose-only +When this option is given, +.B dumpkeys +prints only the compose key combinations. +This option is available only if your kernel has compose key support. +.LP +.TP +.BI \-c charset " " " " \-\-charset= charset +This instructs +.B dumpkeys +to interpret character code values according to the specified character +set. This affects only the translation of character code values to +symbolic names. Valid values for +.I charset +currently are +.BR iso-8859-X , +Where X is a digit in 1-9. If no +.I charset +is specified, +.B iso-8859-1 +is used as a default. +This option produces an output line `charset "iso-8859-X"', telling +loadkeys how to interpret the keymap. (For example, "division" is +0xf7 in iso-8859-1 but 0xba in iso-8859-8.) +.LP +.SH FILES +.PD 0 +.TP 20 +.BI //lib/kbd/keymaps +recommended directory for keytable files +.PD +.SH "SEE ALSO" +.BR loadkeys (1), +.BR keymaps (5) + diff --git a/raw/man1/echo.1 b/raw/man1/echo.1 new file mode 100644 index 00000000..4a2d8206 --- /dev/null +++ b/raw/man1/echo.1 @@ -0,0 +1,82 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH ECHO "1" "October 2003" "GNU coreutils 5.0" FSF +.SH NAME +echo \- display a line of text +.SH SYNOPSIS +.B echo +[\fIOPTION\fR]... [\fISTRING\fR]... +.SH DESCRIPTION +NOTE: your shell may have its own version of echo which will supercede +the version described here. Please refer to your shell's documentation +for details about the options it supports. +.PP +Echo the STRING(s) to standard output. +.TP +\fB\-n\fR +do not output the trailing newline +.TP +\fB\-e\fR +enable interpretation of the backslash-escaped characters +listed below +.TP +\fB\-E\fR +disable interpretation of those sequences in STRINGs +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +Without \fB\-E\fR, the following sequences are recognized and interpolated: +.TP +\eNNN +the character whose ASCII code is NNN (octal) +.TP +\e\e +backslash +.TP +\ea +alert (BEL) +.TP +\eb +backspace +.TP +\ec +suppress trailing newline +.TP +\ef +form feed +.TP +\en +new line +.TP +\er +carriage return +.TP +\et +horizontal tab +.TP +\ev +vertical tab +.SH AUTHOR +Written by FIXME unknown. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B echo +is maintained as a Texinfo manual. If the +.B info +and +.B echo +programs are properly installed at your site, the command +.IP +.B info echo +.PP +should give you access to the complete manual. diff --git a/raw/man1/egrep.1 b/raw/man1/egrep.1 new file mode 100644 index 00000000..6a74c5d1 --- /dev/null +++ b/raw/man1/egrep.1 @@ -0,0 +1 @@ +.so man1/grep.1 diff --git a/raw/man1/eject.1 b/raw/man1/eject.1 new file mode 100644 index 00000000..93f59b83 --- /dev/null +++ b/raw/man1/eject.1 @@ -0,0 +1,288 @@ +.\" This file Copyright (C) 1994-2001 Jeff Tranter +.\" (tranter@pobox.com) +.\" It may be distributed under the GNU Public License, version 2, or +.\" any higher version. See section COPYING of the GNU Public license +.\" for conditions under which this file may be redistributed. +.TH EJECT 1 "18 May 2001" "Linux" "User Commands" +.SH NAME +eject \- eject removable media +.SH SYNOPSIS +eject -h +.br +eject [-vnrsfqp] [] +.br +eject [-vn] -d +.br +eject [-vn] -a on|off|1|0 [] +.br +eject [-vn] -c slot [] +.br +eject [-vn] -t [] +.br +eject [-vn] -x [] +.br +eject -V + +.SH DESCRIPTION + +.B Eject +allows removable media (typically a CD-ROM, floppy disk, tape, or JAZ +or ZIP disk) to be ejected under software control. The command can +also control some multi-disc CD-ROM changers, the auto-eject feature +supported by some devices, and close the disc tray of some CD-ROM +drives. + +The device corresponding to is ejected. The name can be a +device file or mount point, either a full path or with the leading +"/dev" or "/mnt" omitted. If no name is specified, the default name +"cdrom" is used. + +There are four different methods of ejecting, depending on whether the +device is a CD-ROM, SCSI device, removable floppy, or tape. By default +eject tries all four methods in order until it succeeds. + +If the device is currently mounted, it is unmounted before ejecting. + +.PP +.SH "COMMAND\-LINE OPTIONS" +.TP 0.5i +.B -h +This option causes +.B eject +to display a brief description of the command options. + +.TP 0.5i +.B -v +This makes +.B eject +run in verbose mode; more information is displayed about what the +command is doing. + +.TP 0.5i +.B -d +If invoked with this option, +.B eject +lists the default device name. + +.TP 0.5i +.B -a on|1|off|0 +This option controls the auto-eject mode, supported by some devices. +When enabled, the drive automatically ejects when the device is +closed. + +.TP 0.5i +.B -c +With this option a CD slot can be selected from an ATAPI/IDE CD-ROM +changer. Linux 2.0 or higher is required to use this feature. The +CD-ROM drive can not be in use (mounted data CD or playing a music CD) +for a change request to work. Please also note that the first slot of +the changer is referred to as 0, not 1. + +.TP 0.5i +.B -t +With this option the drive is given a CD-ROM tray close command. Not +all devices support this command. + +.TP 0.5i +.B -x +With this option the drive is given a CD-ROM select speed command. +The speed argument is a number indicating the desired speed (e.g. 8 +for 8X speed), or 0 for maximum data rate. Not all devices support +this command and you can only specify speeds that the drive is capable +of. Every time the media is changed this option is cleared. This +option can be used alone, or with the -t and -c options. + +.TP 0.5i +.B -n +With this option the selected device is displayed but no action is +performed. + +.TP 0.5i +.B -r +This option specifies that the drive should be ejected using a +CDROM eject command. +.TP 0.5i + +.B -s +This option specifies that the drive should be ejected using +SCSI commands. + +.TP 0.5i +.B -f +This option specifies that the drive should be ejected using a +removable floppy disk eject command. + +.TP 0.5i +.B -q +This option specifies that the drive should be ejected using a +tape drive offline command. + +.TP 0.5i +.B -p +This option allow you to use /proc/mounts instead /etc/mtab. It +also passes the -n option to umount(1). + +.TP 0.5i +.B -V +This option causes +.B eject +to display the program version and exit. + +.SH LONG OPTIONS +All options have corresponding long names, as listed below. The long +names can be abbreviated as long as they are unique. + +.br +-h --help +.br +-v --verbose +.br +-d --default +.br +-a --auto +.br +-c --changerslot +.br +-t --trayclose +.br +-x --cdspeed +.br +-n --noop +.br +-r --cdrom +.br +-s --scsi +.br +-f --floppy +.br +-q --tape +.br +-V --version +.br +-p --proc +.br + +.SH EXAMPLES +.PP +Eject the default device: +.IP +eject +.PP +Eject a device or mount point named cdrom: +.IP +eject cdrom +.PP +Eject using device name: +.IP +eject /dev/cdrom +.PP +Eject using mount point: +.IP +eject /mnt/cdrom/ +.PP +Eject 4th IDE device: +.IP +eject hdd +.PP +Eject first SCSI device: +.IP +eject sda +.PP +Eject using SCSI partition name (e.g. a ZIP drive): +.IP +eject sda4 +.PP +Select 5th disc on mult-disc changer: +.IP +eject -v -c5 /dev/cdrom +.PP +Turn on auto-eject on a SoundBlaster CD-ROM drive: +.IP +eject -a on /dev/sbpcd + +.SH EXIT STATUS +.PP + +Returns 0 if operation was successful, 1 if operation failed or command +syntax was not valid. + +.SH NOTES +.PP + +.B Eject +only works with devices that support one or more of the four methods +of ejecting. This includes most CD-ROM drives (IDE, SCSI, and +proprietary), some SCSI tape drives, JAZ drives, ZIP drives (parallel +port, SCSI, and IDE versions), and LS120 removable floppies. Users +have also reported success with floppy drives on Sun SPARC and Apple +Macintosh systems. If +.B eject +does not work, it is most likely a limitation of the kernel driver +for the device and not the +.B eject +program itself. + +The -r, -s, -f, and -q options allow controlling which methods are +used to eject. More than one method can be specified. If none of these +options are specified, it tries all four (this works fine in most +cases). + +.B Eject +may not always be able to determine if the device is mounted (e.g. if +it has several names). If the device name is a symbolic link, +.B eject +will follow the link and use the device that it points to. + +If +.B eject +determines that the device can have multiple partitions, it will +attempt to unmount all mounted partitions of the device before +ejecting. If an unmount fails, the program will not attempt to eject +the media. + +You can eject an audio CD. Some CD-ROM drives will refuse to open the +tray if the drive is empty. Some devices do not support the tray close +command. + +If the auto-eject feature is enabled, then the drive will always be +ejected after running this command. Not all Linux kernel CD-ROM +drivers support the auto-eject mode. There is no way to find out the +state of the auto-eject mode. + +You need appropriate privileges to access the device files. Running as +root or setuid root is required to eject some devices (e.g. SCSI +devices). + +The heuristic used to find a device, given a name, is as follows. If +the name ends in a trailing slash, it is removed (this is to support +filenames generated using shell file name completion). If the name +starts with '.' or '/', it tries to open it as a device file or mount +point. If that fails, it tries prepending '/dev/', '/mnt/', '/dev/cdroms', +\&'/dev/rdsk/', '/dev/dsk/', and finally './' to the name, until a +device file or mount point is found that can be opened. The program +checks /etc/mtab for mounted devices. If that fails, it also checks +/etc/fstab for mount points of currently unmounted devices. + +Creating symbolic links such as /dev/cdrom or /dev/zip is recommended +so that +.B eject +can determine the appropriate devices using easily remembered names. + +To save typing you can create a shell alias for the eject options that +work for your particular setup. + +.SH AUTHOR +.B Eject +was written by Jeff Tranter (tranter@pobox.com) and is released +under the conditions of the GNU General Public License. See the file +COPYING and notes in the source code for details. + +The -x option was added by Nobuyuki Tsuchimura (tutimura@nn.iij4u.or.jp), +with thanks to Roland Krivanek (krivanek@fmph.uniba.sk) and his +cdrom_speed command. + +.SH SEE ALSO + +mount(2), umount(2), mount(8), umount(8) +.br +/usr/src/linux/Documentation/cdrom/ diff --git a/raw/man1/emacs.1 b/raw/man1/emacs.1 new file mode 100644 index 00000000..4a3cca0a --- /dev/null +++ b/raw/man1/emacs.1 @@ -0,0 +1,534 @@ +.\" Copyright (C) 1995, 1999, 2000, 2001 Free Software Foundation, Inc. +.\" +.\" This file is part of GNU Emacs. +.\" +.\" GNU Emacs is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2, or (at your option) +.\" any later version. +.\" +.\" GNU Emacs is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with GNU Emacs; see the file COPYING. If not, write to the +.\" Free Software Foundation, Inc., 59 Temple Place - Suite 330, +.\" Boston, MA 02111-1307, USA. +.\" +.TH EMACS 1 "1995 December 7" +.UC 4 +.SH NAME +emacs \- GNU project Emacs +.SH SYNOPSIS +.B emacs +[ +.I command-line switches +] [ +.I files ... +] +.br +.SH DESCRIPTION +.I GNU Emacs +is a version of +.I Emacs, +written by the author of the original (PDP-10) +.I Emacs, +Richard Stallman. +.br +The primary documentation of GNU Emacs is in the GNU Emacs Manual, +which you can read on line using Info, a subsystem of Emacs. Please +look there for complete and up-to-date documentation. This man page +is updated only when someone volunteers to do so; the Emacs +maintainers' priority goal is to minimize the amount of time this man +page takes away from other more useful projects. +.br +The user functionality of GNU Emacs encompasses +everything other +.I Emacs +editors do, and it is easily extensible since its +editing commands are written in Lisp. +.PP +.I Emacs +has an extensive interactive help facility, +but the facility assumes that you know how to manipulate +.I Emacs +windows and buffers. +CTRL-h (backspace +or CTRL-h) enters the Help facility. Help Tutorial (CTRL-h t) +requests an interactive tutorial which can teach beginners the fundamentals +of +.I Emacs +in a few minutes. +Help Apropos (CTRL-h a) helps you +find a command given its functionality, Help Character (CTRL-h c) +describes a given character's effect, and Help Function (CTRL-h f) +describes a given Lisp function specified by name. +.PP +.I Emacs's +Undo can undo several steps of modification to your buffers, so it is +easy to recover from editing mistakes. +.PP +.I GNU Emacs's +many special packages handle mail reading (RMail) and sending (Mail), +outline editing (Outline), compiling (Compile), running subshells +within +.I Emacs +windows (Shell), running a Lisp read-eval-print loop +(Lisp-Interaction-Mode), and automated psychotherapy (Doctor). +.PP +There is an extensive reference manual, but +users of other Emacses +should have little trouble adapting even +without a copy. Users new to +.I Emacs +will be able +to use basic features fairly rapidly by studying the tutorial and +using the self-documentation features. +.PP +.SM Emacs Options +.PP +The following options are of general interest: +.TP 8 +.I file +Edit +.I file. +.TP +.BI \+ number +Go to the line specified by +.I number +(do not insert a space between the "+" sign and +the number). +.TP +.B \-q +Do not load an init file. +.TP +.BI \-u " user" +Load +.I user's +init file. +.TP +.BI \-t " file" +Use specified +.I file +as the terminal instead of using stdin/stdout. +This must be the first argument specified in the command line. +.PP +The following options are lisp-oriented +(these options are processed in the order encountered): +.TP 8 +.BI \-f " function" +Execute the lisp function +.I function. +.TP +.BI \-l " file" +Load the lisp code in the file +.I file. +.PP +The following options are useful when running +.I Emacs +as a batch editor: +.TP 8 +.BI \-batch +Edit in batch mode. The editor will send messages to stderr. This +option must be the first in the argument list. You must use -l and -f +options to specify files to execute and functions to call. +.TP +.B \-kill +Exit +.I Emacs +while in batch mode. +.\" START DELETING HERE IF YOU'RE NOT USING X +.PP +.SM Using Emacs with X +.PP +.I Emacs +has been tailored to work well with the X window system. +If you run +.I Emacs +from under X windows, it will create its own X window to +display in. You will probably want to start the editor +as a background process +so that you can continue using your original window. +.PP +.I Emacs +can be started with the following X switches: +.TP 8 +.BI \-name " name" +Specifies the name which should be assigned to the initial +.I Emacs +window. This controls looking up X resources as well as the window title. +.TP 8 +.BI \-title " name" +Specifies the title for the initial X window. +.TP 8 +.B \-r +Display the +.I Emacs +window in reverse video. +.TP +.B \-i +Use the "kitchen sink" bitmap icon when iconifying the +.I Emacs +window. +.TP +.BI \-font " font, " \-fn " font" +Set the +.I Emacs +window's font to that specified by +.I font. +You will find the various +.I X +fonts in the +.I /usr/lib/X11/fonts +directory. +Note that +.I Emacs +will only accept fixed width fonts. +Under the X11 Release 4 font-naming conventions, any font with the +value "m" or "c" in the eleventh field of the font name is a fixed +width font. Furthermore, fonts whose name are of the form +.IR width x height +are generally fixed width, as is the font +.IR fixed . +See +.IR xlsfonts (1) +for more information. + +When you specify a font, be sure to put a space between the +switch and the font name. +.TP +.BI \-bw " pixels" +Set the +.I Emacs +window's border width to the number of pixels specified by +.I pixels. +Defaults to one pixel on each side of the window. +.TP +.BI \-ib " pixels" +Set the window's internal border width to the number of pixels specified +by +.I pixels. +Defaults to one pixel of padding on each side of the window. +.PP +.TP 8 +.BI \-geometry " geometry" +Set the +.I Emacs +window's width, height, and position as specified. The geometry +specification is in the standard X format; see +.IR X (1) +for more information. +The width and height are specified in characters; the default is 80 by +24. +.PP +.TP 8 +.BI \-fg " color" +On color displays, sets the color of the text. + +See the file +.I /usr/lib/X11/rgb.txt +for a list of valid +color names. +.TP +.BI \-bg " color" +On color displays, +sets the color of the window's background. +.TP +.BI \-bd " color" +On color displays, +sets the color of the window's border. +.TP +.BI \-cr " color" +On color displays, +sets the color of the window's text cursor. +.TP +.BI \-ms " color" +On color displays, +sets the color of the window's mouse cursor. +.TP +.BI \-d " displayname, " \-display " displayname" +Create the +.I Emacs +window on the display specified by +.IR displayname . +Must be the first option specified in the command line. +.TP +.B \-nw +Tells +.I Emacs +not to use its special interface to X. If you use this +switch when invoking +.I Emacs +from an +.IR xterm (1) +window, display is done in that window. +This must be the first option specified in the command line. +.PP +You can set +.I X +default values for your +.I Emacs +windows in your +.I \.Xresources +file (see +.IR xrdb (1)). +Use the following format: +.IP +emacs.keyword:value +.PP +where +.I value +specifies the default value of +.I keyword. +.I Emacs +lets you set default values for the following keywords: +.TP 8 +.B font (\fPclass\fB Font) +Sets the window's text font. +.TP +.B reverseVideo (\fPclass\fB ReverseVideo) +If +.I reverseVideo's +value is set to +.I on, +the window will be displayed in reverse video. +.TP +.B bitmapIcon (\fPclass\fB BitmapIcon) +If +.I bitmapIcon's +value is set to +.I on, +the window will iconify into the "kitchen sink." +.TP +.B borderWidth (\fPclass\fB BorderWidth) +Sets the window's border width in pixels. +.TP +.B internalBorder (\fPclass\fB BorderWidth) +Sets the window's internal border width in pixels. +.TP +.B foreground (\fPclass\fB Foreground) +For color displays, +sets the window's text color. +.TP +.B background (\fPclass\fB Background) +For color displays, +sets the window's background color. +.TP +.B borderColor (\fPclass\fB BorderColor) +For color displays, +sets the color of the window's border. +.TP +.B cursorColor (\fPclass\fB Foreground) +For color displays, +sets the color of the window's text cursor. +.TP +.B pointerColor (\fPclass\fB Foreground) +For color displays, +sets the color of the window's mouse cursor. +.TP +.B geometry (\fPclass\fB Geometry) +Sets the geometry of the +.I Emacs +window (as described above). +.TP +.B title (\fPclass\fB Title) +Sets the title of the +.I Emacs +window. +.TP +.B iconName (\fPclass\fB Title) +Sets the icon name for the +.I Emacs +window icon. +.PP +If you try to set color values while using a black and white display, +the window's characteristics will default as follows: +the foreground color will be set to black, +the background color will be set to white, +the border color will be set to grey, +and the text and mouse cursors will be set to black. +.PP +.SM Using the Mouse +.PP +The following lists the mouse button bindings for the +.I Emacs +window under X11. + +.in +\w'CTRL-SHIFT-middle'u+4n +.ta \w'CTRL-SHIFT-middle'u+4n +.ti -\w'CTRL-SHIFT-middle'u+4n +MOUSE BUTTON FUNCTION +.br +.ti -\w'CTRL-SHIFT-middle'u+4n +left Set point. +.br +.ti -\w'CTRL-SHIFT-middle'u+4n +middle Paste text. +.br +.ti -\w'CTRL-SHIFT-middle'u+4n +right Cut text into X cut buffer. +.br +.ti -\w'CTRL-SHIFT-middle'u+4n +SHIFT-middle Cut text into X cut buffer. +.br +.ti -\w'CTRL-SHIFT-middle'u+4n +SHIFT-right Paste text. +.br +.ti -\w'CTRL-SHIFT-middle'u+4n +CTRL-middle Cut text into X cut buffer and kill it. +.br +.ti -\w'CTRL-SHIFT-middle'u+4n +CTRL-right Select this window, then split it into +two windows. Same as typing CTRL-x 2. +.\" START DELETING HERE IF YOU'RE NOT USING X MENUS +.br +.ti -\w'CTRL-SHIFT-middle'u+4n +CTRL-SHIFT-left X buffer menu--hold the buttons and keys +down, wait for menu to appear, select +buffer, and release. Move mouse out of +menu and release to cancel. +.br +.ti -\w'CTRL-SHIFT-middle'u+4n +CTRL-SHIFT-middle X help menu--pop up index card menu for +Emacs help. +.\" STOP DELETING HERE IF YOU'RE NOT USING X MENUS +.br +.ti -\w'CTRL-SHIFT-middle'u+4n +CTRL-SHIFT-right Select window with mouse, and delete all +other windows. Same as typing CTRL-x 1. +.\" STOP DELETING HERE IF YOU'RE NOT USING X +.PP +.SH MANUALS +You can order printed copies of the GNU Emacs Manual from the Free +Software Foundation, which develops GNU software. See the file ORDERS +for ordering information. +.br +Your local Emacs maintainer might also have copies available. As +with all software and publications from FSF, everyone is permitted to +make and distribute copies of the Emacs manual. The TeX source to the +manual is also included in the Emacs source distribution. +.PP +.SH FILES +/usr/local/info - files for the Info documentation browser +(a subsystem of Emacs) to refer to. Currently not much of Unix +is documented here, but the complete text of the Emacs reference +manual is included in a convenient tree structured form. + +/usr/local/share/emacs/$VERSION/src - C source files and object files + +/usr/local/share/emacs/$VERSION/lisp - Lisp source files and compiled files +that define most editing commands. Some are preloaded; +others are autoloaded from this directory when used. + +/usr/local/share/emacs/$VERSION/etc - various programs that are used with +GNU Emacs, and some files of information. + +/usr/local/share/emacs/$VERSION/etc/DOC.* - contains the documentation +strings for the Lisp primitives and preloaded Lisp functions +of GNU Emacs. They are stored here to reduce the size of +Emacs proper. + +/usr/local/share/emacs/$VERSION/etc/OTHER.EMACSES discusses GNU Emacs +vs. other versions of Emacs. +.br +/usr/local/share/emacs/$VERSION/etc/SERVICE lists people offering +various services to assist users of GNU Emacs, including education, +troubleshooting, porting and customization. +.br +These files also have information useful to anyone wishing to write +programs in the Emacs Lisp extension language, which has not yet been fully +documented. + +/usr/local/com/emacs/lock - holds lock files that are made for all +files being modified in Emacs, to prevent simultaneous modification +of one file by two users. + +.\" START DELETING HERE IF YOU'RE NOT USING X +/usr/lib/X11/rgb.txt - list of valid X color names. +.\" STOP DELETING HERE IF YOU'RE NOT USING X +.PP +.SH BUGS +There is a mailing list, bug-gnu-emacs@prep.ai.mit.edu on the internet +(ucbvax!prep.ai.mit.edu!bug-gnu-emacs on UUCPnet), for reporting Emacs +bugs and fixes. But before reporting something as a bug, please try +to be sure that it really is a bug, not a misunderstanding or a +deliberate feature. We ask you to read the section ``Reporting Emacs +Bugs'' near the end of the reference manual (or Info system) for hints +on how and when to report bugs. Also, include the version number of +the Emacs you are running in \fIevery\fR bug report that you send in. + +Do not expect a personal answer to a bug report. The purpose of reporting +bugs is to get them fixed for everyone in the next release, if possible. +For personal assistance, look in the SERVICE file (see above) for +a list of people who offer it. + +Please do not send anything but bug reports to this mailing list. +Send requests to be added to mailing lists to the special list +info-gnu-emacs-request@prep.ai.mit.edu (or the corresponding UUCP +address). For more information about Emacs mailing lists, see the +file /usr/local/emacs/etc/MAILINGLISTS. Bugs tend actually to be +fixed if they can be isolated, so it is in your interest to report +them in such a way that they can be easily reproduced. +.PP +Bugs that I know about are: shell will not work with programs +running in Raw mode on some Unix versions. +.SH UNRESTRICTIONS +.PP +.I Emacs +is free; anyone may redistribute copies of +.I Emacs +to +anyone under the terms stated in the +.I Emacs +General Public License, +a copy of which accompanies each copy of +.I Emacs +and which also +appears in the reference manual. +.PP +Copies of +.I Emacs +may sometimes be received packaged with distributions of Unix systems, +but it is never included in the scope of any license covering those +systems. Such inclusion violates the terms on which distribution +is permitted. In fact, the primary purpose of the General Public +License is to prohibit anyone from attaching any other restrictions +to redistribution of +.I Emacs. +.PP +Richard Stallman encourages you to improve and extend +.I Emacs, +and urges that +you contribute your extensions to the GNU library. Eventually GNU +(Gnu's Not Unix) will be a complete replacement for Berkeley +Unix. +Everyone will be free to use, copy, study and change the GNU system. +.SH SEE ALSO +X(1), xlsfonts(1), xterm(1), xrdb(1) +.SH AUTHORS +.PP +.I Emacs +was written by Richard Stallman and the Free Software Foundation. +Joachim Martillo and Robert Krawitz added the X features. +.SH COPYING +Copyright +.if t \(co +.if n (c) +1995, 1999, 2000, 2001 Free Software Foundation, Inc. +.PP +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 +or any later version published by the Free Software Foundation; +with no Invariant Sections, with no Front-Cover Texts, and no +Back-Cover Texts. +.PP +This document is part of a collection distributed under the GNU Free +Documentation License. If you want to distribute this document +separately from the collection, you can do so by adding a copy of the +license to the document, as described in section 6 of the license. +A copy of the license is included in the +.BR gfdl ( 1 ) +man page, and in the section entitled "GNU Free Documentation +License" in the Emacs manual. diff --git a/raw/man1/enable.1 b/raw/man1/enable.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/enable.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/env.1 b/raw/man1/env.1 new file mode 100644 index 00000000..f493909a --- /dev/null +++ b/raw/man1/env.1 @@ -0,0 +1,46 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH ENV "1" "October 2003" "env (coreutils) 5.0" FSF +.SH NAME +env \- run a program in a modified environment +.SH SYNOPSIS +.B env +[\fIOPTION\fR]... [\fI-\fR] [\fINAME=VALUE\fR]... [\fICOMMAND \fR[\fIARG\fR]...] +.SH DESCRIPTION +.\" Add any additional description here +.PP +Set each NAME to VALUE in the environment and run COMMAND. +.TP +\fB\-i\fR, \fB\-\-ignore\-environment\fR +start with an empty environment +.TP +\fB\-u\fR, \fB\-\-unset\fR=\fINAME\fR +remove variable from the environment +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +A mere - implies \fB\-i\fR. If no COMMAND, print the resulting environment. +.SH AUTHOR +Written by Richard Mlynarik and David MacKenzie. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B env +is maintained as a Texinfo manual. If the +.B info +and +.B env +programs are properly installed at your site, the command +.IP +.B info env +.PP +should give you access to the complete manual. diff --git a/raw/man1/eval.1 b/raw/man1/eval.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/eval.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/ex.1 b/raw/man1/ex.1 new file mode 100644 index 00000000..b6f1d24a --- /dev/null +++ b/raw/man1/ex.1 @@ -0,0 +1,493 @@ +.TH VIM 1 "2002 Feb 22" +.SH NAME +vim \- Vi IMproved, a programmers text editor +.SH SYNOPSIS +.br +.B vim +[options] [file ..] +.br +.B vim +[options] - +.br +.B vim +[options] \-t tag +.br +.B vim +[options] \-q [errorfile] +.PP +.br +.B ex +.br +.B view +.br +.B gvim +.B gview +.br +.B rvim +.B rview +.B rgvim +.B rgview +.SH DESCRIPTION +.B Vim +is a text editor that is upwards compatible to Vi. +It can be used to edit all kinds of plain text. +It is especially useful for editing programs. +.PP +There are a lot of enhancements above Vi: multi level undo, +multi windows and buffers, syntax highlighting, command line +editing, filename completion, on-line help, visual selection, etc.. +See ":help vi_diff.txt" for a summary of the differences between +.B Vim +and Vi. +.PP +While running +.B Vim +a lot of help can be obtained from the on-line help system, with the ":help" +command. +See the ON-LINE HELP section below. +.PP +Most often +.B Vim +is started to edit a single file with the command +.PP + vim file +.PP +More generally +.B Vim +is started with: +.PP + vim [options] [filelist] +.PP +If the filelist is missing, the editor will start with an empty buffer. +Otherwise exactly one out of the following four may be used to choose one or +more files to be edited. +.TP 12 +file .. +A list of filenames. +The first one will be the current file and read into the buffer. +The cursor will be positioned on the first line of the buffer. +You can get to the other files with the ":next" command. +To edit a file that starts with a dash, precede the filelist with "--". +.TP +- +The file to edit is read from stdin. Commands are read from stderr, which +should be a tty. +.TP +-t {tag} +The file to edit and the initial cursor position depends on a "tag", a sort +of goto label. +{tag} is looked up in the tags file, the associated file becomes the current +file and the associated command is executed. +Mostly this is used for C programs, in which case {tag} could be a function +name. +The effect is that the file containing that function becomes the current file +and the cursor is positioned on the start of the function. +See ":help tag-commands". +.TP +-q [errorfile] +Start in quickFix mode. +The file [errorfile] is read and the first error is displayed. +If [errorfile] is omitted, the filename is obtained from the 'errorfile' +option (defaults to "AztecC.Err" for the Amiga, "errors.err" on other +systems). +Further errors can be jumped to with the ":cn" command. +See ":help quickfix". +.PP +.B Vim +behaves differently, depending on the name of the command (the executable may +still be the same file). +.TP 10 +vim +The "normal" way, everything is default. +.TP +ex +Start in Ex mode. +Go to Normal mode with the ":vi" command. +Can also be done with the "-e" argument. +.TP +view +Start in read-only mode. You will be protected from writing the files. Can +also be done with the "-R" argument. +.TP +gvim gview +The GUI version. +Starts a new window. +Can also be done with the "-g" argument. +.TP +rvim rview rgvim rgview +Like the above, but with restrictions. It will not be possible to start shell +commands, or suspend +.B Vim. +Can also be done with the "-Z" argument. +.SH OPTIONS +The options may be given in any order, before or after filenames. +Options without an argument can be combined after a single dash. +.TP 12 ++[num] +For the first file the cursor will be positioned on line "num". +If "num" is missing, the cursor will be positioned on the last line. +.TP ++/{pat} +For the first file the cursor will be positioned on the +first occurrence of {pat}. +See ":help search-pattern" for the available search patterns. +.TP ++{command} +.TP +-c {command} +{command} will be executed after the +first file has been read. +{command} is interpreted as an Ex command. +If the {command} contains spaces it must be enclosed in double quotes (this +depends on the shell that is used). +Example: Vim "+set si" main.c +.br +Note: You can use up to 10 "+" or "-c" commands. +.TP +--cmd {command} +Like using "-c", but the command is executed just before +processing any vimrc file. +You can use up to 10 of these commands, independently from "-c" commands. +.TP +-A +If +.B Vim +has been compiled with ARABIC support for editing right-to-left +oriented files and Arabic keyboard mapping, this option starts +.B Vim +in Arabic mode, i.e. 'arabic' is set. Otherwise an error +message is given and +.B Vim +aborts. +.TP +-b +Binary mode. +A few options will be set that makes it possible to edit a binary or +executable file. +.TP +-C +Compatible. Set the 'compatible' option. +This will make +.B Vim +behave mostly like Vi, even though a .vimrc file exists. +.TP +-d +Start in diff mode. +There should be two or three file name arguments. +.B Vim +will open all the files and show differences between them. +Works like vimdiff(1). +.TP +-d {device} +Open {device} for use as a terminal. +Only on the Amiga. +Example: +"\-d con:20/30/600/150". +.TP +-e +Start +.B Vim +in Ex mode, just like the executable was called "ex". +.TP +-f +Foreground. For the GUI version, +.B Vim +will not fork and detach from the shell it was started in. +On the Amiga, +.B Vim +is not restarted to open a new window. +This option should be used when +.B Vim +is executed by a program that will wait for the edit +session to finish (e.g. mail). +On the Amiga the ":sh" and ":!" commands will not work. +.TP +--nofork +Foreground. For the GUI version, +.B Vim +will not fork and detach from the shell it was started in. +.TP +-F +If +.B Vim +has been compiled with FKMAP support for editing right-to-left +oriented files and Farsi keyboard mapping, this option starts +.B Vim +in Farsi mode, i.e. 'fkmap' and 'rightleft' are set. +Otherwise an error message is given and +.B Vim +aborts. +.TP +-g +If +.B Vim +has been compiled with GUI support, this option enables the GUI. +If no GUI support was compiled in, an error message is given and +.B Vim +aborts. +.TP +-h +Give a bit of help about the command line arguments and options. +After this +.B Vim +exits. +.TP +-H +If +.B Vim +has been compiled with RIGHTLEFT support for editing right-to-left +oriented files and Hebrew keyboard mapping, this option starts +.B Vim +in Hebrew mode, i.e. 'hkmap' and 'rightleft' are set. +Otherwise an error message is given and +.B Vim +aborts. +.TP +-i {viminfo} +When using the viminfo file is enabled, this option sets the filename to use, +instead of the default "~/.viminfo". +This can also be used to skip the use of the .viminfo file, by giving the name +"NONE". +.TP +-L +Same as -r. +.TP +-l +Lisp mode. +Sets the 'lisp' and 'showmatch' options on. +.TP +-m +Modifying files is disabled. +Resets the 'write' option, so that writing files is not possible. +.TP +-N +No-compatible mode. Reset the 'compatible' option. +This will make +.B Vim +behave a bit better, but less Vi compatible, even though a .vimrc file does +not exist. +.TP +-n +No swap file will be used. +Recovery after a crash will be impossible. +Handy if you want to edit a file on a very slow medium (e.g. floppy). +Can also be done with ":set uc=0". +Can be undone with ":set uc=200". +.TP +-o[N] +Open N windows stacked. +When N is omitted, open one window for each file. +.TP +-O[N] +Open N windows side by side. +When N is omitted, open one window for each file. +.TP +-R +Read-only mode. +The 'readonly' option will be set. +You can still edit the buffer, but will be prevented from accidently +overwriting a file. +If you do want to overwrite a file, add an exclamation mark to the Ex command, +as in ":w!". +The -R option also implies the -n option (see below). +The 'readonly' option can be reset with ":set noro". +See ":help 'readonly'". +.TP +-r +List swap files, with information about using them for recovery. +.TP +-r {file} +Recovery mode. +The swap file is used to recover a crashed editing session. +The swap file is a file with the same filename as the text file with ".swp" +appended. +See ":help recovery". +.TP +-s +Silent mode. Only when started as "Ex" or when the "-e" option was given +before the "-s" option. +.TP +-s {scriptin} +The script file {scriptin} is read. +The characters in the file are interpreted as if you had typed them. +The same can be done with the command ":source! {scriptin}". +If the end of the file is reached before the editor exits, further characters +are read from the keyboard. +.TP +-T {terminal} +Tells +.B Vim +the name of the terminal you are using. +Only required when the automatic way doesn't work. +Should be a terminal known +to +.B Vim +(builtin) or defined in the termcap or terminfo file. +.TP +-u {vimrc} +Use the commands in the file {vimrc} for initializations. +All the other initializations are skipped. +Use this to edit a special kind of files. +It can also be used to skip all initializations by giving the name "NONE". +See ":help initialization" within vim for more details. +.TP +-U {gvimrc} +Use the commands in the file {gvimrc} for GUI initializations. +All the other GUI initializations are skipped. +It can also be used to skip all GUI initializations by giving the name "NONE". +See ":help gui-init" within vim for more details. +.TP +-V +Verbose. Give messages about which files are sourced and for reading and +writing a viminfo file. +.TP +-v +Start +.B Vim +in Vi mode, just like the executable was called "vi". This only has effect +when the executable is called "ex". +.TP +-w {scriptout} +All the characters that you type are recorded in the file +{scriptout}, until you exit +.B Vim. +This is useful if you want to create a script file to be used with "vim -s" or +":source!". +If the {scriptout} file exists, characters are appended. +.TP +-W {scriptout} +Like -w, but an existing file is overwritten. +.TP +-x +Use encryption when writing files. Will prompt for a crypt key. +.TP +-X +Don't connect to the X server. Shortens startup time in a terminal, but the +window title and clipboard will not be used. +.TP +-Z +Restricted mode. Works like the executable starts with "r". +.TP +-- +Denotes the end of the options. +Arguments after this will be handled as a file name. +This can be used to edit a filename that starts with a '-'. +.TP +--help +Give a help message and exit, just like "-h". +.TP +--version +Print version information and exit. +.TP +--remote +Connect to a Vim server and make it edit the files given in the rest of the +arguments. If no server is found a warning is given and the files are edited +in the current Vim. +.TP +--remote-expr {expr} +Connect to a Vim server, evaluate {expr} in it and print the result on stdout. +.TP +--remote-send {keys} +Connect to a Vim server and send {keys} to it. +.TP +--remote-silent +As --remote, but without the warning when no server is found. +.TP +--remote-wait +As --remote, but Vim does not exit until the files have been edited. +.TP +--remote-wait-silent +As --remote-wait, but without the warning when no server is found. +.TP +--serverlist +List the names of all Vim servers that can be found. +.TP +--servername {name} +Use {name} as the server name. Used for the current Vim, unless used with a +--remote argument, then it's the name of the server to connect to. +.TP +--socketid {id} +GTK GUI only: Use the GtkPlug mechanism to run gvim in another window. +.TP +--echo-wid +GTK GUI only: Echo the Window ID on stdout +.SH ON-LINE HELP +Type ":help" in +.B Vim +to get started. +Type ":help subject" to get help on a specific subject. +For example: ":help ZZ" to get help for the "ZZ" command. +Use and CTRL-D to complete subjects (":help cmdline-completion"). +Tags are present to jump from one place to another (sort of hypertext links, +see ":help"). +All documentation files can be viewed in this way, for example +":help syntax.txt". +.SH FILES +.TP 15 +/usr/share/vim/vim62/doc/*.txt +The +.B Vim +documentation files. +Use ":help doc-file-list" to get the complete list. +.TP +/usr/share/vim/vim62/doc/tags +The tags file used for finding information in the documentation files. +.TP +/usr/share/vim/vim62/syntax/syntax.vim +System wide syntax initializations. +.TP +/usr/share/vim/vim62/syntax/*.vim +Syntax files for various languages. +.TP +/usr/share/vim/vimrc +System wide +.B Vim +initializations. +.TP +/usr/share/vim/gvimrc +System wide gvim initializations. +.TP +/usr/share/vim/vim62/optwin.vim +Script used for the ":options" command, a nice way to view and set options. +.TP +/usr/share/vim/vim62/menu.vim +System wide menu initializations for gvim. +.TP +/usr/share/vim/vim62/bugreport.vim +Script to generate a bug report. See ":help bugs". +.TP +/usr/share/vim/vim62/filetype.vim +Script to detect the type of a file by its name. See ":help 'filetype'". +.TP +/usr/share/vim/vim62/scripts.vim +Script to detect the type of a file by its contents. See ":help 'filetype'". +.TP +/usr/share/vim/vim62/*.ps +Files used for PostScript printing. +.PP +For recent info read the VIM home page: +.br + +.SH SEE ALSO +vimtutor(1) +.SH AUTHOR +Most of +.B Vim +was made by Bram Moolenaar, with a lot of help from others. +See ":help credits" in +.B Vim. +.br +.B Vim +is based on Stevie, worked on by: Tim Thompson, +Tony Andrews and G.R. (Fred) Walter. +Although hardly any of the original code remains. +.SH BUGS +Probably. +See ":help todo" for a list of known problems. +.PP +Note that a number of things that may be regarded as bugs by some, are in fact +caused by a too-faithful reproduction of Vi's behaviour. +And if you think other things are bugs "because Vi does it differently", +you should take a closer look at the vi_diff.txt file (or type :help +vi_diff.txt when in Vim). +Also have a look at the 'compatible' and 'cpoptions' options. diff --git a/raw/man1/exec.1 b/raw/man1/exec.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/exec.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/exit.1 b/raw/man1/exit.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/exit.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/expand.1 b/raw/man1/expand.1 new file mode 100644 index 00000000..d884a27b --- /dev/null +++ b/raw/man1/expand.1 @@ -0,0 +1,50 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH EXPAND "1" "October 2003" "expand (coreutils) 5.0" FSF +.SH NAME +expand \- convert tabs to spaces +.SH SYNOPSIS +.B expand +[\fIOPTION\fR]... [\fIFILE\fR]... +.SH DESCRIPTION +.\" Add any additional description here +.PP +Convert tabs in each FILE to spaces, writing to standard output. +With no FILE, or when FILE is -, read standard input. +.PP +Mandatory arguments to long options are mandatory for short options too. +.TP +\fB\-i\fR, \fB\-\-initial\fR +do not convert TABs after non whitespace +.TP +\fB\-t\fR, \fB\-\-tabs\fR=\fINUMBER\fR +have tabs NUMBER characters apart, not 8 +.TP +\fB\-t\fR, \fB\-\-tabs\fR=\fILIST\fR +use comma separated list of explicit tab positions +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.SH AUTHOR +Written by David MacKenzie. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B expand +is maintained as a Texinfo manual. If the +.B info +and +.B expand +programs are properly installed at your site, the command +.IP +.B info expand +.PP +should give you access to the complete manual. diff --git a/raw/man1/export.1 b/raw/man1/export.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/export.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/false.1 b/raw/man1/false.1 new file mode 100644 index 00000000..50dac376 --- /dev/null +++ b/raw/man1/false.1 @@ -0,0 +1,43 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH FALSE "1" "October 2003" "GNU coreutils 5.0" FSF +.SH NAME +false \- do nothing, unsuccessfully +.SH SYNOPSIS +.B false +[\fIignored command line arguments\fR] +.br +.B false +\fIOPTION\fR +.SH DESCRIPTION +.\" Add any additional description here +.PP +Exit with a status code indicating failure. +.PP +These option names may not be abbreviated. +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.SH AUTHOR +Written by Jim Meyering. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B false +is maintained as a Texinfo manual. If the +.B info +and +.B false +programs are properly installed at your site, the command +.IP +.B info false +.PP +should give you access to the complete manual. diff --git a/raw/man1/fc.1 b/raw/man1/fc.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/fc.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/fg.1 b/raw/man1/fg.1 new file mode 100644 index 00000000..b757cd31 --- /dev/null +++ b/raw/man1/fg.1 @@ -0,0 +1 @@ +.so man1/builtins.1 diff --git a/raw/man1/fgrep.1 b/raw/man1/fgrep.1 new file mode 100644 index 00000000..6a74c5d1 --- /dev/null +++ b/raw/man1/fgrep.1 @@ -0,0 +1 @@ +.so man1/grep.1 diff --git a/raw/man1/file.1 b/raw/man1/file.1 new file mode 100644 index 00000000..d6604b0a --- /dev/null +++ b/raw/man1/file.1 @@ -0,0 +1,473 @@ +.TH FILE 1 "Copyright but distributable" +.SH NAME +file +\- determine file type +.SH SYNOPSIS +.B file +[ +.B \-bcikLnNsvz +] +[ +.B \-f +.I namefile +] +[ +.B \-F +.I separator +] +[ +.B \-m +.I magicfiles +] +.I file +\&... +.br +.B file +.B -C +[ +.B \-m +magicfile ] +.SH DESCRIPTION +This manual page documents version 4.02 of the +.B file +command. +.PP +.B File +tests each argument in an attempt to classify it. +There are three sets of tests, performed in this order: +filesystem tests, magic number tests, and language tests. +The +.I first +test that succeeds causes the file type to be printed. +.PP +The type printed will usually contain one of the words +.B text +(the file contains only +printing characters and a few common control +characters and is probably safe to read on an +.SM ASCII +terminal), +.B executable +(the file contains the result of compiling a program +in a form understandable to some \s-1UNIX\s0 kernel or another), +or +.B data +meaning anything else (data is usually `binary' or non-printable). +Exceptions are well-known file formats (core files, tar archives) +that are known to contain binary data. +When modifying the file +.I /usr/share/file/magic +or the program itself, +.B "preserve these keywords" . +People depend on knowing that all the readable files in a directory +have the word ``text'' printed. +Don't do as Berkeley did and change ``shell commands text'' +to ``shell script''. +Note that the file +.I /usr/share/file/magic +is built mechanically from a large number of small files in +the subdirectory +.I Magdir +in the source distribution of this program. +.PP +The filesystem tests are based on examining the return from a +.BR stat (2) +system call. +The program checks to see if the file is empty, +or if it's some sort of special file. +Any known file types appropriate to the system you are running on +(sockets, symbolic links, or named pipes (FIFOs) on those systems that +implement them) +are intuited if they are defined in +the system header file +.IR . +.PP +The magic number tests are used to check for files with data in +particular fixed formats. +The canonical example of this is a binary executable (compiled program) +.I a.out +file, whose format is defined in +.I a.out.h +and possibly +.I exec.h +in the standard include directory. +These files have a `magic number' stored in a particular place +near the beginning of the file that tells the \s-1UNIX\s0 operating system +that the file is a binary executable, and which of several types thereof. +The concept of `magic number' has been applied by extension to data files. +Any file with some invariant identifier at a small fixed +offset into the file can usually be described in this way. +The information identifying these files is read from the compiled +magic file +.I /usr/share/file/magic.mgc , +or +.I /usr/share/file/magic +if the compile file does not exist. +.PP +If a file does not match any of the entries in the magic file, +it is examined to see if it seems to be a text file. +ASCII, ISO-8859-x, non-ISO 8-bit extended-ASCII character sets +(such as those used on Macintosh and IBM PC systems), +UTF-8-encoded Unicode, UTF-16-encoded Unicode, and EBCDIC +character sets can be distinguished by the different +ranges and sequences of bytes that constitute printable text +in each set. +If a file passes any of these tests, its character set is reported. +ASCII, ISO-8859-x, UTF-8, and extended-ASCII files are identified +as ``text'' because they will be mostly readable on nearly any terminal; +UTF-16 and EBCDIC are only ``character data'' because, while +they contain text, it is text that will require translation +before it can be read. +In addition, +.B file +will attempt to determine other characteristics of text-type files. +If the lines of a file are terminated by CR, CRLF, or NEL, instead +of the Unix-standard LF, this will be reported. +Files that contain embedded escape sequences or overstriking +will also be identified. +.PP +Once +.B file +has determined the character set used in a text-type file, +it will +attempt to determine in what language the file is written. +The language tests look for particular strings (cf +.IR names.h ) +that can appear anywhere in the first few blocks of a file. +For example, the keyword +.B .br +indicates that the file is most likely a +.BR troff (1) +input file, just as the keyword +.B struct +indicates a C program. +These tests are less reliable than the previous +two groups, so they are performed last. +The language test routines also test for some miscellany +(such as +.BR tar (1) +archives). +.PP +Any file that cannot be identified as having been written +in any of the character sets listed above is simply said to be ``data''. +.SH OPTIONS +.TP 8 +.B \-b +Do not prepend filenames to output lines (brief mode). +.TP 8 +.B \-c +Cause a checking printout of the parsed form of the magic file. +This is usually used in conjunction with +.B \-m +to debug a new magic file before installing it. +.TP 8 +.B \-C +Write a magic.mgc output file that contains a pre-parsed version of +file. +.TP 8 +.BI \-f " namefile" +Read the names of the files to be examined from +.I namefile +(one per line) +before the argument list. +Either +.I namefile +or at least one filename argument must be present; +to test the standard input, use ``\-'' as a filename argument. +.TP 8 +.BI \-F " separator" +Use the specified string as the separator between the filename and the +file result returned. Defaults to ``:''. +.TP 8 +.B \-i +Causes the file command to output mime type strings rather than the more +traditional human readable ones. Thus it may say +``text/plain; charset=us-ascii'' +rather +than ``ASCII text''. +In order for this option to work, file changes the way +it handles files recognised by the command itself (such as many of the +text file types, directories etc), and makes use of an alternative +``magic'' file. +(See ``FILES'' section, below). +.TP 8 +.B \-k +Don't stop at the first match, keep going. +.TP 8 +.B \-L +option causes symlinks to be followed, as the like-named option in +.BR ls (1). +(on systems that support symbolic links). +.TP 8 +.BI \-m " list" +Specify an alternate list of files containing magic numbers. +This can be a single file, or a colon-separated list of files. +.TP 8 +.B \-n +Force stdout to be flushed after checking each file. +This is only useful if checking a list of files. +It is intended to be used by programs that want filetype output from a pipe. +.TP 8 +.B \-N +Don't pad filenames so that they align in the output. +.TP 8 +.B \-s +Normally, +.B file +only attempts to read and determine the type of argument files which +.BR stat (2) +reports are ordinary files. +This prevents problems, because reading special files may have peculiar +consequences. +Specifying the +.BR \-s +option causes +.B file +to also read argument files which are block or character special files. +This is useful for determining the filesystem types of the data in raw +disk partitions, which are block special files. +This option also causes +.B file +to disregard the file size as reported by +.BR stat (2) +since on some systems it reports a zero size for raw disk partitions. +.TP 8 +.B \-v +Print the version of the program and exit. +.TP 8 +.B \-z +Try to look inside compressed files. +.SH FILES +.I /usr/share/file/magic.mgc +\- default compiled list of magic numbers +.PP +.I /usr/share/file/magic +\- default list of magic numbers +.PP +.I /usr/share/file/magic.mime.mgc +\- default compiled list of magic numbers, used to output mime types when +the -i option is specified. +.PP +.I /usr/share/file/magic.mime +\- default list of magic numbers, used to output mime types when the -i option +is specified. + +.SH ENVIRONMENT +The environment variable +.B MAGIC +can be used to set the default magic number files. +.SH SEE ALSO +.BR magic (5) +\- description of magic file format. +.br +.BR strings (1), " od" (1), " hexdump(1)" +\- tools for examining non-textfiles. +.SH STANDARDS CONFORMANCE +This program is believed to exceed the System V Interface Definition +of FILE(CMD), as near as one can determine from the vague language +contained therein. +Its behaviour is mostly compatible with the System V program of the same name. +This version knows more magic, however, so it will produce +different (albeit more accurate) output in many cases. +.PP +The one significant difference +between this version and System V +is that this version treats any white space +as a delimiter, so that spaces in pattern strings must be escaped. +For example, +.br +>10 string language impress\ (imPRESS data) +.br +in an existing magic file would have to be changed to +.br +>10 string language\e impress (imPRESS data) +.br +In addition, in this version, if a pattern string contains a backslash, +it must be escaped. +For example +.br +0 string \ebegindata Andrew Toolkit document +.br +in an existing magic file would have to be changed to +.br +0 string \e\ebegindata Andrew Toolkit document +.br +.PP +SunOS releases 3.2 and later from Sun Microsystems include a +.BR file (1) +command derived from the System V one, but with some extensions. +My version differs from Sun's only in minor ways. +It includes the extension of the `&' operator, used as, +for example, +.br +>16 long&0x7fffffff >0 not stripped +.SH MAGIC DIRECTORY +The magic file entries have been collected from various sources, +mainly USENET, and contributed by various authors. +Christos Zoulas (address below) will collect additional +or corrected magic file entries. +A consolidation of magic file entries +will be distributed periodically. +.PP +The order of entries in the magic file is significant. +Depending on what system you are using, the order that +they are put together may be incorrect. +If your old +.B file +command uses a magic file, +keep the old magic file around for comparison purposes +(rename it to +.IR /usr/share/file/magic.orig ). +.SH EXAMPLES +.nf +$ file file.c file /dev/{wd0a,hda} +file.c: C program text +file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), + dynamically linked (uses shared libs), stripped +/dev/wd0a: block special (0/0) +/dev/hda: block special (3/0) +$ file -s /dev/wd0{b,d} +/dev/wd0b: data +/dev/wd0d: x86 boot sector +$ file -s /dev/hda{,1,2,3,4,5,6,7,8,9,10} +/dev/hda: x86 boot sector +/dev/hda1: Linux/i386 ext2 filesystem +/dev/hda2: x86 boot sector +/dev/hda3: x86 boot sector, extended partition table +/dev/hda4: Linux/i386 ext2 filesystem +/dev/hda5: Linux/i386 swap file +/dev/hda6: Linux/i386 swap file +/dev/hda7: Linux/i386 swap file +/dev/hda8: Linux/i386 swap file +/dev/hda9: empty +/dev/hda10: empty + +$ file -i file.c file /dev/{wd0a,hda} +file.c: text/x-c +file: application/x-executable, dynamically linked (uses shared libs), +not stripped +/dev/hda: application/x-not-regular-file +/dev/wd0a: application/x-not-regular-file + +.fi +.SH HISTORY +There has been a +.B file +command in every \s-1UNIX\s0 since at least Research Version 4 +(man page dated November, 1973). +The System V version introduced one significant major change: +the external list of magic number types. +This slowed the program down slightly but made it a lot more flexible. +.PP +This program, based on the System V version, +was written by Ian Darwin +without looking at anybody else's source code. +.PP +John Gilmore revised the code extensively, making it better than +the first version. +Geoff Collyer found several inadequacies +and provided some magic file entries. +Contributions by the `&' operator by Rob McMahon, cudcv@warwick.ac.uk, 1989. +.PP +Guy Harris, guy@netapp.com, made many changes from 1993 to the present. +.PP +Primary development and maintenance from 1990 to the present by +Christos Zoulas (christos@astron.com). +.PP +Altered by Chris Lowth, chris@lowth.com, 2000: +Handle the ``-i'' option to output mime type strings and using an alternative +magic file and internal logic. +.PP +Altered by Eric Fischer (enf@pobox.com), July, 2000, +to identify character codes and attempt to identify the languages +of non-ASCII files. +.PP +The list of contributors to the "Magdir" directory (source for the +/etc/magic +file) is too long to include here. +You know who you are; thank you. +.SH LEGAL NOTICE +Copyright (c) Ian F. Darwin, Toronto, Canada, 1986-1999. +Covered by the standard Berkeley Software Distribution copyright; see the file +LEGAL.NOTICE in the source distribution. +.PP +The files +.I tar.h +and +.I is_tar.c +were written by John Gilmore from his public-domain +.B tar +program, and are not covered by the above license. +.SH BUGS +There must be a better way to automate the construction of the Magic +file from all the glop in magdir. +What is it? +Better yet, the magic file should be compiled into binary (say, +.BR ndbm (3) +or, better yet, fixed-length +.SM ASCII +strings for use in heterogenous network environments) for faster startup. +Then the program would run as fast as the Version 7 program of the same name, +with the flexibility of the System V version. +.PP +.B File +uses several algorithms that favor speed over accuracy, +thus it can be misled about the contents of +text +files. +.PP +The support for +text +files (primarily for programming languages) +is simplistic, inefficient and requires recompilation to update. +.PP +There should be an ``else'' clause to follow a series of continuation lines. +.PP +The magic file and keywords should have regular expression support. +Their use of +.SM "ASCII TAB" +as a field delimiter is ugly and makes +it hard to edit the files, but is entrenched. +.PP +It might be advisable to allow upper-case letters in keywords +for e.g., +.BR troff (1) +commands vs man page macros. +Regular expression support would make this easy. +.PP +The program doesn't grok \s-2FORTRAN\s0. +It should be able to figure \s-2FORTRAN\s0 by seeing some keywords which +appear indented at the start of line. +Regular expression support would make this easy. +.PP +The list of keywords in +.I ascmagic +probably belongs in the Magic file. +This could be done by using some keyword like `*' for the offset value. +.PP +Another optimisation would be to sort +the magic file so that we can just run down all the +tests for the first byte, first word, first long, etc, once we +have fetched it. +Complain about conflicts in the magic file entries. +Make a rule that the magic entries sort based on file offset rather +than position within the magic file? +.PP +The program should provide a way to give an estimate +of ``how good'' a guess is. +We end up removing guesses (e.g. ``From '' as first 5 chars of file) because +they are not as good as other guesses (e.g. ``Newsgroups:'' versus +``Return-Path:''). +Still, if the others don't pan out, it should be possible to use the +first guess. +.PP +This program is slower than some vendors' file commands. +The new support for multiple character codes makes it even slower. +.PP +This manual page, and particularly this section, is too long. +.SH AVAILABILITY +You can obtain the original author's latest version by anonymous FTP +on +.B ftp.astron.com +in the directory +.I /pub/file/file-X.YZ.tar.gz diff --git a/raw/man1/find.1 b/raw/man1/find.1 new file mode 100644 index 00000000..38c7a94f --- /dev/null +++ b/raw/man1/find.1 @@ -0,0 +1,459 @@ +.TH FIND 1L \" -*- nroff -*- +.SH NAME +find \- search for files in a directory hierarchy +.SH SYNOPSIS +.B find +[path...] [expression] +.SH DESCRIPTION +This manual page +documents the GNU version of +.BR find . +.B find +searches the directory tree rooted at each given file name by +evaluating the given expression from left to right, according to the +rules of precedence (see section OPERATORS), until the outcome is +known (the left hand side is false for \fIand\fR operations, true for +\fIor\fR), at which point +.B find +moves on to the next file name. +.PP +The first argument that begins with `\-', `(', `)', `,', or `!' is taken +to be the beginning of the expression; any arguments before it are +paths to search, and any arguments after it are the rest of the +expression. If no paths are given, the current directory is used. If +no expression is given, the expression `\-print' is used. +.PP +.B find +exits with status 0 if all files are processed successfully, greater +than 0 if errors occur. +.SH EXPRESSIONS +.P +The expression is made up of options (which affect overall operation +rather than the processing of a specific file, and always return true), +tests (which return a true or false value), and actions (which have side +effects and return a true or false value), all separated by operators. +\-and is assumed where the operator is omitted. If the expression contains +no actions other than \-prune, \-print is performed on all files +for which the expression is true. +.SS OPTIONS +.P +All options always return true. They always take effect, rather than +being processed only when their place in the expression is reached. +Therefore, for clarity, it is best to place them at the beginning of +the expression. +.IP \-daystart +Measure times (for \-amin, \-atime, \-cmin, \-ctime, \-mmin, and \-mtime) +from the beginning of today rather than from 24 hours ago. +.IP \-depth +Process each directory's contents before the directory itself. +.IP \-follow +Dereference symbolic links. Implies \-noleaf. +.IP "\-help, \-\-help" +Print a summary of the command-line usage of +.B find +and exit. +.IP "\-maxdepth \fIlevels\fR" +Descend at most \fIlevels\fR (a non-negative integer) levels of +directories below the command line arguments. `\-maxdepth 0' means +only apply the tests and actions to the command line arguments. +.IP "\-mindepth \fIlevels\fR" +Do not apply any tests or actions at levels less than \fIlevels\fR (a +non-negative integer). `\-mindepth 1' means process all files except +the command line arguments. +.IP \-mount +Don't descend directories on other filesystems. An alternate name for +\-xdev, for compatibility with some other versions of +.BR find . +.IP "\-noleaf" +Do not optimize by assuming that directories contain 2 fewer +subdirectories than their hard link count. This option is needed when +searching filesystems that do not follow the Unix directory-link +convention, such as CD-ROM or MS-DOS filesystems or AFS volume mount +points. Each directory on a normal Unix filesystem has at least 2 +hard links: its name and its `.' entry. Additionally, its +subdirectories (if any) each have a `..' entry linked to that +directory. When +.B find +is examining a directory, after it has statted 2 fewer subdirectories +than the directory's link count, it knows that the rest of the entries +in the directory are non-directories (`leaf' files in the directory +tree). If only the files' names need to be examined, there is no need +to stat them; this gives a significant increase in search speed. +.IP "\-version, \-\-version" +Print the \fBfind\fR version number and exit. +.IP \-xdev +Don't descend directories on other filesystems. +.SS TESTS +.P +Numeric arguments can be specified as +.IP \fI+n\fP +for greater than +.IR n , +.IP \fI\-n\fP +for less than +.IR n , +.IP \fIn\fP +for exactly +.IR n . +.IP "\-amin \fIn\fR" +File was last accessed \fIn\fR minutes ago. +.IP "\-anewer \fIfile\fR" +File was last accessed more recently than \fIfile\fR was modified. +\-anewer is affected by \-follow only if \-follow comes before +\-anewer on the command line. +.IP "\-atime \fIn\fR" +File was last accessed \fIn\fR*24 hours ago. +.IP "\-cmin \fIn\fR" +File's status was last changed \fIn\fR minutes ago. +.IP "\-cnewer \fIfile\fR" +File's status was last changed more recently than \fIfile\fR was modified. +\-cnewer is affected by \-follow only if \-follow comes before +\-cnewer on the command line. +.IP "\-ctime \fIn\fR" +File's status was last changed \fIn\fR*24 hours ago. +.IP \-empty +File is empty and is either a regular file or a directory. +.IP \-false +Always false. +.IP "\-fstype \fItype\fR" +File is on a filesystem of type \fItype\fR. The valid filesystem +types vary among different versions of Unix; an incomplete list of +filesystem types that are accepted on some version of Unix or another +is: ufs, 4.2, 4.3, nfs, tmp, mfs, S51K, S52K. You can use \-printf +with the %F directive to see the types of your filesystems. +.IP "\-gid \fIn\fR" +File's numeric group ID is \fIn\fR. +.IP "\-group \fIgname\fR" +File belongs to group \fIgname\fR (numeric group ID allowed). +.IP "\-ilname \fIpattern\fR" +Like \-lname, but the match is case insensitive. +.IP "\-iname \fIpattern\fR" +Like \-name, but the match is case insensitive. For example, the +patterns `fo*' and `F??' match the file names `Foo', `FOO', `foo', +`fOo', etc. +.IP "\-inum \fIn\fR" +File has inode number \fIn\fR. +.IP "\-ipath \fIpattern\fR" +Like \-path, but the match is case insensitive. +.IP "\-iregex \fIpattern\fR" +Like \-regex, but the match is case insensitive. +.IP "\-links \fIn\fR" +File has \fIn\fR links. +.IP "\-lname \fIpattern\fR" +File is a symbolic link whose contents match shell pattern +\fIpattern\fR. The metacharacters do not treat `/' or `.' specially. +.IP "\-mmin \fIn\fR" +File's data was last modified \fIn\fR minutes ago. +.IP "\-mtime \fIn\fR" +File's data was last modified \fIn\fR*24 hours ago. +.IP "\-name \fIpattern\fR" +Base of file name (the path with the leading directories removed) +matches shell pattern \fIpattern\fR. The metacharacters (`*', `?', +and `[]') do not match a `.' at the start of the base name. To ignore +a directory and the files under it, use \-prune; see an example in the +description of \-path. +.IP "\-newer \fIfile\fR" +File was modified more recently than \fIfile\fR. +\-newer is affected by \-follow only if \-follow comes before +\-newer on the command line. +.IP \-nouser +No user corresponds to file's numeric user ID. +.IP \-nogroup +No group corresponds to file's numeric group ID. +.IP "\-path \fIpattern\fR" +File name matches shell pattern \fIpattern\fR. The metacharacters do +not treat `/' or `.' specially; so, for example, +.br +.in +1i +find . \-path './sr*sc' +.br +.in -1i +will print an entry for a directory called './src/misc' (if one +exists). To ignore a whole directory tree, use \-prune rather than +checking every file in the tree. For example, to skip the +directory `src/emacs' and all files and directories under it, and +print the names of the other files found, do something like this: +.br +.in +1i +find . \-path './src/emacs' -prune -o -print +.br +.in -1i +.IP "\-perm \fImode\fR" +File's permission bits are exactly \fImode\fR (octal or symbolic). +Symbolic modes use mode 0 as a point of departure. +.IP "\-perm \-\fImode\fR" +All of the permission bits \fImode\fR are set for the file. +.IP "\-perm +\fImode\fR" +Any of the permission bits \fImode\fR are set for the file. +.IP "\-regex \fIpattern\fR" +File name matches regular expression \fIpattern\fR. This is a match +on the whole path, not a search. For example, to match a file named +`./fubar3', you can use the regular expression `.*bar.' or `.*b.*3', +but not `b.*r3'. +.IP "\-size \fIn\fR[bckw]" +File uses \fIn\fP units of space. The units are 512-byte blocks by +default or if `b' follows \fIn\fP, bytes if `c' follows \fIn\fP, +kilobytes if `k' follows \fIn\fP, or 2-byte words if `w' follows \fIn\fP. +The size does not count indirect blocks, but it does count blocks in +sparse files that are not actually allocated. +.IP \-true +Always true. +.IP "\-type \fIc\fR" +File is of type \fIc\fR: +.RS +.IP b +block (buffered) special +.IP c +character (unbuffered) special +.IP d +directory +.IP p +named pipe (FIFO) +.IP f +regular file +.IP l +symbolic link +.IP s +socket +.IP D +door (Solaris) +.RE +.IP "\-uid \fIn\fR" +File's numeric user ID is \fIn\fR. +.IP "\-used \fIn\fR" +File was last accessed \fIn\fR days after its status was last changed. +.IP "\-user \fIuname\fR" +File is owned by user \fIuname\fR (numeric user ID allowed). +.IP "\-xtype \fIc\fR" +The same as \-type unless the file is a symbolic link. For symbolic +links: if \-follow has not been given, true if the file is a link to a +file of type \fIc\fR; if \-follow has been given, true if \fIc\fR is +`l'. In other words, for symbolic links, \-xtype checks the type of +the file that \-type does not check. +.SS ACTIONS +.IP "\-exec \fIcommand\fR ;" +Execute \fIcommand\fR; true if 0 status is returned. All following +arguments to +.B find +are taken to be arguments to the command until an argument consisting +of `;' is encountered. The string `{}' is replaced by the current +file name being processed everywhere it occurs in the arguments to the +command, not just in arguments where it is alone, as in some versions +of +.BR find . +Both of these constructions might need to be escaped (with a `\e') or +quoted to protect them from expansion by the shell. The command is +executed in the starting directory. +.IP "\-fls \fIfile\fR" +True; like \-ls but write to \fIfile\fR like \-fprint. +.IP "\-fprint \fIfile\fR" +True; print the full file name into file \fIfile\fR. If \fIfile\fR +does not exist when \fBfind\fR is run, it is created; if it does +exist, it is truncated. The file names ``/dev/stdout'' and +``/dev/stderr'' are handled specially; they refer to the standard +output and standard error output, respectively. +.IP "\-fprint0 \fIfile\fR" +True; like \-print0 but write to \fIfile\fR like \-fprint. +.IP "\-fprintf \fIfile\fR \fIformat\fR" +True; like \-printf but write to \fIfile\fR like \-fprint. +.IP "\-ok \fIcommand\fR ;" +Like \-exec but ask the user first (on the standard input); if the +response does not start with `y' or `Y', do not run the command, and +return false. +.IP \-print +True; print the full file name on the standard output, followed by a newline. +.IP \-print0 +True; print the full file name on the standard output, followed by a +null character. This allows file names that contain newlines to be +correctly interpreted by programs that process the \fBfind\fR output. +.IP "\-printf \fIformat\fR" +True; print \fIformat\fR on the standard output, interpreting `\e' +escapes and `%' directives. Field widths and precisions can be +specified as with the `printf' C function. Unlike \-print, \-printf +does not add a newline at the end of the string. The escapes and +directives are: +.RS +.IP \ea +Alarm bell. +.IP \eb +Backspace. +.IP \ec +Stop printing from this format immediately and flush the output. +.IP \ef +Form feed. +.IP \en +Newline. +.IP \er +Carriage return. +.IP \et +Horizontal tab. +.IP \ev +Vertical tab. +.IP \e\e +A literal backslash (`\e'). +.IP \eNNN +The character whose ASCII code is NNN (octal). +.PP +A `\e' character followed by any other character is treated as an +ordinary character, so they both are printed. +.IP %% +A literal percent sign. +.IP %a +File's last access time in the format returned by the C `ctime' function. +.IP %A\fIk\fP +File's last access time in the format specified by \fIk\fR, which is +either `@' or a directive for the C `strftime' function. The possible +values for \fIk\fR are listed below; some of them might not be +available on all systems, due to differences in `strftime' between +systems. +.RS +.IP @ +seconds since Jan. 1, 1970, 00:00 GMT. +.PP +Time fields: +.IP H +hour (00..23) +.IP I +hour (01..12) +.IP k +hour ( 0..23) +.IP l +hour ( 1..12) +.IP M +minute (00..59) +.IP p +locale's AM or PM +.IP r +time, 12-hour (hh:mm:ss [AP]M) +.IP S +second (00..61) +.IP T +time, 24-hour (hh:mm:ss) +.IP X +locale's time representation (H:M:S) +.IP Z +time zone (e.g., EDT), or nothing if no time zone is determinable +.PP +Date fields: +.IP a +locale's abbreviated weekday name (Sun..Sat) +.IP A +locale's full weekday name, variable length (Sunday..Saturday) +.IP b +locale's abbreviated month name (Jan..Dec) +.IP B +locale's full month name, variable length (January..December) +.IP c +locale's date and time (Sat Nov 04 12:02:33 EST 1989) +.IP d +day of month (01..31) +.IP D +date (mm/dd/yy) +.IP h +same as b +.IP j +day of year (001..366) +.IP m +month (01..12) +.IP U +week number of year with Sunday as first day of week (00..53) +.IP w +day of week (0..6) +.IP W +week number of year with Monday as first day of week (00..53) +.IP x +locale's date representation (mm/dd/yy) +.IP y +last two digits of year (00..99) +.IP Y +year (1970...) +.RE +.IP %b +File's size in 512-byte blocks (rounded up). +.IP %c +File's last status change time in the format returned by the C `ctime' +function. +.IP %C\fIk\fP +File's last status change time in the format specified by \fIk\fR, +which is the same as for %A. +.IP %d +File's depth in the directory tree; 0 means the file is a command line +argument. +.IP %f +File's name with any leading directories removed (only the last element). +.IP %F +Type of the filesystem the file is on; this value can be used for +\-fstype. +.IP %g +File's group name, or numeric group ID if the group has no name. +.IP %G +File's numeric group ID. +.IP %h +Leading directories of file's name (all but the last element). +.IP %H +Command line argument under which file was found. +.IP %i +File's inode number (in decimal). +.IP %k +File's size in 1K blocks (rounded up). +.IP %l +Object of symbolic link (empty string if file is not a symbolic link). +.IP %m +File's permission bits (in octal). +.IP %n +Number of hard links to file. +.IP %p +File's name. +.IP %P +File's name with the name of the command line argument under which +it was found removed. +.IP %s +File's size in bytes. +.IP %t +File's last modification time in the format returned by the C `ctime' +function. +.IP %T\fIk\fP +File's last modification time in the format specified by \fIk\fR, +which is the same as for %A. +.IP %u +File's user name, or numeric user ID if the user has no name. +.IP %U +File's numeric user ID. +.PP +A `%' character followed by any other character is discarded (but the +other character is printed). +.RE +.IP \-prune +If \-depth is not given, true; do not descend the current directory. +.br +If \-depth is given, false; no effect. +.IP \-ls +True; list current file in `ls \-dils' format on standard output. +The block counts are of 1K blocks, unless the environment variable +POSIXLY_CORRECT is set, in which case 512-byte blocks are used. +.SS OPERATORS +.P +Listed in order of decreasing precedence: +.IP "( \fIexpr\fR )" +Force precedence. +.IP "! \fIexpr\fR" +True if \fIexpr\fR is false. +.IP "\-not \fIexpr\fR" +Same as ! \fIexpr\fR. +.IP "\fIexpr1 expr2\fR" +And (implied); \fIexpr2\fR is not evaluated if \fIexpr1\fR is false. +.IP "\fIexpr1\fR \-a \fIexpr2\fR" +Same as \fIexpr1 expr2\fR. +.IP "\fIexpr1\fR \-and \fIexpr2\fR" +Same as \fIexpr1 expr2\fR. +.IP "\fIexpr1\fR \-o \fIexpr2\fR" +Or; \fIexpr2\fR is not evaluated if \fIexpr1\fR is true. +.IP "\fIexpr1\fR \-or \fIexpr2\fR" +Same as \fIexpr1\fR \-o \fIexpr2\fR. +.IP "\fIexpr1\fR , \fIexpr2\fR" +List; both \fIexpr1\fR and \fIexpr2\fR are always evaluated. +The value of \fIexpr1\fR is discarded; the value of the list is the +value of \fIexpr2\fR. +.SH "SEE ALSO" +\fBlocate\fP(1L), \fBlocatedb\fP(5L), \fBupdatedb\fP(1L), \fBxargs\fP(1L) +\fBFinding Files\fP (on-line in Info, or printed) diff --git a/raw/man1/findsmb.1 b/raw/man1/findsmb.1 new file mode 100644 index 00000000..bd9ba62b --- /dev/null +++ b/raw/man1/findsmb.1 @@ -0,0 +1,95 @@ +.\"Generated by db2man.xsl. Don't modify this, modify the source. +.de Sh \" Subsection +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Ip \" List item +.br +.ie \\n(.$>=3 .ne \\$3 +.el .ne 3 +.IP "\\$1" \\$2 +.. +.TH "FINDSMB" 1 "" "" "" +.SH NAME +findsmb \- list info about machines that respond to SMB name queries on a subnet +.SH "SYNOPSIS" + +.nf +\fBfindsmb\fR [subnet broadcast address] +.fi + +.SH "DESCRIPTION" + +.PP +This perl script is part of the \fBSamba\fR(7) suite\&. + +.PP +\fBfindsmb\fR is a perl script that prints out several pieces of information about machines on a subnet that respond to SMB name query requests\&. It uses \fBnmblookup\fR(1) and \fBsmbclient\fR(1) to obtain this information\&. + +.SH "OPTIONS" + +.TP +-r +Controls whether \fBfindsmb\fR takes bugs in Windows95 into account when trying to find a Netbios name registered of the remote machine\&. This option is disabled by default because it is specific to Windows 95 and Windows 95 machines only\&. If set, \fBnmblookup\fR(1) will be called with \fB-B\fR option\&. + + +.TP +subnet broadcast address +Without this option, \fBfindsmb \fR will probe the subnet of the machine where \fBfindsmb\fR(1) is run\&. This value is passed to \fBnmblookup\fR(1) as part of the \fB-B\fR option\&. + + +.SH "EXAMPLES" + +.PP +The output of \fBfindsmb\fR lists the following information for all machines that respond to the initial\fBnmblookup\fR for any name: IP address, NetBIOS name, Workgroup name, operating system, and SMB server version\&. + +.PP +There will be a '+' in front of the workgroup name for machines that are local master browsers for that workgroup\&. There will be an '*' in front of the workgroup name for machines that are the domain master browser for that workgroup\&. Machines that are running Windows, Windows 95 or Windows 98 will not show any information about the operating system or server version\&. + +.PP +The command with \fB-r\fR option must be run on a system without \fBnmbd\fR(8)running\&. If \fBnmbd\fR is running on the system, you will only get the IP address and the DNS name of the machine\&. To get proper responses from Windows 95 and Windows 98 machines, the command must be run as root and with \fB-r\fR option on a machine without \fBnmbd\fR running\&. + +.PP +For example, running \fBfindsmb\fR without \fB-r\fR option set would yield output similar to the following +.nf + +IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION +--------------------------------------------------------------------- +192\&.168\&.35\&.10 MINESET-TEST1 [DMVENGR] +192\&.168\&.35\&.55 LINUXBOX *[MYGROUP] [Unix] [Samba 2\&.0\&.6] +192\&.168\&.35\&.56 HERBNT2 [HERB-NT] +192\&.168\&.35\&.63 GANDALF [MVENGR] [Unix] [Samba 2\&.0\&.5a for IRIX] +192\&.168\&.35\&.65 SAUNA [WORKGROUP] [Unix] [Samba 1\&.9\&.18p10] +192\&.168\&.35\&.71 FROGSTAR [ENGR] [Unix] [Samba 2\&.0\&.0 for IRIX] +192\&.168\&.35\&.78 HERBDHCP1 +[HERB] +192\&.168\&.35\&.88 SCNT2 +[MVENGR] [Windows NT 4\&.0] [NT LAN Manager 4\&.0] +192\&.168\&.35\&.93 FROGSTAR-PC [MVENGR] [Windows 5\&.0] [Windows 2000 LAN Manager] +192\&.168\&.35\&.97 HERBNT1 *[HERB-NT] [Windows NT 4\&.0] [NT LAN Manager 4\&.0] +.fi + +.SH "VERSION" + +.PP +This man page is correct for version 3\&.0 of the Samba suite\&. + +.SH "SEE ALSO" + +.PP +\fBnmbd\fR(8),\fBsmbclient\fR(1), and \fBnmblookup\fR(1) + +.SH "AUTHOR" + +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. + +.PP +The original Samba man pages were written by Karl Auer\&. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at ftp://ftp\&.icce\&.rug\&.nl/pub/unix/) and updated for the Samba 2\&.0 release by Jeremy Allison\&. The conversion to DocBook for Samba 2\&.2 was done by Gerald Carter\&. The conversion to DocBook XML 4\&.2 for Samba 3\&.0 was done by Alexander Bokovoy\&. + diff --git a/raw/man1/finger.1 b/raw/man1/finger.1 new file mode 100644 index 00000000..9663258b --- /dev/null +++ b/raw/man1/finger.1 @@ -0,0 +1,193 @@ +.\" Copyright (c) 1989, 1990 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" from: @(#)finger.1 6.14 (Berkeley) 7/27/91 +.\" +.Dd August 15, 1999 +.Dt FINGER 1 +.Os "Linux NetKit (0.17)" +.Sh NAME +.Nm finger +.Nd user information lookup program +.Sh SYNOPSIS +.Nm finger +.Op Fl lmsp +.Op Ar user ... +.Op Ar user@host ... +.Sh DESCRIPTION +The +.Nm finger +displays information about the system users. +.Pp +Options are: +.Bl -tag -width flag +.It Fl s +.Nm Finger +displays the user's login name, real name, terminal name and write +status (as a ``*'' after the terminal name if write permission is +denied), idle time, login time, office location and office phone +number. +.Pp +Login time is displayed as month, day, hours and minutes, unless +more than six months ago, in which case the year is displayed rather +than the hours and minutes. +.Pp +Unknown devices as well as nonexistent idle and login times are +displayed as single asterisks. +.Pp +.It Fl l +Produces a multi-line format displaying all of the information +described for the +.Fl s +option as well as the user's home directory, home phone number, login +shell, mail status, and the contents of the files +.Dq Pa .plan , +.Dq Pa .project , +.Dq Pa .pgpkey +and +.Dq Pa .forward +from the user's home directory. +.Pp +Phone numbers specified as eleven digits are printed as ``+N-NNN-NNN-NNNN''. +Numbers specified as ten or seven digits are printed as the appropriate +subset of that string. +Numbers specified as five digits are printed as ``xN-NNNN''. +Numbers specified as four digits are printed as ``xNNNN''. +.Pp +If write permission is denied to the device, the phrase ``(messages off)'' +is appended to the line containing the device name. +One entry per user is displayed with the +.Fl l +option; if a user is logged on multiple times, terminal information +is repeated once per login. +.Pp +Mail status is shown as ``No Mail.'' if there is no mail at all, +``Mail last read DDD MMM ## HH:MM YYYY (TZ)'' if the person has looked +at their mailbox since new mail arriving, or ``New mail received ...'', +`` Unread since ...'' if they have new mail. +.Pp +.It Fl p +Prevents +the +.Fl l +option of +.Nm finger +from displaying the contents of the +.Dq Pa .plan , +.Dq Pa .project +and +.Dq Pa .pgpkey +files. +.It Fl m +Prevent matching of +.Ar user +names. +.Ar User +is usually a login name; however, matching will also be done on the +users' real names, unless the +.Fl m +option is supplied. +All name matching performed by +.Nm finger +is case insensitive. +.El +.Pp +If no options are specified, +.Nm finger +defaults to the +.Fl l +style output if operands are provided, otherwise to the +.Fl s +style. +Note that some fields may be missing, in either format, if information +is not available for them. +.Pp +If no arguments are specified, +.Nm finger +will print an entry for each user currently logged into the system. +.Pp +.Nm Finger +may be used to look up users on a remote machine. +The format is to specify a +.Ar user +as +.Dq Li user@host , +or +.Dq Li @host , +where the default output +format for the former is the +.Fl l +style, and the default output format for the latter is the +.Fl s +style. +The +.Fl l +option is the only option that may be passed to a remote machine. +.Pp +If standard output is a socket, +.Nm finger +will emit a carriage return (^M) before every linefeed (^J). This is +for processing remote finger requests when invoked by +.Xr fingerd 8 . +.Sh FILES +.Bl -tag -width mmmmmmmmmmmmmmm +.It Pa ~/.nofinger +If finger finds this file in a user's home directory, it will, for +finger requests originating outside the local host, firmly deny the +existence of that user. For this to work, the finger program, as +started by +.Xr fingerd 8 , +must be able to see the +.Pa .nofinger +file. This generally means that the home directory containing the file +must have the other-users-execute bit set (o+x). See +.Xr chmod 1 . +If you use this feature for privacy, please test it with ``finger +@localhost'' before relying on it, just in case. +.It ~/.plan +.It ~/.project +.It ~/.pgpkey +These files are printed as part of a long-format request. The +.Pa .project +file is limited to one line; the +.Pa .plan +file may be arbitrarily long. +.El +.Sh SEE ALSO +.Xr chfn 1 , +.Xr passwd 1 , +.Xr w 1 , +.Xr who 1 +.Sh HISTORY +The +.Nm finger +command appeared in +.Bx 3.0 . diff --git a/raw/man1/fmt.1 b/raw/man1/fmt.1 new file mode 100644 index 00000000..52504eac --- /dev/null +++ b/raw/man1/fmt.1 @@ -0,0 +1,61 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH FMT "1" "October 2003" "fmt (coreutils) 5.0" FSF +.SH NAME +fmt \- simple optimal text formatter +.SH SYNOPSIS +.B fmt +[\fI-DIGITS\fR] [\fIOPTION\fR]... [\fIFILE\fR]... +.SH DESCRIPTION +.\" Add any additional description here +.PP +Reformat each paragraph in the FILE(s), writing to standard output. +If no FILE or if FILE is `-', read standard input. +.PP +Mandatory arguments to long options are mandatory for short options too. +.TP +\fB\-c\fR, \fB\-\-crown\-margin\fR +preserve indentation of first two lines +.TP +\fB\-p\fR, \fB\-\-prefix\fR=\fISTRING\fR +combine only lines having STRING as prefix +.TP +\fB\-s\fR, \fB\-\-split\-only\fR +split long lines, but do not refill +.TP +\fB\-t\fR, \fB\-\-tagged\-paragraph\fR +indentation of first line different from second +.TP +\fB\-u\fR, \fB\-\-uniform\-spacing\fR +one space between words, two after sentences +.TP +\fB\-w\fR, \fB\-\-width\fR=\fINUMBER\fR +maximum line width (default of 75 columns) +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +In \fB\-wNUMBER\fR, the letter `w' may be omitted. +.SH AUTHOR +Written by Ross Paterson. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B fmt +is maintained as a Texinfo manual. If the +.B info +and +.B fmt +programs are properly installed at your site, the command +.IP +.B info fmt +.PP +should give you access to the complete manual. diff --git a/raw/man1/fold.1 b/raw/man1/fold.1 new file mode 100644 index 00000000..2ee36ecc --- /dev/null +++ b/raw/man1/fold.1 @@ -0,0 +1,53 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH FOLD "1" "October 2003" "fold (coreutils) 5.0" FSF +.SH NAME +fold \- wrap each input line to fit in specified width +.SH SYNOPSIS +.B fold +[\fIOPTION\fR]... [\fIFILE\fR]... +.SH DESCRIPTION +.\" Add any additional description here +.PP +Wrap input lines in each FILE (standard input by default), writing to +standard output. +.PP +Mandatory arguments to long options are mandatory for short options too. +.TP +\fB\-b\fR, \fB\-\-bytes\fR +count bytes rather than columns +.TP +\fB\-c\fR, \fB\-\-characters\fR +count characters rather than columns +.TP +\fB\-s\fR, \fB\-\-spaces\fR +break at spaces +.TP +\fB\-w\fR, \fB\-\-width\fR=\fIWIDTH\fR +use WIDTH columns instead of 80 +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.SH AUTHOR +Written by David MacKenzie. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2003 Free Software Foundation, Inc. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B fold +is maintained as a Texinfo manual. If the +.B info +and +.B fold +programs are properly installed at your site, the command +.IP +.B info fold +.PP +should give you access to the complete manual. diff --git a/raw/man1/free.1 b/raw/man1/free.1 new file mode 100644 index 00000000..56e090c7 --- /dev/null +++ b/raw/man1/free.1 @@ -0,0 +1,78 @@ +.\" free.1 - manpage for the free(1) utility, part of procps +.\" +.\" Copyright (C) 2003 Robert Love +.\" Licensed under the terms of the GNU General Public License, v2 +.TH FREE 1 "10 Aug 2003" "Linux" "Linux User's Manual" +.SH NAME +free \- display information about free and used memory on the system + +.SH SYNOPSIS +.BI "free [\-b|-k|-m|-g] [\-l] [\-o] [\-t] [\-s " delay " ] [\-c " count " ] + +.SH DESCRIPTION +.BR free (1) +displays the total amount of free and used physical memory and swap space in +the system, as well as the buffers and cache consumed by the kernel. + +.SH OPTIONS +Normal invocation of +.BR free (1) +does not require any options. The output, however, can be fine-tuned by +specifying one or more of the following flags: +.TP +.B \-b, \-\^\-bytes +Display output in bytes. +.TP +.B \-k, \-\^\-kb +Display output in kilobytes (KB). This is the default. +.TP +.B \-m, \-\^\-mb +Display output in megabytes (MB). +.TP +.B \-g, \-\^\-gb +Display output in gigabytes (GB). +.TP +.B \-l, \-\^\-lowhigh +Display detailed information about low vs. high memory usage. +.TP +.B \-o, \-\^\-old +Use old format. Specifically, do not display -/+ buffers/cache. +.TP +.B \-t, \-\^\-total +Display total summary for physical memory + swap space. +.TP +.BI \-c " n" ", \-\^\-count=" n +Display statistics +.I n +times, then exit. Used in conjunction with the +.I -s +flag. Default is to display only once, unless +.I -s +was specified, in which case default is to repeat until interrupted. +.TP +.BI \-s " n" ", \-\^\-repeat=" n +Repeat, pausing every +.I n +seconds in-between. +.TP +.B \-V, \-\^\-version +Display version information and exit. +.TP +.B \-\^\-help +Display usage information and exit + +.SH FILES +.IR /proc/meminfo " \-\- memory information" + +.SH "SEE ALSO" +.BR ps (1), +.BR top (1), +.BR vmstat (1) + +.SH AUTHORS +Written by Robert Love. + +The procps package is maintained by Robert Love and was created by Michael +Johnson. + +Send bug reports to . diff --git a/raw/man1/ftp.1 b/raw/man1/ftp.1 new file mode 100644 index 00000000..b8fe29b7 --- /dev/null +++ b/raw/man1/ftp.1 @@ -0,0 +1,1053 @@ +.\" Copyright (c) 1985, 1989, 1990 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" from: @(#)ftp.1 6.18 (Berkeley) 7/30/91 +.\" +.Dd August 15, 1999 +.Dt FTP 1 +.Os "Linux NetKit (0.17)" +.Sh NAME +.Nm ftp +.Nd +.Tn Internet +file transfer program +.Sh SYNOPSIS +.Nm ftp +.Op Fl pinegvd +.Op Ar host +.Nm pftp +.Op Fl inegvd +.Op Ar host +.Sh DESCRIPTION +.Nm Ftp +is the user interface to the +.Tn Internet +standard File Transfer Protocol. +The program allows a user to transfer files to and from a +remote network site. +.Pp +Options may be specified at the command line, or to the +command interpreter. +.Bl -tag -width flag +.It Fl p +Use passive mode for data transfers. Allows use of ftp in environments +where a firewall prevents connections from the outside world back to +the client machine. Requires that the ftp server support the PASV +command. This is the default now for +.Nm all +clients (ftp and pftp) due to security concerns using the PORT transfer mode. +The flag is kept for compatibility only and has no effect anymore. +.It Fl i +Turns off interactive prompting during multiple file transfers. +.It Fl n +Restrains +.Nm ftp +from attempting \*(Lqauto-login\*(Rq upon initial connection. +If auto-login is enabled, +.Nm ftp +will check the +.Pa .netrc +(see +.Xr netrc 5) +file in the user's home directory for an entry describing +an account on the remote machine. +If no entry exists, +.Nm ftp +will prompt for the remote machine login name (default is the user +identity on the local machine), and, if necessary, prompt for a password +and an account with which to login. +.It Fl e +Disables command editing and history support, if it was compiled into +the +.Nm ftp +executable. Otherwise, does nothing. +.It Fl g +Disables file name globbing. +.It Fl v +Verbose option forces +.Nm ftp +to show all responses from the remote server, as well +as report on data transfer statistics. +.It Fl d +Enables debugging. +.El +.Pp +The client host with which +.Nm ftp +is to communicate may be specified on the command line. +If this is done, +.Nm ftp +will immediately attempt to establish a connection to an +.Tn FTP +server on that host; otherwise, +.Nm ftp +will enter its command interpreter and await instructions +from the user. +When +.Nm ftp +is awaiting commands from the user the prompt +.Ql ftp> +is provided to the user. +The following commands are recognized +by +.Nm ftp : +.Bl -tag -width Fl +.It Ic \&! Op Ar command Op Ar args +Invoke an interactive shell on the local machine. +If there are arguments, the first is taken to be a command to execute +directly, with the rest of the arguments as its arguments. +.It Ic \&$ Ar macro-name Op Ar args +Execute the macro +.Ar macro-name +that was defined with the +.Ic macdef +command. +Arguments are passed to the macro unglobbed. +.It Ic account Op Ar passwd +Supply a supplemental password required by a remote system for access +to resources once a login has been successfully completed. +If no argument is included, the user will be prompted for an account +password in a non-echoing input mode. +.It Ic append Ar local-file Op Ar remote-file +Append a local file to a file on the remote machine. +If +.Ar remote-file +is left unspecified, the local file name is used in naming the +remote file after being altered by any +.Ic ntrans +or +.Ic nmap +setting. +File transfer uses the current settings for +.Ic type , +.Ic format , +.Ic mode , +and +.Ic structure . +.It Ic ascii +Set the file transfer +.Ic type +to network +.Tn ASCII . +This is the default type. +.It Ic bell +Arrange that a bell be sounded after each file transfer +command is completed. +.It Ic binary +Set the file transfer +.Ic type +to support binary image transfer. +.It Ic bye +Terminate the +.Tn FTP +session with the remote server +and exit +.Nm ftp . +An end of file will also terminate the session and exit. +.It Ic case +Toggle remote computer file name case mapping during +.Ic mget +commands. +When +.Ic case +is on (default is off), remote computer file names with all letters in +upper case are written in the local directory with the letters mapped +to lower case. +.It Ic \&cd Ar remote-directory +Change the working directory on the remote machine +to +.Ar remote-directory . +.It Ic cdup +Change the remote machine working directory to the parent of the +current remote machine working directory. +.It Ic chmod Ar mode file-name +Change the permission modes of the file +.Ar file-name +on the remote +sytem to +.Ar mode . +.It Ic close +Terminate the +.Tn FTP +session with the remote server, and +return to the command interpreter. +Any defined macros are erased. +.It Ic \&cr +Toggle carriage return stripping during +ascii type file retrieval. +Records are denoted by a carriage return/linefeed sequence +during ascii type file transfer. +When +.Ic \&cr +is on (the default), carriage returns are stripped from this +sequence to conform with the +.Ux +single linefeed record +delimiter. +Records on +.Pf non\- Ns Ux +remote systems may contain single linefeeds; +when an ascii type transfer is made, these linefeeds may be +distinguished from a record delimiter only when +.Ic \&cr +is off. +.It Ic delete Ar remote-file +Delete the file +.Ar remote-file +on the remote machine. +.It Ic debug Op Ar debug-value +Toggle debugging mode. +If an optional +.Ar debug-value +is specified it is used to set the debugging level. +When debugging is on, +.Nm ftp +prints each command sent to the remote machine, preceded +by the string +.Ql \-\-> +.It Xo +.Ic dir +.Op Ar remote-directory +.Op Ar local-file +.Xc +Print a listing of the directory contents in the +directory, +.Ar remote-directory , +and, optionally, placing the output in +.Ar local-file . +If interactive prompting is on, +.Nm ftp +will prompt the user to verify that the last argument is indeed the +target local file for receiving +.Ic dir +output. +If no directory is specified, the current working +directory on the remote machine is used. +If no local +file is specified, or +.Ar local-file +is +.Fl , +output comes to the terminal. +.It Ic disconnect +A synonym for +.Ar close . +.It Ic form Ar format +Set the file transfer +.Ic form +to +.Ar format . +The default format is \*(Lqfile\*(Rq. +.It Ic get Ar remote-file Op Ar local-file +Retrieve the +.Ar remote-file +and store it on the local machine. +If the local +file name is not specified, it is given the same +name it has on the remote machine, subject to +alteration by the current +.Ic case , +.Ic ntrans , +and +.Ic nmap +settings. +The current settings for +.Ic type , +.Ic form , +.Ic mode , +and +.Ic structure +are used while transferring the file. +.It Ic glob +Toggle filename expansion for +.Ic mdelete , +.Ic mget +and +.Ic mput . +If globbing is turned off with +.Ic glob , +the file name arguments +are taken literally and not expanded. +Globbing for +.Ic mput +is done as in +.Xr csh 1 . +For +.Ic mdelete +and +.Ic mget , +each remote file name is expanded +separately on the remote machine and the lists are not merged. +Expansion of a directory name is likely to be +different from expansion of the name of an ordinary file: +the exact result depends on the foreign operating system and ftp server, +and can be previewed by doing +.Ql mls remote-files \- +Note: +.Ic mget +and +.Ic mput +are not meant to transfer +entire directory subtrees of files. +That can be done by +transferring a +.Xr tar 1 +archive of the subtree (in binary mode). +.It Ic hash +Toggle hash-sign (``#'') printing for each data block +transferred. +The size of a data block is 1024 bytes. +.It Ic help Op Ar command +Print an informative message about the meaning of +.Ar command . +If no argument is given, +.Nm ftp +prints a list of the known commands. +.It Ic idle Op Ar seconds +Set the inactivity timer on the remote server to +.Ar seconds +seconds. +If +.Ar seconds +is ommitted, the current inactivity timer is printed. +.It Ic lcd Op Ar directory +Change the working directory on the local machine. +If +no +.Ar directory +is specified, the user's home directory is used. +.It Xo +.Ic \&ls +.Op Ar remote-directory +.Op Ar local-file +.Xc +Print a listing of the contents of a +directory on the remote machine. +The listing includes any system-dependent information that the server +chooses to include; for example, most +.Ux +systems will produce +output from the command +.Ql ls \-l . +(See also +.Ic nlist . ) +If +.Ar remote-directory +is left unspecified, the current working directory is used. +If interactive prompting is on, +.Nm ftp +will prompt the user to verify that the last argument is indeed the +target local file for receiving +.Ic \&ls +output. +If no local file is specified, or if +.Ar local-file +is +.Sq Fl , +the output is sent to the terminal. +.It Ic macdef Ar macro-name +Define a macro. +Subsequent lines are stored as the macro +.Ar macro-name ; +a null line (consecutive newline characters +in a file or +carriage returns from the terminal) terminates macro input mode. +There is a limit of 16 macros and 4096 total characters in all +defined macros. +Macros remain defined until a +.Ic close +command is executed. +The macro processor interprets `$' and `\e' as special characters. +A `$' followed by a number (or numbers) is replaced by the +corresponding argument on the macro invocation command line. +A `$' followed by an `i' signals that macro processor that the +executing macro is to be looped. +On the first pass `$i' is +replaced by the first argument on the macro invocation command line, +on the second pass it is replaced by the second argument, and so on. +A `\e' followed by any character is replaced by that character. +Use the `\e' to prevent special treatment of the `$'. +.It Ic mdelete Op Ar remote-files +Delete the +.Ar remote-files +on the remote machine. +.It Ic mdir Ar remote-files local-file +Like +.Ic dir , +except multiple remote files may be specified. +If interactive prompting is on, +.Nm ftp +will prompt the user to verify that the last argument is indeed the +target local file for receiving +.Ic mdir +output. +.It Ic mget Ar remote-files +Expand the +.Ar remote-files +on the remote machine +and do a +.Ic get +for each file name thus produced. +See +.Ic glob +for details on the filename expansion. +Resulting file names will then be processed according to +.Ic case , +.Ic ntrans , +and +.Ic nmap +settings. +Files are transferred into the local working directory, +which can be changed with +.Ql lcd directory ; +new local directories can be created with +.Ql "\&! mkdir directory" . +.It Ic mkdir Ar directory-name +Make a directory on the remote machine. +.It Ic mls Ar remote-files local-file +Like +.Ic nlist , +except multiple remote files may be specified, +and the +.Ar local-file +must be specified. +If interactive prompting is on, +.Nm ftp +will prompt the user to verify that the last argument is indeed the +target local file for receiving +.Ic mls +output. +.It Ic mode Op Ar mode-name +Set the file transfer +.Ic mode +to +.Ar mode-name . +The default mode is \*(Lqstream\*(Rq mode. +.It Ic modtime Ar file-name +Show the last modification time of the file on the remote machine. +.It Ic mput Ar local-files +Expand wild cards in the list of local files given as arguments +and do a +.Ic put +for each file in the resulting list. +See +.Ic glob +for details of filename expansion. +Resulting file names will then be processed according to +.Ic ntrans +and +.Ic nmap +settings. +.It Ic newer Ar file-name Op Ar local-file +Get the file only if the modification time of the remote file is more +recent that the file on the current system. +If the file does not +exist on the current system, the remote file is considered +.Ic newer . +Otherwise, this command is identical to +.Ar get . +.It Xo +.Ic nlist +.Op Ar remote-directory +.Op Ar local-file +.Xc +Print a list of the files in a +directory on the remote machine. +If +.Ar remote-directory +is left unspecified, the current working directory is used. +If interactive prompting is on, +.Nm ftp +will prompt the user to verify that the last argument is indeed the +target local file for receiving +.Ic nlist +output. +If no local file is specified, or if +.Ar local-file +is +.Fl , +the output is sent to the terminal. +.It Ic nmap Op Ar inpattern outpattern +Set or unset the filename mapping mechanism. +If no arguments are specified, the filename mapping mechanism is unset. +If arguments are specified, remote filenames are mapped during +.Ic mput +commands and +.Ic put +commands issued without a specified remote target filename. +If arguments are specified, local filenames are mapped during +.Ic mget +commands and +.Ic get +commands issued without a specified local target filename. +This command is useful when connecting to a +.No non\- Ns Ux +remote computer +with different file naming conventions or practices. +The mapping follows the pattern set by +.Ar inpattern +and +.Ar outpattern . +.Op Ar Inpattern +is a template for incoming filenames (which may have already been +processed according to the +.Ic ntrans +and +.Ic case +settings). +Variable templating is accomplished by including the +sequences `$1', `$2', ..., `$9' in +.Ar inpattern . +Use `\\' to prevent this special treatment of the `$' character. +All other characters are treated literally, and are used to determine the +.Ic nmap +.Op Ar inpattern +variable values. +For example, given +.Ar inpattern +$1.$2 and the remote file name "mydata.data", $1 would have the value +"mydata", and $2 would have the value "data". +The +.Ar outpattern +determines the resulting mapped filename. +The sequences `$1', `$2', ...., `$9' are replaced by any value resulting +from the +.Ar inpattern +template. +The sequence `$0' is replace by the original filename. +Additionally, the sequence +.Ql Op Ar seq1 , Ar seq2 +is replaced by +.Op Ar seq1 +if +.Ar seq1 +is not a null string; otherwise it is replaced by +.Ar seq2 . +For example, the command +.Pp +.Bd -literal -offset indent -compact +nmap $1.$2.$3 [$1,$2].[$2,file] +.Ed +.Pp +would yield +the output filename "myfile.data" for input filenames "myfile.data" and +"myfile.data.old", "myfile.file" for the input filename "myfile", and +"myfile.myfile" for the input filename ".myfile". +Spaces may be included in +.Ar outpattern , +as in the example: `nmap $1 sed "s/ *$//" > $1' . +Use the `\e' character to prevent special treatment +of the `$','[','[', and `,' characters. +.It Ic ntrans Op Ar inchars Op Ar outchars +Set or unset the filename character translation mechanism. +If no arguments are specified, the filename character +translation mechanism is unset. +If arguments are specified, characters in +remote filenames are translated during +.Ic mput +commands and +.Ic put +commands issued without a specified remote target filename. +If arguments are specified, characters in +local filenames are translated during +.Ic mget +commands and +.Ic get +commands issued without a specified local target filename. +This command is useful when connecting to a +.No non\- Ns Ux +remote computer +with different file naming conventions or practices. +Characters in a filename matching a character in +.Ar inchars +are replaced with the corresponding character in +.Ar outchars . +If the character's position in +.Ar inchars +is longer than the length of +.Ar outchars , +the character is deleted from the file name. +.It Ic open Ar host Op Ar port +Establish a connection to the specified +.Ar host +.Tn FTP +server. +An optional port number may be supplied, +in which case, +.Nm ftp +will attempt to contact an +.Tn FTP +server at that port. +If the +.Ic auto-login +option is on (default), +.Nm ftp +will also attempt to automatically log the user in to +the +.Tn FTP +server (see below). +.It Ic prompt +Toggle interactive prompting. +Interactive prompting +occurs during multiple file transfers to allow the +user to selectively retrieve or store files. +If prompting is turned off (default is on), any +.Ic mget +or +.Ic mput +will transfer all files, and any +.Ic mdelete +will delete all files. +.It Ic proxy Ar ftp-command +Execute an ftp command on a secondary control connection. +This command allows simultaneous connection to two remote ftp +servers for transferring files between the two servers. +The first +.Ic proxy +command should be an +.Ic open , +to establish the secondary control connection. +Enter the command "proxy ?" to see other ftp commands executable on the +secondary connection. +The following commands behave differently when prefaced by +.Ic proxy : +.Ic open +will not define new macros during the auto-login process, +.Ic close +will not erase existing macro definitions, +.Ic get +and +.Ic mget +transfer files from the host on the primary control connection +to the host on the secondary control connection, and +.Ic put , +.Ic mput , +and +.Ic append +transfer files from the host on the secondary control connection +to the host on the primary control connection. +Third party file transfers depend upon support of the ftp protocol +.Dv PASV +command by the server on the secondary control connection. +.It Ic put Ar local-file Op Ar remote-file +Store a local file on the remote machine. +If +.Ar remote-file +is left unspecified, the local file name is used +after processing according to any +.Ic ntrans +or +.Ic nmap +settings +in naming the remote file. +File transfer uses the +current settings for +.Ic type , +.Ic format , +.Ic mode , +and +.Ic structure . +.It Ic pwd +Print the name of the current working directory on the remote +machine. +.It Ic quit +A synonym for +.Ic bye . +.It Ic quote Ar arg1 arg2 ... +The arguments specified are sent, verbatim, to the remote +.Tn FTP +server. +.It Ic recv Ar remote-file Op Ar local-file +A synonym for get. +.It Ic reget Ar remote-file Op Ar local-file +Reget acts like get, except that if +.Ar local-file +exists and is +smaller than +.Ar remote-file , +.Ar local-file +is presumed to be +a partially transferred copy of +.Ar remote-file +and the transfer +is continued from the apparent point of failure. +This command +is useful when transferring very large files over networks that +are prone to dropping connections. +.It Ic remotehelp Op Ar command-name +Request help from the remote +.Tn FTP +server. +If a +.Ar command-name +is specified it is supplied to the server as well. +.It Ic remotestatus Op Ar file-name +With no arguments, show status of remote machine. +If +.Ar file-name +is specified, show status of +.Ar file-name +on remote machine. +.It Xo +.Ic rename +.Op Ar from +.Op Ar to +.Xc +Rename the file +.Ar from +on the remote machine, to the file +.Ar to . +.It Ic reset +Clear reply queue. +This command re-synchronizes command/reply sequencing with the remote +ftp server. +Resynchronization may be necessary following a violation of the ftp protocol +by the remote server. +.It Ic restart Ar marker +Restart the immediately following +.Ic get +or +.Ic put +at the +indicated +.Ar marker . +On +.Ux +systems, marker is usually a byte +offset into the file. +.It Ic rmdir Ar directory-name +Delete a directory on the remote machine. +.It Ic runique +Toggle storing of files on the local system with unique filenames. +If a file already exists with a name equal to the target +local filename for a +.Ic get +or +.Ic mget +command, a ".1" is appended to the name. +If the resulting name matches another existing file, +a ".2" is appended to the original name. +If this process continues up to ".99", an error +message is printed, and the transfer does not take place. +The generated unique filename will be reported. +Note that +.Ic runique +will not affect local files generated from a shell command +(see below). +The default value is off. +.It Ic send Ar local-file Op Ar remote-file +A synonym for put. +.It Ic sendport +Toggle the use of +.Dv PORT +commands. +By default, +.Nm ftp +will attempt to use a +.Dv PORT +command when establishing +a connection for each data transfer. +The use of +.Dv PORT +commands can prevent delays +when performing multiple file transfers. +If the +.Dv PORT +command fails, +.Nm ftp +will use the default data port. +When the use of +.Dv PORT +commands is disabled, no attempt will be made to use +.Dv PORT +commands for each data transfer. +This is useful +for certain +.Tn FTP +implementations which do ignore +.Dv PORT +commands but, incorrectly, indicate they've been accepted. +.It Ic site Ar arg1 arg2 ... +The arguments specified are sent, verbatim, to the remote +.Tn FTP +server as a +.Dv SITE +command. +.It Ic size Ar file-name +Return size of +.Ar file-name +on remote machine. +.It Ic status +Show the current status of +.Nm ftp . +.It Ic struct Op Ar struct-name +Set the file transfer +.Ar structure +to +.Ar struct-name . +By default \*(Lqstream\*(Rq structure is used. +.It Ic sunique +Toggle storing of files on remote machine under unique file names. +Remote ftp server must support ftp protocol +.Dv STOU +command for +successful completion. +The remote server will report unique name. +Default value is off. +.It Ic system +Show the type of operating system running on the remote machine. +.It Ic tenex +Set the file transfer type to that needed to +talk to +.Tn TENEX +machines. +.It Ic trace +Toggle packet tracing. +.It Ic type Op Ar type-name +Set the file transfer +.Ic type +to +.Ar type-name . +If no type is specified, the current type +is printed. +The default type is network +.Tn ASCII . +.It Ic umask Op Ar newmask +Set the default umask on the remote server to +.Ar newmask . +If +.Ar newmask +is ommitted, the current umask is printed. +.It Xo +.Ic user Ar user-name +.Op Ar password +.Op Ar account +.Xc +Identify yourself to the remote +.Tn FTP +server. +If the +.Ar password +is not specified and the server requires it, +.Nm ftp +will prompt the user for it (after disabling local echo). +If an +.Ar account +field is not specified, and the +.Tn FTP +server +requires it, the user will be prompted for it. +If an +.Ar account +field is specified, an account command will +be relayed to the remote server after the login sequence +is completed if the remote server did not require it +for logging in. +Unless +.Nm ftp +is invoked with \*(Lqauto-login\*(Rq disabled, this +process is done automatically on initial connection to +the +.Tn FTP +server. +.It Ic verbose +Toggle verbose mode. +In verbose mode, all responses from +the +.Tn FTP +server are displayed to the user. +In addition, +if verbose is on, when a file transfer completes, statistics +regarding the efficiency of the transfer are reported. +By default, +verbose is on. +.It Ic ? Op Ar command +A synonym for help. +.El +.Pp +Command arguments which have embedded spaces may be quoted with +quote `"' marks. +.Sh ABORTING A FILE TRANSFER +To abort a file transfer, use the terminal interrupt key +(usually Ctrl-C). +Sending transfers will be immediately halted. +Receiving transfers will be halted by sending a ftp protocol +.Dv ABOR +command to the remote server, and discarding any further data received. +The speed at which this is accomplished depends upon the remote +server's support for +.Dv ABOR +processing. +If the remote server does not support the +.Dv ABOR +command, an +.Ql ftp> +prompt will not appear until the remote server has completed +sending the requested file. +.Pp +The terminal interrupt key sequence will be ignored when +.Nm ftp +has completed any local processing and is awaiting a reply +from the remote server. +A long delay in this mode may result from the ABOR processing described +above, or from unexpected behavior by the remote server, including +violations of the ftp protocol. +If the delay results from unexpected remote server behavior, the local +.Nm ftp +program must be killed by hand. +.Sh FILE NAMING CONVENTIONS +Files specified as arguments to +.Nm ftp +commands are processed according to the following rules. +.Bl -enum +.It +If the file name +.Sq Fl +is specified, the +.Ar stdin +(for reading) or +.Ar stdout +(for writing) is used. +.It +If the first character of the file name is +.Sq \&| , +the +remainder of the argument is interpreted as a shell command. +.Nm Ftp +then forks a shell, using +.Xr popen 3 +with the argument supplied, and reads (writes) from the stdout +(stdin). +If the shell command includes spaces, the argument +must be quoted; e.g. +\*(Lq" ls -lt"\*(Rq. +A particularly +useful example of this mechanism is: \*(Lqdir more\*(Rq. +.It +Failing the above checks, if ``globbing'' is enabled, +local file names are expanded +according to the rules used in the +.Xr csh 1 ; +c.f. the +.Ic glob +command. +If the +.Nm ftp +command expects a single local file (.e.g. +.Ic put ) , +only the first filename generated by the "globbing" operation is used. +.It +For +.Ic mget +commands and +.Ic get +commands with unspecified local file names, the local filename is +the remote filename, which may be altered by a +.Ic case , +.Ic ntrans , +or +.Ic nmap +setting. +The resulting filename may then be altered if +.Ic runique +is on. +.It +For +.Ic mput +commands and +.Ic put +commands with unspecified remote file names, the remote filename is +the local filename, which may be altered by a +.Ic ntrans +or +.Ic nmap +setting. +The resulting filename may then be altered by the remote server if +.Ic sunique +is on. +.El +.Sh FILE TRANSFER PARAMETERS +The FTP specification specifies many parameters which may +affect a file transfer. +The +.Ic type +may be one of \*(Lqascii\*(Rq, \*(Lqimage\*(Rq (binary), +\*(Lqebcdic\*(Rq, and \*(Lqlocal byte size\*(Rq (for +.Tn PDP Ns -10's +and +.Tn PDP Ns -20's +mostly). +.Nm Ftp +supports the ascii and image types of file transfer, +plus local byte size 8 for +.Ic tenex +mode transfers. +.Pp +.Nm Ftp +supports only the default values for the remaining +file transfer parameters: +.Ic mode , +.Ic form , +and +.Ic struct . +.Sh ENVIRONMENT +.Nm Ftp +utilizes the following environment variables. +.Bl -tag -width Fl +.It Ev HOME +For default location of a +.Pa .netrc +file, if one exists. +.It Ev SHELL +For default shell. +.El +.Sh SEE ALSO +.Xr ftpd 8 , +RFC 959 +.Sh HISTORY +The +.Nm ftp +command appeared in +.Bx 4.2 . +.Sh BUGS +Correct execution of many commands depends upon proper behavior +by the remote server. +.Pp +An error in the treatment of carriage returns +in the +.Bx 4.2 +ascii-mode transfer code +has been corrected. +This correction may result in incorrect transfers of binary files +to and from +.Bx 4.2 +servers using the ascii type. +Avoid this problem by using the binary image type. diff --git a/raw/man1/gcc.1 b/raw/man1/gcc.1 new file mode 100644 index 00000000..8569a704 --- /dev/null +++ b/raw/man1/gcc.1 @@ -0,0 +1,10237 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.13 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "GCC 1" +.TH GCC 1 "2003-10-23" "gcc-3.3.2" "GNU" +.SH "NAME" +gcc \- GNU project C and C++ compiler +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +gcc [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR] [\fB\-std=\fR\fIstandard\fR] + [\fB\-g\fR] [\fB\-pg\fR] [\fB\-O\fR\fIlevel\fR] + [\fB\-W\fR\fIwarn\fR...] [\fB\-pedantic\fR] + [\fB\-I\fR\fIdir\fR...] [\fB\-L\fR\fIdir\fR...] + [\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR] + [\fB\-f\fR\fIoption\fR...] [\fB\-m\fR\fImachine-option\fR...] + [\fB\-o\fR \fIoutfile\fR] \fIinfile\fR... +.PP +Only the most useful options are listed here; see below for the +remainder. \fBg++\fR accepts mostly the same options as \fBgcc\fR. +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +When you invoke \s-1GCC\s0, it normally does preprocessing, compilation, +assembly and linking. The ``overall options'' allow you to stop this +process at an intermediate stage. For example, the \fB\-c\fR option +says not to run the linker. Then the output consists of object files +output by the assembler. +.PP +Other options are passed on to one stage of processing. Some options +control the preprocessor and others the compiler itself. Yet other +options control the assembler and linker; most of these are not +documented here, since you rarely need to use any of them. +.PP +Most of the command line options that you can use with \s-1GCC\s0 are useful +for C programs; when an option is only useful with another language +(usually \*(C+), the explanation says so explicitly. If the description +for a particular option does not mention a source language, you can use +that option with all supported languages. +.PP +The \fBgcc\fR program accepts options and file names as operands. Many +options have multi-letter names; therefore multiple single-letter options +may \fInot\fR be grouped: \fB\-dr\fR is very different from \fB\-d\ \-r\fR. +.PP +You can mix options and other arguments. For the most part, the order +you use doesn't matter. Order does matter when you use several options +of the same kind; for example, if you specify \fB\-L\fR more than once, +the directories are searched in the order specified. +.PP +Many options have long names starting with \fB\-f\fR or with +\&\fB\-W\fR\-\-\-for example, \fB\-fforce\-mem\fR, +\&\fB\-fstrength\-reduce\fR, \fB\-Wformat\fR and so on. Most of +these have both positive and negative forms; the negative form of +\&\fB\-ffoo\fR would be \fB\-fno\-foo\fR. This manual documents +only one of these two forms, whichever one is not the default. +.SH "OPTIONS" +.IX Header "OPTIONS" +.Sh "Option Summary" +.IX Subsection "Option Summary" +Here is a summary of all the options, grouped by type. Explanations are +in the following sections. +.IP "\fIOverall Options\fR" 4 +.IX Item "Overall Options" +\&\fB\-c \-S \-E \-o\fR \fIfile\fR \fB\-pipe \-pass\-exit\-codes +\&\-x\fR \fIlanguage\fR \fB\-v \-### \-\-help \-\-target\-help \-\-version\fR +.IP "\fIC Language Options\fR" 4 +.IX Item "C Language Options" +\&\fB\-ansi \-std=\fR\fIstandard\fR \fB\-aux\-info\fR \fIfilename\fR +\&\fB\-fno\-asm \-fno\-builtin \-fno\-builtin\-\fR\fIfunction\fR +\&\fB\-fhosted \-ffreestanding \-fms\-extensions +\&\-trigraphs \-no\-integrated\-cpp \-traditional \-traditional\-cpp +\&\-fallow\-single\-precision \-fcond\-mismatch +\&\-fsigned\-bitfields \-fsigned\-char +\&\-funsigned\-bitfields \-funsigned\-char +\&\-fwritable\-strings\fR +.IP "\fI\*(C+ Language Options\fR" 4 +.IX Item " Language Options" +\&\fB\-fabi\-version=\fR\fIn\fR \fB\-fno\-access\-control \-fcheck\-new +\&\-fconserve\-space \-fno\-const\-strings \-fdollars\-in\-identifiers +\&\-fno\-elide\-constructors +\&\-fno\-enforce\-eh\-specs \-fexternal\-templates +\&\-falt\-external\-templates +\&\-ffor\-scope \-fno\-for\-scope \-fno\-gnu\-keywords +\&\-fno\-implicit\-templates +\&\-fno\-implicit\-inline\-templates +\&\-fno\-implement\-inlines \-fms\-extensions +\&\-fno\-nonansi\-builtins \-fno\-operator\-names +\&\-fno\-optional\-diags \-fpermissive +\&\-frepo \-fno\-rtti \-fstats \-ftemplate\-depth\-\fR\fIn\fR +\&\fB\-fuse\-cxa\-atexit \-fvtable\-gc \-fno\-weak \-nostdinc++ +\&\-fno\-default\-inline \-Wabi \-Wctor\-dtor\-privacy +\&\-Wnon\-virtual\-dtor \-Wreorder +\&\-Weffc++ \-Wno\-deprecated +\&\-Wno\-non\-template\-friend \-Wold\-style\-cast +\&\-Woverloaded\-virtual \-Wno\-pmf\-conversions +\&\-Wsign\-promo \-Wsynth\fR +.IP "\fIObjective-C Language Options\fR" 4 +.IX Item "Objective-C Language Options" +\&\fB\-fconstant\-string\-class=\fR\fIclass-name\fR +\&\fB\-fgnu\-runtime \-fnext\-runtime \-gen\-decls +\&\-Wno\-protocol \-Wselector \-Wundeclared\-selector\fR +.IP "\fILanguage Independent Options\fR" 4 +.IX Item "Language Independent Options" +\&\fB\-fmessage\-length=\fR\fIn\fR +\&\fB\-fdiagnostics\-show\-location=\fR[\fBonce\fR|\fBevery-line\fR] +.IP "\fIWarning Options\fR" 4 +.IX Item "Warning Options" +\&\fB\-fsyntax\-only \-pedantic \-pedantic\-errors +\&\-w \-W \-Wall \-Waggregate\-return +\&\-Wcast\-align \-Wcast\-qual \-Wchar\-subscripts \-Wcomment +\&\-Wconversion \-Wno\-deprecated\-declarations +\&\-Wdisabled\-optimization \-Wno\-div\-by\-zero \-Werror +\&\-Wfloat\-equal \-Wformat \-Wformat=2 +\&\-Wformat\-nonliteral \-Wformat\-security +\&\-Wimplicit \-Wimplicit\-int +\&\-Wimplicit\-function\-declaration +\&\-Werror\-implicit\-function\-declaration +\&\-Wimport \-Winline \-Wno\-endif\-labels +\&\-Wlarger\-than\-\fR\fIlen\fR \fB\-Wlong\-long +\&\-Wmain \-Wmissing\-braces +\&\-Wmissing\-format\-attribute \-Wmissing\-noreturn +\&\-Wno\-multichar \-Wno\-format\-extra\-args \-Wno\-format\-y2k +\&\-Wno\-import \-Wnonnull \-Wpacked \-Wpadded +\&\-Wparentheses \-Wpointer\-arith \-Wredundant\-decls +\&\-Wreturn\-type \-Wsequence\-point \-Wshadow +\&\-Wsign\-compare \-Wstrict\-aliasing +\&\-Wswitch \-Wswitch\-default \-Wswitch\-enum +\&\-Wsystem\-headers \-Wtrigraphs \-Wundef \-Wuninitialized +\&\-Wunknown\-pragmas \-Wunreachable\-code +\&\-Wunused \-Wunused\-function \-Wunused\-label \-Wunused\-parameter +\&\-Wunused\-value \-Wunused\-variable \-Wwrite\-strings\fR +.IP "\fIC\-only Warning Options\fR" 4 +.IX Item "C-only Warning Options" +\&\fB\-Wbad\-function\-cast \-Wmissing\-declarations +\&\-Wmissing\-prototypes \-Wnested\-externs +\&\-Wstrict\-prototypes \-Wtraditional +\&\-Wdeclaration\-after\-statement\fR +.IP "\fIDebugging Options\fR" 4 +.IX Item "Debugging Options" +\&\fB\-d\fR\fIletters\fR \fB\-dumpspecs \-dumpmachine \-dumpversion +\&\-fdump\-unnumbered \-fdump\-translation\-unit\fR[\fB\-\fR\fIn\fR] +\&\fB\-fdump\-class\-hierarchy\fR[\fB\-\fR\fIn\fR] +\&\fB\-fdump\-tree\-original\fR[\fB\-\fR\fIn\fR] +\&\fB\-fdump\-tree\-optimized\fR[\fB\-\fR\fIn\fR] +\&\fB\-fdump\-tree\-inlined\fR[\fB\-\fR\fIn\fR] +\&\fB\-feliminate\-dwarf2\-dups \-fmem\-report +\&\-fprofile\-arcs \-frandom\-seed=\fR\fIn\fR +\&\fB\-fsched\-verbose=\fR\fIn\fR \fB\-ftest\-coverage \-ftime\-report +\&\-g \-g\fR\fIlevel\fR \fB\-gcoff \-gdwarf \-gdwarf\-1 \-gdwarf\-1+ \-gdwarf\-2 +\&\-ggdb \-gstabs \-gstabs+ \-gvms \-gxcoff \-gxcoff+ +\&\-p \-pg \-print\-file\-name=\fR\fIlibrary\fR \fB\-print\-libgcc\-file\-name +\&\-print\-multi\-directory \-print\-multi\-lib +\&\-print\-prog\-name=\fR\fIprogram\fR \fB\-print\-search\-dirs \-Q +\&\-save\-temps \-time\fR +.IP "\fIOptimization Options\fR" 4 +.IX Item "Optimization Options" +\&\fB\-falign\-functions=\fR\fIn\fR \fB\-falign\-jumps=\fR\fIn\fR +\&\fB\-falign\-labels=\fR\fIn\fR \fB\-falign\-loops=\fR\fIn\fR +\&\fB\-fbranch\-probabilities \-fcaller\-saves \-fcprop\-registers +\&\-fcse\-follow\-jumps \-fcse\-skip\-blocks \-fdata\-sections +\&\-fdelayed\-branch \-fdelete\-null\-pointer\-checks +\&\-fexpensive\-optimizations \-ffast\-math \-ffloat\-store +\&\-fforce\-addr \-fforce\-mem \-ffunction\-sections +\&\-fgcse \-fgcse\-lm \-fgcse\-sm \-floop\-optimize \-fcrossjumping +\&\-fif\-conversion \-fif\-conversion2 +\&\-finline\-functions \-finline\-limit=\fR\fIn\fR \fB\-fkeep\-inline\-functions +\&\-fkeep\-static\-consts \-fmerge\-constants \-fmerge\-all\-constants +\&\-fmove\-all\-movables \-fnew\-ra \-fno\-branch\-count\-reg +\&\-fno\-default\-inline \-fno\-defer\-pop +\&\-fno\-function\-cse \-fno\-guess\-branch\-probability +\&\-fno\-inline \-fno\-math\-errno \-fno\-peephole \-fno\-peephole2 +\&\-funsafe\-math\-optimizations \-ffinite\-math\-only +\&\-fno\-trapping\-math \-fno\-zero\-initialized\-in\-bss +\&\-fomit\-frame\-pointer \-foptimize\-register\-move +\&\-foptimize\-sibling\-calls \-fprefetch\-loop\-arrays +\&\-freduce\-all\-givs \-fregmove \-frename\-registers +\&\-freorder\-blocks \-freorder\-functions +\&\-frerun\-cse\-after\-loop \-frerun\-loop\-opt +\&\-fschedule\-insns \-fschedule\-insns2 +\&\-fno\-sched\-interblock \-fno\-sched\-spec \-fsched\-spec\-load +\&\-fsched\-spec\-load\-dangerous \-fsignaling\-nans +\&\-fsingle\-precision\-constant \-fssa \-fssa\-ccp \-fssa\-dce +\&\-fstrength\-reduce \-fstrict\-aliasing \-ftracer \-fthread\-jumps +\&\-funroll\-all\-loops \-funroll\-loops +\&\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR +\&\fB\-O \-O0 \-O1 \-O2 \-O3 \-Os\fR +.IP "\fIPreprocessor Options\fR" 4 +.IX Item "Preprocessor Options" +\&\fB\-$ \-A\fR\fIquestion\fR\fB=\fR\fIanswer\fR +\&\fB\-A\-\fR\fIquestion\fR[\fB=\fR\fIanswer\fR] +\&\fB\-C \-dD \-dI \-dM \-dN +\&\-D\fR\fImacro\fR[\fB=\fR\fIdefn\fR] \fB\-E \-H +\&\-idirafter\fR \fIdir\fR +\&\fB\-include\fR \fIfile\fR \fB\-imacros\fR \fIfile\fR +\&\fB\-iprefix\fR \fIfile\fR \fB\-iwithprefix\fR \fIdir\fR +\&\fB\-iwithprefixbefore\fR \fIdir\fR \fB\-isystem\fR \fIdir\fR +\&\fB\-M \-MM \-MF \-MG \-MP \-MQ \-MT \-nostdinc \-P \-remap +\&\-trigraphs \-undef \-U\fR\fImacro\fR \fB\-Wp,\fR\fIoption\fR +.IP "\fIAssembler Option\fR" 4 +.IX Item "Assembler Option" +\&\fB\-Wa,\fR\fIoption\fR +.IP "\fILinker Options\fR" 4 +.IX Item "Linker Options" +\&\fIobject-file-name\fR \fB\-l\fR\fIlibrary\fR +\&\fB\-nostartfiles \-nodefaultlibs \-nostdlib \-pie +\&\-s \-static \-static\-libgcc \-shared \-shared\-libgcc \-symbolic +\&\-Wl,\fR\fIoption\fR \fB\-Xlinker\fR \fIoption\fR +\&\fB\-u\fR \fIsymbol\fR +.IP "\fIDirectory Options\fR" 4 +.IX Item "Directory Options" +\&\fB\-B\fR\fIprefix\fR \fB\-I\fR\fIdir\fR \fB\-I\- \-L\fR\fIdir\fR \fB\-specs=\fR\fIfile\fR +.IP "\fITarget Options\fR" 4 +.IX Item "Target Options" +\&\fB\-V\fR \fIversion\fR \fB\-b\fR \fImachine\fR +.IP "\fIMachine Dependent Options\fR" 4 +.IX Item "Machine Dependent Options" +\&\fIM680x0 Options\fR +\&\fB\-m68000 \-m68020 \-m68020\-40 \-m68020\-60 \-m68030 \-m68040 +\&\-m68060 \-mcpu32 \-m5200 \-m68881 \-mbitfield \-mc68000 \-mc68020 +\&\-mfpa \-mnobitfield \-mrtd \-mshort \-msoft\-float \-mpcrel +\&\-malign\-int \-mstrict\-align\fR +.Sp +\&\fIM68hc1x Options\fR +\&\fB\-m6811 \-m6812 \-m68hc11 \-m68hc12 \-m68hcs12 +\&\-mauto\-incdec \-minmax \-mlong\-calls \-mshort +\&\-msoft\-reg\-count=\fR\fIcount\fR +.Sp +\&\fI\s-1VAX\s0 Options\fR +\&\fB\-mg \-mgnu \-munix\fR +.Sp +\&\fI\s-1SPARC\s0 Options\fR +\&\fB\-mcpu=\fR\fIcpu-type\fR +\&\fB\-mtune=\fR\fIcpu-type\fR +\&\fB\-mcmodel=\fR\fIcode-model\fR +\&\fB\-m32 \-m64 +\&\-mapp\-regs \-mbroken\-saverestore \-mcypress +\&\-mfaster\-structs \-mflat +\&\-mfpu \-mhard\-float \-mhard\-quad\-float +\&\-mimpure\-text \-mlittle\-endian \-mlive\-g0 \-mno\-app\-regs +\&\-mno\-faster\-structs \-mno\-flat \-mno\-fpu +\&\-mno\-impure\-text \-mno\-stack\-bias \-mno\-unaligned\-doubles +\&\-msoft\-float \-msoft\-quad\-float \-msparclite \-mstack\-bias +\&\-msupersparc \-munaligned\-doubles \-mv8\fR +.Sp +\&\fI\s-1ARM\s0 Options\fR +\&\fB\-mapcs\-frame \-mno\-apcs\-frame +\&\-mapcs\-26 \-mapcs\-32 +\&\-mapcs\-stack\-check \-mno\-apcs\-stack\-check +\&\-mapcs\-float \-mno\-apcs\-float +\&\-mapcs\-reentrant \-mno\-apcs\-reentrant +\&\-msched\-prolog \-mno\-sched\-prolog +\&\-mlittle\-endian \-mbig\-endian \-mwords\-little\-endian +\&\-malignment\-traps \-mno\-alignment\-traps +\&\-msoft\-float \-mhard\-float \-mfpe +\&\-mthumb\-interwork \-mno\-thumb\-interwork +\&\-mcpu=\fR\fIname\fR \fB\-march=\fR\fIname\fR \fB\-mfpe=\fR\fIname\fR +\&\fB\-mstructure\-size\-boundary=\fR\fIn\fR +\&\fB\-mabort\-on\-noreturn +\&\-mlong\-calls \-mno\-long\-calls +\&\-msingle\-pic\-base \-mno\-single\-pic\-base +\&\-mpic\-register=\fR\fIreg\fR +\&\fB\-mnop\-fun\-dllimport +\&\-mpoke\-function\-name +\&\-mthumb \-marm +\&\-mtpcs\-frame \-mtpcs\-leaf\-frame +\&\-mcaller\-super\-interworking \-mcallee\-super\-interworking\fR +.Sp +\&\fI\s-1MN10200\s0 Options\fR +\&\fB\-mrelax\fR +.Sp +\&\fI\s-1MN10300\s0 Options\fR +\&\fB\-mmult\-bug \-mno\-mult\-bug +\&\-mam33 \-mno\-am33 +\&\-mno\-crt0 \-mrelax\fR +.Sp +\&\fIM32R/D Options\fR +\&\fB\-m32rx \-m32r \-mcode\-model=\fR\fImodel-type\fR +\&\fB\-msdata=\fR\fIsdata-type\fR \fB\-G\fR \fInum\fR +.Sp +\&\fIM88K Options\fR +\&\fB\-m88000 \-m88100 \-m88110 \-mbig\-pic +\&\-mcheck\-zero\-division \-mhandle\-large\-shift +\&\-midentify\-revision \-mno\-check\-zero\-division +\&\-mno\-ocs\-debug\-info \-mno\-ocs\-frame\-position +\&\-mno\-optimize\-arg\-area \-mno\-serialize\-volatile +\&\-mno\-underscores \-mocs\-debug\-info +\&\-mocs\-frame\-position \-moptimize\-arg\-area +\&\-mserialize\-volatile \-mshort\-data\-\fR\fInum\fR \fB\-msvr3 +\&\-msvr4 \-mtrap\-large\-shift \-muse\-div\-instruction +\&\-mversion\-03.00 \-mwarn\-passed\-structs\fR +.Sp +\&\fI\s-1RS/6000\s0 and PowerPC Options\fR +\&\fB\-mcpu=\fR\fIcpu-type\fR +\&\fB\-mtune=\fR\fIcpu-type\fR +\&\fB\-mpower \-mno\-power \-mpower2 \-mno\-power2 +\&\-mpowerpc \-mpowerpc64 \-mno\-powerpc +\&\-maltivec \-mno\-altivec +\&\-mpowerpc\-gpopt \-mno\-powerpc\-gpopt +\&\-mpowerpc\-gfxopt \-mno\-powerpc\-gfxopt +\&\-mnew\-mnemonics \-mold\-mnemonics +\&\-mfull\-toc \-mminimal\-toc \-mno\-fp\-in\-toc \-mno\-sum\-in\-toc +\&\-m64 \-m32 \-mxl\-call \-mno\-xl\-call \-mpe +\&\-msoft\-float \-mhard\-float \-mmultiple \-mno\-multiple +\&\-mstring \-mno\-string \-mupdate \-mno\-update +\&\-mfused\-madd \-mno\-fused\-madd \-mbit\-align \-mno\-bit\-align +\&\-mstrict\-align \-mno\-strict\-align \-mrelocatable +\&\-mno\-relocatable \-mrelocatable\-lib \-mno\-relocatable\-lib +\&\-mtoc \-mno\-toc \-mlittle \-mlittle\-endian \-mbig \-mbig\-endian +\&\-mcall\-aix \-mcall\-sysv \-mcall\-netbsd +\&\-maix\-struct\-return \-msvr4\-struct\-return +\&\-mabi=altivec \-mabi=no\-altivec +\&\-mabi=spe \-mabi=no\-spe +\&\-misel=yes \-misel=no +\&\-mprototype \-mno\-prototype +\&\-msim \-mmvme \-mads \-myellowknife \-memb \-msdata +\&\-msdata=\fR\fIopt\fR \fB\-mvxworks \-mwindiss \-G\fR \fInum\fR \fB\-pthread\fR +.Sp +\&\fIDarwin Options\fR +.Sp +\&\fB\-all_load \-allowable_client \-arch \-arch_errors_fatal +\&\-arch_only \-bind_at_load \-bundle \-bundle_loader +\&\-client_name \-compatibility_version \-current_version +\&\-dependency\-file \-dylib_file \-dylinker_install_name +\&\-dynamic \-dynamiclib \-exported_symbols_list +\&\-filelist \-flat_namespace \-force_cpusubtype_ALL +\&\-force_flat_namespace \-headerpad_max_install_names +\&\-image_base \-init \-install_name \-keep_private_externs +\&\-multi_module \-multiply_defined \-multiply_defined_unused +\&\-noall_load \-nomultidefs \-noprebind \-noseglinkedit +\&\-pagezero_size \-prebind \-prebind_all_twolevel_modules +\&\-private_bundle \-read_only_relocs \-sectalign +\&\-sectobjectsymbols \-whyload \-seg1addr +\&\-sectcreate \-sectobjectsymbols \-sectorder +\&\-seg_addr_table \-seg_addr_table_filename \-seglinkedit +\&\-segprot \-segs_read_only_addr \-segs_read_write_addr +\&\-single_module \-static \-sub_library \-sub_umbrella +\&\-twolevel_namespace \-umbrella \-undefined +\&\-unexported_symbols_list \-weak_reference_mismatches \-whatsloaded\fR +.Sp +\&\fI\s-1RT\s0 Options\fR +\&\fB\-mcall\-lib\-mul \-mfp\-arg\-in\-fpregs \-mfp\-arg\-in\-gregs +\&\-mfull\-fp\-blocks \-mhc\-struct\-return \-min\-line\-mul +\&\-mminimum\-fp\-blocks \-mnohc\-struct\-return\fR +.Sp +\&\fI\s-1MIPS\s0 Options\fR +\&\fB\-mabicalls \-march=\fR\fIcpu-type\fR \fB\-mtune=\fR\fIcpu=type\fR +\&\fB\-mcpu=\fR\fIcpu-type\fR \fB\-membedded\-data \-muninit\-const\-in\-rodata +\&\-membedded\-pic \-mfp32 \-mfp64 \-mfused\-madd \-mno\-fused\-madd +\&\-mgas \-mgp32 \-mgp64 +\&\-mgpopt \-mhalf\-pic \-mhard\-float \-mint64 \-mips1 +\&\-mips2 \-mips3 \-mips4 \-mlong64 \-mlong32 \-mlong\-calls \-mmemcpy +\&\-mmips\-as \-mmips\-tfile \-mno\-abicalls +\&\-mno\-embedded\-data \-mno\-uninit\-const\-in\-rodata +\&\-mno\-embedded\-pic \-mno\-gpopt \-mno\-long\-calls +\&\-mno\-memcpy \-mno\-mips\-tfile \-mno\-rnames \-mno\-stats +\&\-mrnames \-msoft\-float +\&\-m4650 \-msingle\-float \-mmad +\&\-mstats \-EL \-EB \-G\fR \fInum\fR \fB\-nocpp +\&\-mabi=32 \-mabi=n32 \-mabi=64 \-mabi=eabi +\&\-mfix7000 \-mno\-crt0 \-mflush\-func=\fR\fIfunc\fR \fB\-mno\-flush\-func +\&\-mbranch\-likely \-mno\-branch\-likely\fR +.Sp +\&\fIi386 and x86\-64 Options\fR +\&\fB\-mcpu=\fR\fIcpu-type\fR \fB\-march=\fR\fIcpu-type\fR +\&\fB\-mfpmath=\fR\fIunit\fR \fB\-masm=\fR\fIdialect\fR \fB\-mno\-fancy\-math\-387 +\&\-mno\-fp\-ret\-in\-387 \-msoft\-float \-msvr3\-shlib +\&\-mno\-wide\-multiply \-mrtd \-malign\-double +\&\-mpreferred\-stack\-boundary=\fR\fInum\fR +\&\fB\-mmmx \-msse \-msse2 \-mpni \-m3dnow +\&\-mthreads \-mno\-align\-stringops \-minline\-all\-stringops +\&\-mpush\-args \-maccumulate\-outgoing\-args \-m128bit\-long\-double +\&\-m96bit\-long\-double \-mregparm=\fR\fInum\fR \fB\-momit\-leaf\-frame\-pointer +\&\-mno\-red\-zone +\&\-mcmodel=\fR\fIcode-model\fR +\&\fB\-m32 \-m64\fR +.Sp +\&\fI\s-1HPPA\s0 Options\fR +\&\fB\-march=\fR\fIarchitecture-type\fR +\&\fB\-mbig\-switch \-mdisable\-fpregs \-mdisable\-indexing +\&\-mfast\-indirect\-calls \-mgas \-mgnu\-ld \-mhp\-ld +\&\-mjump\-in\-delay \-mlinker\-opt \-mlong\-calls +\&\-mlong\-load\-store \-mno\-big\-switch \-mno\-disable\-fpregs +\&\-mno\-disable\-indexing \-mno\-fast\-indirect\-calls \-mno\-gas +\&\-mno\-jump\-in\-delay \-mno\-long\-load\-store +\&\-mno\-portable\-runtime \-mno\-soft\-float +\&\-mno\-space\-regs \-msoft\-float \-mpa\-risc\-1\-0 +\&\-mpa\-risc\-1\-1 \-mpa\-risc\-2\-0 \-mportable\-runtime +\&\-mschedule=\fR\fIcpu-type\fR \fB\-mspace\-regs \-msio \-mwsio +\&\-nolibdld \-static \-threads\fR +.Sp +\&\fIIntel 960 Options\fR +\&\fB\-m\fR\fIcpu-type\fR \fB\-masm\-compat \-mclean\-linkage +\&\-mcode\-align \-mcomplex\-addr \-mleaf\-procedures +\&\-mic\-compat \-mic2.0\-compat \-mic3.0\-compat +\&\-mintel\-asm \-mno\-clean\-linkage \-mno\-code\-align +\&\-mno\-complex\-addr \-mno\-leaf\-procedures +\&\-mno\-old\-align \-mno\-strict\-align \-mno\-tail\-call +\&\-mnumerics \-mold\-align \-msoft\-float \-mstrict\-align +\&\-mtail\-call\fR +.Sp +\&\fI\s-1DEC\s0 Alpha Options\fR +\&\fB\-mno\-fp\-regs \-msoft\-float \-malpha\-as \-mgas +\&\-mieee \-mieee\-with\-inexact \-mieee\-conformant +\&\-mfp\-trap\-mode=\fR\fImode\fR \fB\-mfp\-rounding\-mode=\fR\fImode\fR +\&\fB\-mtrap\-precision=\fR\fImode\fR \fB\-mbuild\-constants +\&\-mcpu=\fR\fIcpu-type\fR \fB\-mtune=\fR\fIcpu-type\fR +\&\fB\-mbwx \-mmax \-mfix \-mcix +\&\-mfloat\-vax \-mfloat\-ieee +\&\-mexplicit\-relocs \-msmall\-data \-mlarge\-data +\&\-mmemory\-latency=\fR\fItime\fR +.Sp +\&\fI\s-1DEC\s0 Alpha/VMS Options\fR +\&\fB\-mvms\-return\-codes\fR +.Sp +\&\fIH8/300 Options\fR +\&\fB\-mrelax \-mh \-ms \-mn \-mint32 \-malign\-300\fR +.Sp +\&\fI\s-1SH\s0 Options\fR +\&\fB\-m1 \-m2 \-m3 \-m3e +\&\-m4\-nofpu \-m4\-single\-only \-m4\-single \-m4 +\&\-m5\-64media \-m5\-64media\-nofpu +\&\-m5\-32media \-m5\-32media\-nofpu +\&\-m5\-compact \-m5\-compact\-nofpu +\&\-mb \-ml \-mdalign \-mrelax +\&\-mbigtable \-mfmovd \-mhitachi \-mnomacsave +\&\-mieee \-misize \-mpadstruct \-mspace +\&\-mprefergot \-musermode\fR +.Sp +\&\fISystem V Options\fR +\&\fB\-Qy \-Qn \-YP,\fR\fIpaths\fR \fB\-Ym,\fR\fIdir\fR +.Sp +\&\fI\s-1ARC\s0 Options\fR +\&\fB\-EB \-EL +\&\-mmangle\-cpu \-mcpu=\fR\fIcpu\fR \fB\-mtext=\fR\fItext-section\fR +\&\fB\-mdata=\fR\fIdata-section\fR \fB\-mrodata=\fR\fIreadonly-data-section\fR +.Sp +\&\fITMS320C3x/C4x Options\fR +\&\fB\-mcpu=\fR\fIcpu\fR \fB\-mbig \-msmall \-mregparm \-mmemparm +\&\-mfast\-fix \-mmpyi \-mbk \-mti \-mdp\-isr\-reload +\&\-mrpts=\fR\fIcount\fR \fB\-mrptb \-mdb \-mloop\-unsigned +\&\-mparallel\-insns \-mparallel\-mpy \-mpreserve\-float\fR +.Sp +\&\fIV850 Options\fR +\&\fB\-mlong\-calls \-mno\-long\-calls \-mep \-mno\-ep +\&\-mprolog\-function \-mno\-prolog\-function \-mspace +\&\-mtda=\fR\fIn\fR \fB\-msda=\fR\fIn\fR \fB\-mzda=\fR\fIn\fR +\&\fB\-mapp\-regs \-mno\-app\-regs +\&\-mdisable\-callt \-mno\-disable\-callt +\&\-mv850e +\&\-mv850 \-mbig\-switch\fR +.Sp +\&\fI\s-1NS32K\s0 Options\fR +\&\fB\-m32032 \-m32332 \-m32532 \-m32081 \-m32381 +\&\-mmult\-add \-mnomult\-add \-msoft\-float \-mrtd \-mnortd +\&\-mregparam \-mnoregparam \-msb \-mnosb +\&\-mbitfield \-mnobitfield \-mhimem \-mnohimem\fR +.Sp +\&\fI\s-1AVR\s0 Options\fR +\&\fB\-mmcu=\fR\fImcu\fR \fB\-msize \-minit\-stack=\fR\fIn\fR \fB\-mno\-interrupts +\&\-mcall\-prologues \-mno\-tablejump \-mtiny\-stack\fR +.Sp +\&\fIMCore Options\fR +\&\fB\-mhardlit \-mno\-hardlit \-mdiv \-mno\-div \-mrelax\-immediates +\&\-mno\-relax\-immediates \-mwide\-bitfields \-mno\-wide\-bitfields +\&\-m4byte\-functions \-mno\-4byte\-functions \-mcallgraph\-data +\&\-mno\-callgraph\-data \-mslow\-bytes \-mno\-slow\-bytes \-mno\-lsim +\&\-mlittle\-endian \-mbig\-endian \-m210 \-m340 \-mstack\-increment\fR +.Sp +\&\fI\s-1MMIX\s0 Options\fR +\&\fB\-mlibfuncs \-mno\-libfuncs \-mepsilon \-mno\-epsilon \-mabi=gnu +\&\-mabi=mmixware \-mzero\-extend \-mknuthdiv \-mtoplevel\-symbols +\&\-melf \-mbranch\-predict \-mno\-branch\-predict \-mbase\-addresses +\&\-mno\-base\-addresses \-msingle\-exit \-mno\-single\-exit\fR +.Sp +\&\fI\s-1IA\-64\s0 Options\fR +\&\fB\-mbig\-endian \-mlittle\-endian \-mgnu\-as \-mgnu\-ld \-mno\-pic +\&\-mvolatile\-asm\-stop \-mb\-step \-mregister\-names \-mno\-sdata +\&\-mconstant\-gp \-mauto\-pic \-minline\-float\-divide\-min\-latency +\&\-minline\-float\-divide\-max\-throughput +\&\-minline\-int\-divide\-min\-latency +\&\-minline\-int\-divide\-max\-throughput \-mno\-dwarf2\-asm +\&\-mfixed\-range=\fR\fIregister-range\fR +.Sp +\&\fID30V Options\fR +\&\fB\-mextmem \-mextmemory \-monchip \-mno\-asm\-optimize +\&\-masm\-optimize \-mbranch\-cost=\fR\fIn\fR \fB\-mcond\-exec=\fR\fIn\fR +.Sp +\&\fIS/390 and zSeries Options\fR +\&\fB\-mhard\-float \-msoft\-float \-mbackchain \-mno\-backchain +\&\-msmall\-exec \-mno\-small\-exec \-mmvcle \-mno\-mvcle +\&\-m64 \-m31 \-mdebug \-mno\-debug\fR +.Sp +\&\fI\s-1CRIS\s0 Options\fR +\&\fB\-mcpu=\fR\fIcpu\fR \fB\-march=\fR\fIcpu\fR \fB\-mtune=\fR\fIcpu\fR +\&\fB\-mmax\-stack\-frame=\fR\fIn\fR \fB\-melinux\-stacksize=\fR\fIn\fR +\&\fB\-metrax4 \-metrax100 \-mpdebug \-mcc\-init \-mno\-side\-effects +\&\-mstack\-align \-mdata\-align \-mconst\-align +\&\-m32\-bit \-m16\-bit \-m8\-bit \-mno\-prologue\-epilogue \-mno\-gotplt +\&\-melf \-maout \-melinux \-mlinux \-sim \-sim2\fR +.Sp +\&\fI\s-1PDP\-11\s0 Options\fR +\&\fB\-mfpu \-msoft\-float \-mac0 \-mno\-ac0 \-m40 \-m45 \-m10 +\&\-mbcopy \-mbcopy\-builtin \-mint32 \-mno\-int16 +\&\-mint16 \-mno\-int32 \-mfloat32 \-mno\-float64 +\&\-mfloat64 \-mno\-float32 \-mabshi \-mno\-abshi +\&\-mbranch\-expensive \-mbranch\-cheap +\&\-msplit \-mno\-split \-munix\-asm \-mdec\-asm\fR +.Sp +\&\fIXstormy16 Options\fR +\&\fB\-msim\fR +.Sp +\&\fIXtensa Options\fR +\&\fB\-mbig\-endian \-mlittle\-endian +\&\-mdensity \-mno\-density +\&\-mmac16 \-mno\-mac16 +\&\-mmul16 \-mno\-mul16 +\&\-mmul32 \-mno\-mul32 +\&\-mnsa \-mno\-nsa +\&\-mminmax \-mno\-minmax +\&\-msext \-mno\-sext +\&\-mbooleans \-mno\-booleans +\&\-mhard\-float \-msoft\-float +\&\-mfused\-madd \-mno\-fused\-madd +\&\-mserialize\-volatile \-mno\-serialize\-volatile +\&\-mtext\-section\-literals \-mno\-text\-section\-literals +\&\-mtarget\-align \-mno\-target\-align +\&\-mlongcalls \-mno\-longcalls\fR +.Sp +\&\fI\s-1FRV\s0 Options\fR +\&\fB\-mgpr\-32 \-mgpr\-64 \-mfpr\-32 \-mfpr\-64 +\&\-mhard\-float \-msoft\-float \-malloc\-cc \-mfixed\-cc +\&\-mdword \-mno\-dword \-mdouble \-mno\-double +\&\-mmedia \-mno\-media \-mmuladd \-mno\-muladd \-mlibrary\-pic +\&\-macc\-4 \-macc\-8 \-mpack \-mno\-pack \-mno\-eflags +\&\-mcond\-move \-mno\-cond\-move \-mscc \-mno\-scc +\&\-mcond\-exec \-mno\-cond\-exec \-mvliw\-branch \-mno\-vliw\-branch +\&\-mmulti\-cond\-exec \-mno\-multi\-cond\-exec \-mnested\-cond\-exec +\&\-mno\-nested\-cond\-exec \-mtomcat\-stats +\&\-mcpu=\fR\fIcpu\fR +.IP "\fICode Generation Options\fR" 4 +.IX Item "Code Generation Options" +\&\fB\-fcall\-saved\-\fR\fIreg\fR \fB\-fcall\-used\-\fR\fIreg\fR +\&\fB\-ffixed\-\fR\fIreg\fR \fB\-fexceptions +\&\-fnon\-call\-exceptions \-funwind\-tables +\&\-fasynchronous\-unwind\-tables +\&\-finhibit\-size\-directive \-finstrument\-functions +\&\-fno\-common \-fno\-ident \-fno\-gnu\-linker +\&\-fpcc\-struct\-return \-fpic \-fPIC \-fpie \-fPIE +\&\-freg\-struct\-return \-fshared\-data \-fshort\-enums +\&\-fshort\-double \-fshort\-wchar \-fvolatile +\&\-fvolatile\-global \-fvolatile\-static +\&\-fverbose\-asm \-fpack\-struct \-fstack\-check +\&\-fstack\-limit\-register=\fR\fIreg\fR \fB\-fstack\-limit\-symbol=\fR\fIsym\fR +\&\fB\-fargument\-alias \-fargument\-noalias +\&\-fargument\-noalias\-global \-fleading\-underscore +\&\-ftls\-model=\fR\fImodel\fR +\&\fB\-ftrapv \-fbounds\-check\fR +.Sh "Options Controlling the Kind of Output" +.IX Subsection "Options Controlling the Kind of Output" +Compilation can involve up to four stages: preprocessing, compilation +proper, assembly and linking, always in that order. The first three +stages apply to an individual source file, and end by producing an +object file; linking combines all the object files (those newly +compiled, and those specified as input) into an executable file. +.PP +For any given input file, the file name suffix determines what kind of +compilation is done: +.IP "\fIfile\fR\fB.c\fR" 4 +.IX Item "file.c" +C source code which must be preprocessed. +.IP "\fIfile\fR\fB.i\fR" 4 +.IX Item "file.i" +C source code which should not be preprocessed. +.IP "\fIfile\fR\fB.ii\fR" 4 +.IX Item "file.ii" +\&\*(C+ source code which should not be preprocessed. +.IP "\fIfile\fR\fB.m\fR" 4 +.IX Item "file.m" +Objective-C source code. Note that you must link with the library +\&\fIlibobjc.a\fR to make an Objective-C program work. +.IP "\fIfile\fR\fB.mi\fR" 4 +.IX Item "file.mi" +Objective-C source code which should not be preprocessed. +.IP "\fIfile\fR\fB.h\fR" 4 +.IX Item "file.h" +C header file (not to be compiled or linked). +.IP "\fIfile\fR\fB.cc\fR" 4 +.IX Item "file.cc" +.PD 0 +.IP "\fIfile\fR\fB.cp\fR" 4 +.IX Item "file.cp" +.IP "\fIfile\fR\fB.cxx\fR" 4 +.IX Item "file.cxx" +.IP "\fIfile\fR\fB.cpp\fR" 4 +.IX Item "file.cpp" +.IP "\fIfile\fR\fB.c++\fR" 4 +.IX Item "file.c++" +.IP "\fIfile\fR\fB.C\fR" 4 +.IX Item "file.C" +.PD +\&\*(C+ source code which must be preprocessed. Note that in \fB.cxx\fR, +the last two letters must both be literally \fBx\fR. Likewise, +\&\fB.C\fR refers to a literal capital C. +.IP "\fIfile\fR\fB.f\fR" 4 +.IX Item "file.f" +.PD 0 +.IP "\fIfile\fR\fB.for\fR" 4 +.IX Item "file.for" +.IP "\fIfile\fR\fB.FOR\fR" 4 +.IX Item "file.FOR" +.PD +Fortran source code which should not be preprocessed. +.IP "\fIfile\fR\fB.F\fR" 4 +.IX Item "file.F" +.PD 0 +.IP "\fIfile\fR\fB.fpp\fR" 4 +.IX Item "file.fpp" +.IP "\fIfile\fR\fB.FPP\fR" 4 +.IX Item "file.FPP" +.PD +Fortran source code which must be preprocessed (with the traditional +preprocessor). +.IP "\fIfile\fR\fB.r\fR" 4 +.IX Item "file.r" +Fortran source code which must be preprocessed with a \s-1RATFOR\s0 +preprocessor (not included with \s-1GCC\s0). +.IP "\fIfile\fR\fB.ads\fR" 4 +.IX Item "file.ads" +Ada source code file which contains a library unit declaration (a +declaration of a package, subprogram, or generic, or a generic +instantiation), or a library unit renaming declaration (a package, +generic, or subprogram renaming declaration). Such files are also +called \fIspecs\fR. +.IP "\fIfile\fR\fB.adb\fR" 4 +.IX Item "file.adb" +Ada source code file containing a library unit body (a subprogram or +package body). Such files are also called \fIbodies\fR. +.IP "\fIfile\fR\fB.s\fR" 4 +.IX Item "file.s" +Assembler code. +.IP "\fIfile\fR\fB.S\fR" 4 +.IX Item "file.S" +Assembler code which must be preprocessed. +.IP "\fIother\fR" 4 +.IX Item "other" +An object file to be fed straight into linking. +Any file name with no recognized suffix is treated this way. +.PP +You can specify the input language explicitly with the \fB\-x\fR option: +.IP "\fB\-x\fR \fIlanguage\fR" 4 +.IX Item "-x language" +Specify explicitly the \fIlanguage\fR for the following input files +(rather than letting the compiler choose a default based on the file +name suffix). This option applies to all following input files until +the next \fB\-x\fR option. Possible values for \fIlanguage\fR are: +.Sp +.Vb 8 +\& c c-header cpp-output +\& c++ c++-cpp-output +\& objective-c objc-cpp-output +\& assembler assembler-with-cpp +\& ada +\& f77 f77-cpp-input ratfor +\& java +\& treelang +.Ve +.IP "\fB\-x none\fR" 4 +.IX Item "-x none" +Turn off any specification of a language, so that subsequent files are +handled according to their file name suffixes (as they are if \fB\-x\fR +has not been used at all). +.IP "\fB\-pass\-exit\-codes\fR" 4 +.IX Item "-pass-exit-codes" +Normally the \fBgcc\fR program will exit with the code of 1 if any +phase of the compiler returns a non-success return code. If you specify +\&\fB\-pass\-exit\-codes\fR, the \fBgcc\fR program will instead return with +numerically highest error produced by any phase that returned an error +indication. +.PP +If you only want some of the stages of compilation, you can use +\&\fB\-x\fR (or filename suffixes) to tell \fBgcc\fR where to start, and +one of the options \fB\-c\fR, \fB\-S\fR, or \fB\-E\fR to say where +\&\fBgcc\fR is to stop. Note that some combinations (for example, +\&\fB\-x cpp-output \-E\fR) instruct \fBgcc\fR to do nothing at all. +.IP "\fB\-c\fR" 4 +.IX Item "-c" +Compile or assemble the source files, but do not link. The linking +stage simply is not done. The ultimate output is in the form of an +object file for each source file. +.Sp +By default, the object file name for a source file is made by replacing +the suffix \fB.c\fR, \fB.i\fR, \fB.s\fR, etc., with \fB.o\fR. +.Sp +Unrecognized input files, not requiring compilation or assembly, are +ignored. +.IP "\fB\-S\fR" 4 +.IX Item "-S" +Stop after the stage of compilation proper; do not assemble. The output +is in the form of an assembler code file for each non-assembler input +file specified. +.Sp +By default, the assembler file name for a source file is made by +replacing the suffix \fB.c\fR, \fB.i\fR, etc., with \fB.s\fR. +.Sp +Input files that don't require compilation are ignored. +.IP "\fB\-E\fR" 4 +.IX Item "-E" +Stop after the preprocessing stage; do not run the compiler proper. The +output is in the form of preprocessed source code, which is sent to the +standard output. +.Sp +Input files which don't require preprocessing are ignored. +.IP "\fB\-o\fR \fIfile\fR" 4 +.IX Item "-o file" +Place output in file \fIfile\fR. This applies regardless to whatever +sort of output is being produced, whether it be an executable file, +an object file, an assembler file or preprocessed C code. +.Sp +Since only one output file can be specified, it does not make sense to +use \fB\-o\fR when compiling more than one input file, unless you are +producing an executable file as output. +.Sp +If \fB\-o\fR is not specified, the default is to put an executable file +in \fIa.out\fR, the object file for \fI\fIsource\fI.\fIsuffix\fI\fR in +\&\fI\fIsource\fI.o\fR, its assembler file in \fI\fIsource\fI.s\fR, and +all preprocessed C source on standard output. +.IP "\fB\-v\fR" 4 +.IX Item "-v" +Print (on standard error output) the commands executed to run the stages +of compilation. Also print the version number of the compiler driver +program and of the preprocessor and the compiler proper. +.IP "\fB\-###\fR" 4 +.IX Item "-###" +Like \fB\-v\fR except the commands are not executed and all command +arguments are quoted. This is useful for shell scripts to capture the +driver-generated command lines. +.IP "\fB\-pipe\fR" 4 +.IX Item "-pipe" +Use pipes rather than temporary files for communication between the +various stages of compilation. This fails to work on some systems where +the assembler is unable to read from a pipe; but the \s-1GNU\s0 assembler has +no trouble. +.IP "\fB\-\-help\fR" 4 +.IX Item "--help" +Print (on the standard output) a description of the command line options +understood by \fBgcc\fR. If the \fB\-v\fR option is also specified +then \fB\-\-help\fR will also be passed on to the various processes +invoked by \fBgcc\fR, so that they can display the command line options +they accept. If the \fB\-W\fR option is also specified then command +line options which have no documentation associated with them will also +be displayed. +.IP "\fB\-\-target\-help\fR" 4 +.IX Item "--target-help" +Print (on the standard output) a description of target specific command +line options for each tool. +.IP "\fB\-\-version\fR" 4 +.IX Item "--version" +Display the version number and copyrights of the invoked \s-1GCC\s0. +.Sh "Compiling \*(C+ Programs" +.IX Subsection "Compiling Programs" +\&\*(C+ source files conventionally use one of the suffixes \fB.C\fR, +\&\fB.cc\fR, \fB.cpp\fR, \fB.c++\fR, \fB.cp\fR, or \fB.cxx\fR; +preprocessed \*(C+ files use the suffix \fB.ii\fR. \s-1GCC\s0 recognizes +files with these names and compiles them as \*(C+ programs even if you +call the compiler the same way as for compiling C programs (usually with +the name \fBgcc\fR). +.PP +However, \*(C+ programs often require class libraries as well as a +compiler that understands the \*(C+ language\-\-\-and under some +circumstances, you might want to compile programs from standard input, +or otherwise without a suffix that flags them as \*(C+ programs. +\&\fBg++\fR is a program that calls \s-1GCC\s0 with the default language +set to \*(C+, and automatically specifies linking against the \*(C+ +library. On many systems, \fBg++\fR is also +installed with the name \fBc++\fR. +.PP +When you compile \*(C+ programs, you may specify many of the same +command-line options that you use for compiling programs in any +language; or command-line options meaningful for C and related +languages; or options that are meaningful only for \*(C+ programs. +.Sh "Options Controlling C Dialect" +.IX Subsection "Options Controlling C Dialect" +The following options control the dialect of C (or languages derived +from C, such as \*(C+ and Objective\-C) that the compiler accepts: +.IP "\fB\-ansi\fR" 4 +.IX Item "-ansi" +In C mode, support all \s-1ISO\s0 C90 programs. In \*(C+ mode, +remove \s-1GNU\s0 extensions that conflict with \s-1ISO\s0 \*(C+. +.Sp +This turns off certain features of \s-1GCC\s0 that are incompatible with \s-1ISO\s0 +C90 (when compiling C code), or of standard \*(C+ (when compiling \*(C+ code), +such as the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, and +predefined macros such as \f(CW\*(C`unix\*(C'\fR and \f(CW\*(C`vax\*(C'\fR that identify the +type of system you are using. It also enables the undesirable and +rarely used \s-1ISO\s0 trigraph feature. For the C compiler, +it disables recognition of \*(C+ style \fB//\fR comments as well as +the \f(CW\*(C`inline\*(C'\fR keyword. +.Sp +The alternate keywords \f(CW\*(C`_\|_asm_\|_\*(C'\fR, \f(CW\*(C`_\|_extension_\|_\*(C'\fR, +\&\f(CW\*(C`_\|_inline_\|_\*(C'\fR and \f(CW\*(C`_\|_typeof_\|_\*(C'\fR continue to work despite +\&\fB\-ansi\fR. You would not want to use them in an \s-1ISO\s0 C program, of +course, but it is useful to put them in header files that might be included +in compilations done with \fB\-ansi\fR. Alternate predefined macros +such as \f(CW\*(C`_\|_unix_\|_\*(C'\fR and \f(CW\*(C`_\|_vax_\|_\*(C'\fR are also available, with or +without \fB\-ansi\fR. +.Sp +The \fB\-ansi\fR option does not cause non-ISO programs to be +rejected gratuitously. For that, \fB\-pedantic\fR is required in +addition to \fB\-ansi\fR. +.Sp +The macro \f(CW\*(C`_\|_STRICT_ANSI_\|_\*(C'\fR is predefined when the \fB\-ansi\fR +option is used. Some header files may notice this macro and refrain +from declaring certain functions or defining certain macros that the +\&\s-1ISO\s0 standard doesn't call for; this is to avoid interfering with any +programs that might use these names for other things. +.Sp +Functions which would normally be built in but do not have semantics +defined by \s-1ISO\s0 C (such as \f(CW\*(C`alloca\*(C'\fR and \f(CW\*(C`ffs\*(C'\fR) are not built-in +functions with \fB\-ansi\fR is used. +.IP "\fB\-std=\fR" 4 +.IX Item "-std=" +Determine the language standard. This option is currently only +supported when compiling C or \*(C+. A value for this option must be +provided; possible values are +.RS 4 +.IP "\fBc89\fR" 4 +.IX Item "c89" +.PD 0 +.IP "\fBiso9899:1990\fR" 4 +.IX Item "iso9899:1990" +.PD +\&\s-1ISO\s0 C90 (same as \fB\-ansi\fR). +.IP "\fBiso9899:199409\fR" 4 +.IX Item "iso9899:199409" +\&\s-1ISO\s0 C90 as modified in amendment 1. +.IP "\fBc99\fR" 4 +.IX Item "c99" +.PD 0 +.IP "\fBc9x\fR" 4 +.IX Item "c9x" +.IP "\fBiso9899:1999\fR" 4 +.IX Item "iso9899:1999" +.IP "\fBiso9899:199x\fR" 4 +.IX Item "iso9899:199x" +.PD +\&\s-1ISO\s0 C99. Note that this standard is not yet fully supported; see +<\fBhttp://gcc.gnu.org/gcc\-3.3/c99status.html\fR> for more information. The +names \fBc9x\fR and \fBiso9899:199x\fR are deprecated. +.IP "\fBgnu89\fR" 4 +.IX Item "gnu89" +Default, \s-1ISO\s0 C90 plus \s-1GNU\s0 extensions (including some C99 features). +.IP "\fBgnu99\fR" 4 +.IX Item "gnu99" +.PD 0 +.IP "\fBgnu9x\fR" 4 +.IX Item "gnu9x" +.PD +\&\s-1ISO\s0 C99 plus \s-1GNU\s0 extensions. When \s-1ISO\s0 C99 is fully implemented in \s-1GCC\s0, +this will become the default. The name \fBgnu9x\fR is deprecated. +.IP "\fBc++98\fR" 4 +.IX Item "c++98" +The 1998 \s-1ISO\s0 \*(C+ standard plus amendments. +.IP "\fBgnu++98\fR" 4 +.IX Item "gnu++98" +The same as \fB\-std=c++98\fR plus \s-1GNU\s0 extensions. This is the +default for \*(C+ code. +.RE +.RS 4 +.Sp +Even when this option is not specified, you can still use some of the +features of newer standards in so far as they do not conflict with +previous C standards. For example, you may use \f(CW\*(C`_\|_restrict_\|_\*(C'\fR even +when \fB\-std=c99\fR is not specified. +.Sp +The \fB\-std\fR options specifying some version of \s-1ISO\s0 C have the same +effects as \fB\-ansi\fR, except that features that were not in \s-1ISO\s0 C90 +but are in the specified version (for example, \fB//\fR comments and +the \f(CW\*(C`inline\*(C'\fR keyword in \s-1ISO\s0 C99) are not disabled. +.RE +.IP "\fB\-aux\-info\fR \fIfilename\fR" 4 +.IX Item "-aux-info filename" +Output to the given filename prototyped declarations for all functions +declared and/or defined in a translation unit, including those in header +files. This option is silently ignored in any language other than C. +.Sp +Besides declarations, the file indicates, in comments, the origin of +each declaration (source file and line), whether the declaration was +implicit, prototyped or unprototyped (\fBI\fR, \fBN\fR for new or +\&\fBO\fR for old, respectively, in the first character after the line +number and the colon), and whether it came from a declaration or a +definition (\fBC\fR or \fBF\fR, respectively, in the following +character). In the case of function definitions, a K&R\-style list of +arguments followed by their declarations is also provided, inside +comments, after the declaration. +.IP "\fB\-fno\-asm\fR" 4 +.IX Item "-fno-asm" +Do not recognize \f(CW\*(C`asm\*(C'\fR, \f(CW\*(C`inline\*(C'\fR or \f(CW\*(C`typeof\*(C'\fR as a +keyword, so that code can use these words as identifiers. You can use +the keywords \f(CW\*(C`_\|_asm_\|_\*(C'\fR, \f(CW\*(C`_\|_inline_\|_\*(C'\fR and \f(CW\*(C`_\|_typeof_\|_\*(C'\fR +instead. \fB\-ansi\fR implies \fB\-fno\-asm\fR. +.Sp +In \*(C+, this switch only affects the \f(CW\*(C`typeof\*(C'\fR keyword, since +\&\f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`inline\*(C'\fR are standard keywords. You may want to +use the \fB\-fno\-gnu\-keywords\fR flag instead, which has the same +effect. In C99 mode (\fB\-std=c99\fR or \fB\-std=gnu99\fR), this +switch only affects the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, since +\&\f(CW\*(C`inline\*(C'\fR is a standard keyword in \s-1ISO\s0 C99. +.IP "\fB\-fno\-builtin\fR" 4 +.IX Item "-fno-builtin" +.PD 0 +.IP "\fB\-fno\-builtin\-\fR\fIfunction\fR" 4 +.IX Item "-fno-builtin-function" +.PD +Don't recognize built-in functions that do not begin with +\&\fB_\|_builtin_\fR as prefix. +.Sp +\&\s-1GCC\s0 normally generates special code to handle certain built-in functions +more efficiently; for instance, calls to \f(CW\*(C`alloca\*(C'\fR may become single +instructions that adjust the stack directly, and calls to \f(CW\*(C`memcpy\*(C'\fR +may become inline copy loops. The resulting code is often both smaller +and faster, but since the function calls no longer appear as such, you +cannot set a breakpoint on those calls, nor can you change the behavior +of the functions by linking with a different library. +.Sp +With the \fB\-fno\-builtin\-\fR\fIfunction\fR option +only the built-in function \fIfunction\fR is +disabled. \fIfunction\fR must not begin with \fB_\|_builtin_\fR. If a +function is named this is not built-in in this version of \s-1GCC\s0, this +option is ignored. There is no corresponding +\&\fB\-fbuiltin\-\fR\fIfunction\fR option; if you wish to enable +built-in functions selectively when using \fB\-fno\-builtin\fR or +\&\fB\-ffreestanding\fR, you may define macros such as: +.Sp +.Vb 2 +\& #define abs(n) __builtin_abs ((n)) +\& #define strcpy(d, s) __builtin_strcpy ((d), (s)) +.Ve +.IP "\fB\-fhosted\fR" 4 +.IX Item "-fhosted" +Assert that compilation takes place in a hosted environment. This implies +\&\fB\-fbuiltin\fR. A hosted environment is one in which the +entire standard library is available, and in which \f(CW\*(C`main\*(C'\fR has a return +type of \f(CW\*(C`int\*(C'\fR. Examples are nearly everything except a kernel. +This is equivalent to \fB\-fno\-freestanding\fR. +.IP "\fB\-ffreestanding\fR" 4 +.IX Item "-ffreestanding" +Assert that compilation takes place in a freestanding environment. This +implies \fB\-fno\-builtin\fR. A freestanding environment +is one in which the standard library may not exist, and program startup may +not necessarily be at \f(CW\*(C`main\*(C'\fR. The most obvious example is an \s-1OS\s0 kernel. +This is equivalent to \fB\-fno\-hosted\fR. +.IP "\fB\-fms\-extensions\fR" 4 +.IX Item "-fms-extensions" +Accept some non-standard constructs used in Microsoft header files. +.IP "\fB\-trigraphs\fR" 4 +.IX Item "-trigraphs" +Support \s-1ISO\s0 C trigraphs. The \fB\-ansi\fR option (and \fB\-std\fR +options for strict \s-1ISO\s0 C conformance) implies \fB\-trigraphs\fR. +.IP "\fB\-no\-integrated\-cpp\fR" 4 +.IX Item "-no-integrated-cpp" +Performs a compilation in two passes: preprocessing and compiling. This +option allows a user supplied \*(L"cc1\*(R", \*(L"cc1plus\*(R", or \*(L"cc1obj\*(R" via the +\&\fB\-B\fR option. The user supplied compilation step can then add in +an additional preprocessing step after normal preprocessing but before +compiling. The default is to use the integrated cpp (internal cpp) +.Sp +The semantics of this option will change if \*(L"cc1\*(R", \*(L"cc1plus\*(R", and +\&\*(L"cc1obj\*(R" are merged. +.IP "\fB\-traditional\fR" 4 +.IX Item "-traditional" +.PD 0 +.IP "\fB\-traditional\-cpp\fR" 4 +.IX Item "-traditional-cpp" +.PD +Formerly, these options caused \s-1GCC\s0 to attempt to emulate a pre-standard +C compiler. They are now only supported with the \fB\-E\fR switch. +The preprocessor continues to support a pre-standard mode. See the \s-1GNU\s0 +\&\s-1CPP\s0 manual for details. +.IP "\fB\-fcond\-mismatch\fR" 4 +.IX Item "-fcond-mismatch" +Allow conditional expressions with mismatched types in the second and +third arguments. The value of such an expression is void. This option +is not supported for \*(C+. +.IP "\fB\-funsigned\-char\fR" 4 +.IX Item "-funsigned-char" +Let the type \f(CW\*(C`char\*(C'\fR be unsigned, like \f(CW\*(C`unsigned char\*(C'\fR. +.Sp +Each kind of machine has a default for what \f(CW\*(C`char\*(C'\fR should +be. It is either like \f(CW\*(C`unsigned char\*(C'\fR by default or like +\&\f(CW\*(C`signed char\*(C'\fR by default. +.Sp +Ideally, a portable program should always use \f(CW\*(C`signed char\*(C'\fR or +\&\f(CW\*(C`unsigned char\*(C'\fR when it depends on the signedness of an object. +But many programs have been written to use plain \f(CW\*(C`char\*(C'\fR and +expect it to be signed, or expect it to be unsigned, depending on the +machines they were written for. This option, and its inverse, let you +make such a program work with the opposite default. +.Sp +The type \f(CW\*(C`char\*(C'\fR is always a distinct type from each of +\&\f(CW\*(C`signed char\*(C'\fR or \f(CW\*(C`unsigned char\*(C'\fR, even though its behavior +is always just like one of those two. +.IP "\fB\-fsigned\-char\fR" 4 +.IX Item "-fsigned-char" +Let the type \f(CW\*(C`char\*(C'\fR be signed, like \f(CW\*(C`signed char\*(C'\fR. +.Sp +Note that this is equivalent to \fB\-fno\-unsigned\-char\fR, which is +the negative form of \fB\-funsigned\-char\fR. Likewise, the option +\&\fB\-fno\-signed\-char\fR is equivalent to \fB\-funsigned\-char\fR. +.IP "\fB\-fsigned\-bitfields\fR" 4 +.IX Item "-fsigned-bitfields" +.PD 0 +.IP "\fB\-funsigned\-bitfields\fR" 4 +.IX Item "-funsigned-bitfields" +.IP "\fB\-fno\-signed\-bitfields\fR" 4 +.IX Item "-fno-signed-bitfields" +.IP "\fB\-fno\-unsigned\-bitfields\fR" 4 +.IX Item "-fno-unsigned-bitfields" +.PD +These options control whether a bit-field is signed or unsigned, when the +declaration does not use either \f(CW\*(C`signed\*(C'\fR or \f(CW\*(C`unsigned\*(C'\fR. By +default, such a bit-field is signed, because this is consistent: the +basic integer types such as \f(CW\*(C`int\*(C'\fR are signed types. +.IP "\fB\-fwritable\-strings\fR" 4 +.IX Item "-fwritable-strings" +Store string constants in the writable data segment and don't uniquize +them. This is for compatibility with old programs which assume they can +write into string constants. +.Sp +Writing into string constants is a very bad idea; ``constants'' should +be constant. +.Sh "Options Controlling \*(C+ Dialect" +.IX Subsection "Options Controlling Dialect" +This section describes the command-line options that are only meaningful +for \*(C+ programs; but you can also use most of the \s-1GNU\s0 compiler options +regardless of what language your program is in. For example, you +might compile a file \f(CW\*(C`firstClass.C\*(C'\fR like this: +.PP +.Vb 1 +\& g++ -g -frepo -O -c firstClass.C +.Ve +.PP +In this example, only \fB\-frepo\fR is an option meant +only for \*(C+ programs; you can use the other options with any +language supported by \s-1GCC\s0. +.PP +Here is a list of options that are \fIonly\fR for compiling \*(C+ programs: +.IP "\fB\-fabi\-version=\fR\fIn\fR" 4 +.IX Item "-fabi-version=n" +Use version \fIn\fR of the \*(C+ \s-1ABI\s0. Version 1 is the version of the \*(C+ +\&\s-1ABI\s0 that first appeared in G++ 3.2. Version 0 will always be the +version that conforms most closely to the \*(C+ \s-1ABI\s0 specification. +Therefore, the \s-1ABI\s0 obtained using version 0 will change as \s-1ABI\s0 bugs are +fixed. +.Sp +The default is version 1. +.IP "\fB\-fno\-access\-control\fR" 4 +.IX Item "-fno-access-control" +Turn off all access checking. This switch is mainly useful for working +around bugs in the access control code. +.IP "\fB\-fcheck\-new\fR" 4 +.IX Item "-fcheck-new" +Check that the pointer returned by \f(CW\*(C`operator new\*(C'\fR is non-null +before attempting to modify the storage allocated. This check is +normally unnecessary because the \*(C+ standard specifies that +\&\f(CW\*(C`operator new\*(C'\fR will only return \f(CW0\fR if it is declared +\&\fB\f(BIthrow()\fB\fR, in which case the compiler will always check the +return value even without this option. In all other cases, when +\&\f(CW\*(C`operator new\*(C'\fR has a non-empty exception specification, memory +exhaustion is signalled by throwing \f(CW\*(C`std::bad_alloc\*(C'\fR. See also +\&\fBnew (nothrow)\fR. +.IP "\fB\-fconserve\-space\fR" 4 +.IX Item "-fconserve-space" +Put uninitialized or runtime-initialized global variables into the +common segment, as C does. This saves space in the executable at the +cost of not diagnosing duplicate definitions. If you compile with this +flag and your program mysteriously crashes after \f(CW\*(C`main()\*(C'\fR has +completed, you may have an object that is being destroyed twice because +two definitions were merged. +.Sp +This option is no longer useful on most targets, now that support has +been added for putting variables into \s-1BSS\s0 without making them common. +.IP "\fB\-fno\-const\-strings\fR" 4 +.IX Item "-fno-const-strings" +Give string constants type \f(CW\*(C`char *\*(C'\fR instead of type \f(CW\*(C`const +char *\*(C'\fR. By default, G++ uses type \f(CW\*(C`const char *\*(C'\fR as required by +the standard. Even if you use \fB\-fno\-const\-strings\fR, you cannot +actually modify the value of a string constant, unless you also use +\&\fB\-fwritable\-strings\fR. +.Sp +This option might be removed in a future release of G++. For maximum +portability, you should structure your code so that it works with +string constants that have type \f(CW\*(C`const char *\*(C'\fR. +.IP "\fB\-fdollars\-in\-identifiers\fR" 4 +.IX Item "-fdollars-in-identifiers" +Accept \fB$\fR in identifiers. You can also explicitly prohibit use of +\&\fB$\fR with the option \fB\-fno\-dollars\-in\-identifiers\fR. (\s-1GNU\s0 C allows +\&\fB$\fR by default on most target systems, but there are a few exceptions.) +Traditional C allowed the character \fB$\fR to form part of +identifiers. However, \s-1ISO\s0 C and \*(C+ forbid \fB$\fR in identifiers. +.IP "\fB\-fno\-elide\-constructors\fR" 4 +.IX Item "-fno-elide-constructors" +The \*(C+ standard allows an implementation to omit creating a temporary +which is only used to initialize another object of the same type. +Specifying this option disables that optimization, and forces G++ to +call the copy constructor in all cases. +.IP "\fB\-fno\-enforce\-eh\-specs\fR" 4 +.IX Item "-fno-enforce-eh-specs" +Don't check for violation of exception specifications at runtime. This +option violates the \*(C+ standard, but may be useful for reducing code +size in production builds, much like defining \fB\s-1NDEBUG\s0\fR. The compiler +will still optimize based on the exception specifications. +.IP "\fB\-fexternal\-templates\fR" 4 +.IX Item "-fexternal-templates" +Cause \fB#pragma interface\fR and \fBimplementation\fR to apply to +template instantiation; template instances are emitted or not according +to the location of the template definition. +.Sp +This option is deprecated. +.IP "\fB\-falt\-external\-templates\fR" 4 +.IX Item "-falt-external-templates" +Similar to \fB\-fexternal\-templates\fR, but template instances are +emitted or not according to the place where they are first instantiated. +.Sp +This option is deprecated. +.IP "\fB\-ffor\-scope\fR" 4 +.IX Item "-ffor-scope" +.PD 0 +.IP "\fB\-fno\-for\-scope\fR" 4 +.IX Item "-fno-for-scope" +.PD +If \fB\-ffor\-scope\fR is specified, the scope of variables declared in +a \fIfor-init-statement\fR is limited to the \fBfor\fR loop itself, +as specified by the \*(C+ standard. +If \fB\-fno\-for\-scope\fR is specified, the scope of variables declared in +a \fIfor-init-statement\fR extends to the end of the enclosing scope, +as was the case in old versions of G++, and other (traditional) +implementations of \*(C+. +.Sp +The default if neither flag is given to follow the standard, +but to allow and give a warning for old-style code that would +otherwise be invalid, or have different behavior. +.IP "\fB\-fno\-gnu\-keywords\fR" 4 +.IX Item "-fno-gnu-keywords" +Do not recognize \f(CW\*(C`typeof\*(C'\fR as a keyword, so that code can use this +word as an identifier. You can use the keyword \f(CW\*(C`_\|_typeof_\|_\*(C'\fR instead. +\&\fB\-ansi\fR implies \fB\-fno\-gnu\-keywords\fR. +.IP "\fB\-fno\-implicit\-templates\fR" 4 +.IX Item "-fno-implicit-templates" +Never emit code for non-inline templates which are instantiated +implicitly (i.e. by use); only emit code for explicit instantiations. +.IP "\fB\-fno\-implicit\-inline\-templates\fR" 4 +.IX Item "-fno-implicit-inline-templates" +Don't emit code for implicit instantiations of inline templates, either. +The default is to handle inlines differently so that compiles with and +without optimization will need the same set of explicit instantiations. +.IP "\fB\-fno\-implement\-inlines\fR" 4 +.IX Item "-fno-implement-inlines" +To save space, do not emit out-of-line copies of inline functions +controlled by \fB#pragma implementation\fR. This will cause linker +errors if these functions are not inlined everywhere they are called. +.IP "\fB\-fms\-extensions\fR" 4 +.IX Item "-fms-extensions" +Disable pedantic warnings about constructs used in \s-1MFC\s0, such as implicit +int and getting a pointer to member function via non-standard syntax. +.IP "\fB\-fno\-nonansi\-builtins\fR" 4 +.IX Item "-fno-nonansi-builtins" +Disable built-in declarations of functions that are not mandated by +\&\s-1ANSI/ISO\s0 C. These include \f(CW\*(C`ffs\*(C'\fR, \f(CW\*(C`alloca\*(C'\fR, \f(CW\*(C`_exit\*(C'\fR, +\&\f(CW\*(C`index\*(C'\fR, \f(CW\*(C`bzero\*(C'\fR, \f(CW\*(C`conjf\*(C'\fR, and other related functions. +.IP "\fB\-fno\-operator\-names\fR" 4 +.IX Item "-fno-operator-names" +Do not treat the operator name keywords \f(CW\*(C`and\*(C'\fR, \f(CW\*(C`bitand\*(C'\fR, +\&\f(CW\*(C`bitor\*(C'\fR, \f(CW\*(C`compl\*(C'\fR, \f(CW\*(C`not\*(C'\fR, \f(CW\*(C`or\*(C'\fR and \f(CW\*(C`xor\*(C'\fR as +synonyms as keywords. +.IP "\fB\-fno\-optional\-diags\fR" 4 +.IX Item "-fno-optional-diags" +Disable diagnostics that the standard says a compiler does not need to +issue. Currently, the only such diagnostic issued by G++ is the one for +a name having multiple meanings within a class. +.IP "\fB\-fpermissive\fR" 4 +.IX Item "-fpermissive" +Downgrade some diagnostics about nonconformant code from errors to +warnings. Thus, using \fB\-fpermissive\fR will allow some +nonconforming code to compile. +.IP "\fB\-frepo\fR" 4 +.IX Item "-frepo" +Enable automatic template instantiation at link time. This option also +implies \fB\-fno\-implicit\-templates\fR. +.IP "\fB\-fno\-rtti\fR" 4 +.IX Item "-fno-rtti" +Disable generation of information about every class with virtual +functions for use by the \*(C+ runtime type identification features +(\fBdynamic_cast\fR and \fBtypeid\fR). If you don't use those parts +of the language, you can save some space by using this flag. Note that +exception handling uses the same information, but it will generate it as +needed. +.IP "\fB\-fstats\fR" 4 +.IX Item "-fstats" +Emit statistics about front-end processing at the end of the compilation. +This information is generally only useful to the G++ development team. +.IP "\fB\-ftemplate\-depth\-\fR\fIn\fR" 4 +.IX Item "-ftemplate-depth-n" +Set the maximum instantiation depth for template classes to \fIn\fR. +A limit on the template instantiation depth is needed to detect +endless recursions during template class instantiation. \s-1ANSI/ISO\s0 \*(C+ +conforming programs must not rely on a maximum depth greater than 17. +.IP "\fB\-fuse\-cxa\-atexit\fR" 4 +.IX Item "-fuse-cxa-atexit" +Register destructors for objects with static storage duration with the +\&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR function rather than the \f(CW\*(C`atexit\*(C'\fR function. +This option is required for fully standards-compliant handling of static +destructors, but will only work if your C library supports +\&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR. +.IP "\fB\-fvtable\-gc\fR" 4 +.IX Item "-fvtable-gc" +Emit special relocations for vtables and virtual function references +so that the linker can identify unused virtual functions and zero out +vtable slots that refer to them. This is most useful with +\&\fB\-ffunction\-sections\fR and \fB\-Wl,\-\-gc\-sections\fR, in order to +also discard the functions themselves. +.Sp +This optimization requires \s-1GNU\s0 as and \s-1GNU\s0 ld. Not all systems support +this option. \fB\-Wl,\-\-gc\-sections\fR is ignored without \fB\-static\fR. +.IP "\fB\-fno\-weak\fR" 4 +.IX Item "-fno-weak" +Do not use weak symbol support, even if it is provided by the linker. +By default, G++ will use weak symbols if they are available. This +option exists only for testing, and should not be used by end\-users; +it will result in inferior code and has no benefits. This option may +be removed in a future release of G++. +.IP "\fB\-nostdinc++\fR" 4 +.IX Item "-nostdinc++" +Do not search for header files in the standard directories specific to +\&\*(C+, but do still search the other standard directories. (This option +is used when building the \*(C+ library.) +.PP +In addition, these optimization, warning, and code generation options +have meanings only for \*(C+ programs: +.IP "\fB\-fno\-default\-inline\fR" 4 +.IX Item "-fno-default-inline" +Do not assume \fBinline\fR for functions defined inside a class scope. + Note that these +functions will have linkage like inline functions; they just won't be +inlined by default. +.IP "\fB\-Wabi\fR (\*(C+ only)" 4 +.IX Item "-Wabi ( only)" +Warn when G++ generates code that is probably not compatible with the +vendor-neutral \*(C+ \s-1ABI\s0. Although an effort has been made to warn about +all such cases, there are probably some cases that are not warned about, +even though G++ is generating incompatible code. There may also be +cases where warnings are emitted even though the code that is generated +will be compatible. +.Sp +You should rewrite your code to avoid these warnings if you are +concerned about the fact that code generated by G++ may not be binary +compatible with code generated by other compilers. +.Sp +The known incompatibilities at this point include: +.RS 4 +.IP "*" 4 +Incorrect handling of tail-padding for bit\-fields. G++ may attempt to +pack data into the same byte as a base class. For example: +.Sp +.Vb 2 +\& struct A { virtual void f(); int f1 : 1; }; +\& struct B : public A { int f2 : 1; }; +.Ve +.Sp +In this case, G++ will place \f(CW\*(C`B::f2\*(C'\fR into the same byte +as\f(CW\*(C`A::f1\*(C'\fR; other compilers will not. You can avoid this problem +by explicitly padding \f(CW\*(C`A\*(C'\fR so that its size is a multiple of the +byte size on your platform; that will cause G++ and other compilers to +layout \f(CW\*(C`B\*(C'\fR identically. +.IP "*" 4 +Incorrect handling of tail-padding for virtual bases. G++ does not use +tail padding when laying out virtual bases. For example: +.Sp +.Vb 3 +\& struct A { virtual void f(); char c1; }; +\& struct B { B(); char c2; }; +\& struct C : public A, public virtual B {}; +.Ve +.Sp +In this case, G++ will not place \f(CW\*(C`B\*(C'\fR into the tail-padding for +\&\f(CW\*(C`A\*(C'\fR; other compilers will. You can avoid this problem by +explicitly padding \f(CW\*(C`A\*(C'\fR so that its size is a multiple of its +alignment (ignoring virtual base classes); that will cause G++ and other +compilers to layout \f(CW\*(C`C\*(C'\fR identically. +.IP "*" 4 +Incorrect handling of bit-fields with declared widths greater than that +of their underlying types, when the bit-fields appear in a union. For +example: +.Sp +.Vb 1 +\& union U { int i : 4096; }; +.Ve +.Sp +Assuming that an \f(CW\*(C`int\*(C'\fR does not have 4096 bits, G++ will make the +union too small by the number of bits in an \f(CW\*(C`int\*(C'\fR. +.IP "*" 4 +Empty classes can be placed at incorrect offsets. For example: +.Sp +.Vb 1 +\& struct A {}; +.Ve +.Sp +.Vb 4 +\& struct B { +\& A a; +\& virtual void f (); +\& }; +.Ve +.Sp +.Vb 1 +\& struct C : public B, public A {}; +.Ve +.Sp +G++ will place the \f(CW\*(C`A\*(C'\fR base class of \f(CW\*(C`C\*(C'\fR at a nonzero offset; +it should be placed at offset zero. G++ mistakenly believes that the +\&\f(CW\*(C`A\*(C'\fR data member of \f(CW\*(C`B\*(C'\fR is already at offset zero. +.IP "*" 4 +Names of template functions whose types involve \f(CW\*(C`typename\*(C'\fR or +template template parameters can be mangled incorrectly. +.Sp +.Vb 2 +\& template +\& void f(typename Q::X) {} +.Ve +.Sp +.Vb 2 +\& template