📄 0128-0130.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>
</HEAD>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311046 //-->
<!-- TITLE=Linux Complete Command Reference//-->
<!-- AUTHOR=Red Hat//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=01 //-->
<!-- PAGES=0001-0736 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0126-0127.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0131-0131.html">Next</A></CENTER></P>
<A NAME="PAGENUM-128"><P>Page 128</P></A>
<TABLE>
<TR><TD>
SHELL
</TD><TD>
Optional. The SHELL variable sets the default value for the
shell option, which determines which shell program is used to perform wildcard expansion in filenames, and also which is used to
execute filters or external programs. The default value on UNIX systems is
/bin/sh.
</TD></TR><TR><TD>
</TD><TD>
Note: Under MS-DOS, this variable is called
COMSPEC instead of SHELL.
</TD></TR><TR><TD>
HOME
</TD><TD>
This variable should be set to the name of your home directory.
elvis looks for its initialization file there; if
HOME is unset, then the initialization file will not be executed.
</TD></TR><TR><TD>
TAGPATH
</TD><TD>
Optional. This variable is used by the
ref program, which is invoked by the shift-K,
control-], and :tag commands. See ref for more information.
</TD></TR><TR><TD>
TMP, TEMP
</TD><TD>
These optional environment variables are only used in non-UNIX versions of
elvis. They allow you to supply a directory name to be used for storing temporary files.
</TD></TR></TABLE>
<P><B>
SEE ALSO
</P></B>
<P>ctags(1), ref(1), elvprsv(1), elvrec(1)</P>
<P>Elvis—A Clone of Vi/Ex, the complete elvis documentation.
</P>
<P><B>
BUGS
</P></B>
<P>There is no Lisp support. Certain other features are missing, too.
</P>
<P>Auto-indent mode is not quite compatible with the real
vi. Among other things, 0^D and ^^D don't do what you
might expect.
</P>
<P>Long lines are displayed differently. The real
vi wraps long lines onto multiple rows of the screen, but
elvis scrolls sideways.
</P>
<P><B>
AUTHOR
</P></B>
<P>Steve Kirkendall (kirkenda@cs.pdx.edu)
</P>
<P>Many other people have worked to port elvis to various operating systems. To see who deserves credit, run the
:version command from within elvis, or look in the system-specific section of the complete documentation.
</P>
<H3><A NAME="ch01_ 61">
elvprsv
</A></H3>
<P>elvprsv—Preserve the modified version of a file after a crash</P>
<P><B>
SYNOPSIS
</B></P>
<!-- CODE SNIP //-->
<PRE>
elvprsv ["_why elvis died"] /tmp/filename...
elvprsv -R /tmp/filename...
</PRE>
<!-- END CODE SNIP //-->
<P><B>
DESCRIPTION
</B></P>
<P>elvprsv preserves your edited text after elvis dies. The text can be recovered later, via the
elvprsv program.
</P>
<P>For UNIX-like systems, you should never need to run this program from the command line. It is run automatically
when elvis is about to die, and it should be run (via
/etc/rc) when the computer is booted. THAT'S ALL!
</P>
<P>For non-UNIX systems such as MS-DOS or VMS, you can either use
elvprsv the same way as under UNIX systems (by running it from your
AUTOEXEC.BAT file), or you can run it separately with the
-R flag to recover the files in one step.
</P>
<P>If you're editing a file when elvis dies (due to a bug, system crash, power failure, and so on), then
elvprsv will preserve the most recent version of your text. The preserved text is stored in a special directory; it does not overwrite your text
file automatically. (If the preservation directory hasn't been set up correctly, then
elvprsv will simply send you a mail message describing how to manually run
elvprsv.)
</P>
<P>elvprsv will send mail to any user whose work it preserves, if your operating system normally supports mail.
</P>
<A NAME="PAGENUM-129"><P>Page 129</P></A>
<P><B>
FILES
</B></P>
<TABLE>
<TR><TD>
/tmp/elv*
</TD><TD>
The temporary file that elvis was using when it died.
</TD></TR><TR><TD>
/usr/preserve/p*
</TD><TD>
The text that is preserved by elvprsv.
</TD></TR><TR><TD>
/usr/preserve/Index
</TD><TD>
A text file which lists the names of all preserved files, and the names of the
/usr/preserve/p* files that contain their preserved text.
</TD></TR></TABLE>
<P><B>
BUGS
</P></B>
<P>Due to the permissions on the /usr/preserve directory, on UNIX systems
elvprsv must be run as superuser. This is accomplished by making the
elvprsv executable be owned by root and turning on its "set user id" bit.
<P>If you're editing a nameless buffer when elvis dies, then
elvprsv will pretend that the file was named foo.
</P>
<P><B>
AUTHOR
</B></P>
<P>Steve Kirkendall (kirkenda@cs.pdx.edu)</P>
<H3><A NAME="ch01_ 62">
elvrec
</A></H3>
<P>elvrec— Recover the modified version of a file after a crash</P>
<P><B>
SYNOPSIS
</B></P>
<!-- CODE SNIP //-->
<PRE>
elvrec [preservedfile [newfile]]
</PRE>
<!-- END CODE SNIP //-->
<P><B>
DESCRIPTION
</B></P>
<P>If you're editing a file when elvis dies, the system crashes, or power fails, the most recent version of your text will
be preserved. The preserved text is stored in a special directory; it does not overwrite your text file automatically.
</P>
<P>The elvrec program locates the preserved version of a given file, and writes it over the top of your text file—or to a new
file, if you prefer. The recovered file will have nearly all of your changes.
</P>
<P>To see a list of all recoverable files, run elvrec with no arguments.
</P>
<P>
<P>
<P>
<P>
<P>
<CENTER>
<TABLE BGCOLOR="#FFFF99">
<TR><TD><B>
NOTE
</B></TD></TR>
<TR><TD>
<BLOCKQUOTE>
If you haven't set up a directory for file preservation, you'll have to manually run the
elvprsv program instead of elvrec.
</BLOCKQUOTE></TD></TR>
</TABLE></CENTER>
</P>
<P><B>
FILES
</B></P>
<TABLE>
<TR><TD>
/usr/preserve/p*
</TD><TD>
The text that was preserved when elvis died.
</TD></TR><TR><TD>
/usr/preserve/Index
</TD><TD>
A text file that lists the names of all preserved files, and the names of the
/usr/preserve/p* files that contain their preserved text.
</TD></TR></TABLE>
<P><B>
BUGS
</B></P>
<P>elvrec is very picky about filenames. You must tell it to recover the file using exactly the same pathname as when you
were editing it. The simplest way to do this is to go into the same directory that you were editing, and invoke
elvrec with the same filename as elvis. If that doesn't work, then try running
elvrec with no arguments, to see exactly which pathname it
is using for the desired file.
</P>
<P>Due to the permissions on the /usr/preserve directory, on UNIX systems
elvrec must be run as superuser. This is accomplished by making the
elvrec executable be owned by root and setting its "set user id" bit.
</P>
<P>If you're editing a nameless buffer when elvis dies, then
elvrec will pretend that the file was named foo.
</P>
<A NAME="PAGENUM-130"><P>Page 130</P></A>
<P><B>
AUTHOR
</B></P>
<P>Steve Kirkendall (kirkenda@cs.pdx.edu)
</P>
<H3><A NAME="ch01_ 63">
emacs
</A></H3>
<P>emacs—GNU project emacs
</P>
<P><B>
SYNOPSIS
</B></P>
<!-- CODE SNIP //-->
<PRE>
emacs [ command-line switches ] [ files ... ]
</PRE>
<!-- END CODE SNIP //-->
<P><B>
DESCRIPTION
</B></P>
<P>GNU emacs is a version of emacs, written by the author of the original (PDP-10)
emacs, Richard Stallman.
</P>
<P>The primary documentation of GNU emacs is in the
GNU Emacs Manual, which you can read online 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.
</P>
<P>The user functionality of GNU emacs encompasses everything other
emacs editors do, and it is easily extensible since
its editing commands are written in Lisp.
</P>
<P>emacs has an extensive interactive help facility, but the facility assumes that you know how to manipulate
emacs windows and buffers. Ctrl+h (backspace or Ctrl+h) enters the Help facility. Help Tutorial (Ctrl+h t) requests an interactive tutorial
that can teach beginners the fundamentals of 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.
</P>
<P>emacs's Undo can undo several steps of modification to your buffers, so it is easy to recover from editing mistakes.
</P>
<P>GNU emacs's many special packages handle mail reading
(RMail) and sending (Mail), outline editing
(Outline), compiling (Compile), running subshells within
emacs windows (Shell), running a Lisp read-eval-print loop
(Lisp-Interaction-Mode), and automated psychotherapy
(Doctor).
</P>
<P>There is an extensive reference manual, but users of other
emacses should have little trouble adapting even without a
copy. Users new to emacs will be able to use basic features fairly rapidly by studying the tutorial and using the
self-documentation features.
</P>
<P><B>
OPTIONS
</B></P>
<P>The following options are of general interest:
</P>
<TABLE>
<TR><TD>
file
</TD><TD>
Edit file.
</TD></TR><TR><TD>
+number
</TD><TD>
Go to the line specified by number (do not insert a space between the
+ sign and the number).
</TD></TR><TR><TD>
_q
</TD><TD>
Do not load an init file.
</TD></TR><TR><TD>
_u user
</TD><TD>
Load user's init file.
</TD></TR><TR><TD>
_t file
</TD><TD>
Use specified file as the terminal instead of using
stdin/stdout. This must be the first argument
specified in the command line.
</TD></TR></TABLE>
<P>The following options are Lisp-oriented (these options are processed in the order encountered):
</P>
<TABLE>
<TR><TD>
_f function
</TD><TD>
Execute the Lisp function
function.
</TD></TR><TR><TD>
_l file
</TD><TD>
Load the Lisp code in the file file.
</TD></TR></TABLE>
<P>The following options are useful when running
emacs as a batch editor:
</P>
<TABLE>
<TR><TD>
_batch
</TD><TD>
Edit in batch mode. The editor will send messages to
stdout. 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.
</TD></TR><TR><TD>
_kill
</TD><TD>
Exit emacs while in batch mode.
</TD></TR></TABLE>
<P><CENTER>
<a href="0126-0127.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0131-0131.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -