Files
oldlinux-files/docs/Install-Guide/install-guide-2.2.2/node144.html
2024-02-19 00:23:35 -05:00

46 lines
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>3.12.7 Saving files and quitting vi</TITLE>
</HEAD>
<BODY>
<meta name="description" value="3.12.7 Saving files and quitting vi">
<meta name="keywords" value="gs">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<BR> <HR><A NAME=tex2html3579 HREF="node145.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3577 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3571 HREF="node143.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3581 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3582 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3580 HREF="node145.html">3.12.8 Editing another file</A>
<B>Up:</B> <A NAME=tex2html3578 HREF="node137.html">3.12 Using the vi </A>
<B> Previous:</B> <A NAME=tex2html3572 HREF="node143.html">3.12.6 Moving commands</A>
<BR> <HR> <P>
<H2><A NAME=SECTION005127000000000000000>3.12.7 Saving files and quitting vi</A></H2>
<P>
<A NAME=3956>&#160;</A>
<A NAME=3957>&#160;</A>
<A NAME=3958>&#160;</A>
To quit <tt>vi</tt> without making changes to the file, use the
command <tt>:q!</tt>. When you type the ``<tt>:</tt>'', the cursor will move
to the last line on the screen; you'll be in last line mode.
<P><TT> <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img232.gif"> <P></TT>
In last line mode, certain extended commands are available. One of them
is <tt>q!</tt>, which quits <tt>vi</tt> without saving. The command <tt>:wq</tt>
saves the file and then exits <tt>vi</tt>. The command <tt>ZZ</tt> (from
command mode, without the ``<tt>:</tt>'') is equivalent to <tt>:wq</tt>.
Remember that you must press <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img233.gif"> after a command entered
in last line mode.
<P>
To save the file without quitting vi, just use <tt>:w</tt>.
<P>
<BR> <HR><A NAME=tex2html3579 HREF="node145.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3577 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3571 HREF="node143.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3581 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3582 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3580 HREF="node145.html">3.12.8 Editing another file</A>
<B>Up:</B> <A NAME=tex2html3578 HREF="node137.html">3.12 Using the vi </A>
<B> Previous:</B> <A NAME=tex2html3572 HREF="node143.html">3.12.6 Moving commands</A>
<BR> <HR> <P>
<BR> <HR>
<P><ADDRESS>
<I>Matt Welsh <BR>
mdw@sunsite.unc.edu</I>
</ADDRESS>
</BODY>