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

52 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.3.5 Moving files</TITLE>
</HEAD>
<BODY>
<meta name="description" value="3.3.5 Moving files">
<meta name="keywords" value="gs">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<BR> <HR><A NAME=tex2html3168 HREF="node112.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3166 HREF="node106.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3160 HREF="node110.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3170 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3171 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3169 HREF="node112.html">3.3.6 Deleting files and </A>
<B>Up:</B> <A NAME=tex2html3167 HREF="node106.html">3.3 First Steps into </A>
<B> Previous:</B> <A NAME=tex2html3161 HREF="node110.html">3.3.4 Copying files</A>
<BR> <HR> <P>
<H2><A NAME=SECTION00535000000000000000>3.3.5 Moving files</A></H2>
<P>
<A NAME=2278>&#160;</A>
<A NAME=2279>&#160;</A>
<A NAME=2360>&#160;</A>
A new command named <tt>mv</tt> moves files, instead of copying them.
The syntax is very straightforward.
<P>
<P><TT> /home/larry/foo# <em>mv termcap sells</em> <BR>
/home/larry/foo# <em>ls -F</em> <BR>
bells sells shells <BR>
/home/larry/foo#
<P></TT>
<P>
Notice how <tt>termcap</tt> no longer exists, but in its place is
the file <tt>sells</tt>. This can be used to rename files, as we have
just done, but also to move a file to a completely new directory.
<P>
<IMG ALIGN=BOTTOM ALT="(WARN)" SRC="bdt.gif"><b>Note:</b> <tt>mv</tt> and <tt>cp</tt> will overwrite
the destination file (if it already exists) without asking you. Be careful
when you move a
file into another directory: there may already be a file with the same
name in that directory, which you'll overwrite!
<P>
<BR> <HR><A NAME=tex2html3168 HREF="node112.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3166 HREF="node106.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3160 HREF="node110.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3170 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3171 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3169 HREF="node112.html">3.3.6 Deleting files and </A>
<B>Up:</B> <A NAME=tex2html3167 HREF="node106.html">3.3 First Steps into </A>
<B> Previous:</B> <A NAME=tex2html3161 HREF="node110.html">3.3.4 Copying files</A>
<BR> <HR> <P>
<BR> <HR>
<P><ADDRESS>
<I>Matt Welsh <BR>
mdw@sunsite.unc.edu</I>
</ADDRESS>
</BODY>