102 lines
2.8 KiB
HTML
102 lines
2.8 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||
|
<meta http-equiv="Content-Type" content=
|
||
|
"text/html; charset=utf-8">
|
||
|
<title>mv - Move files</title>
|
||
|
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</HEAD>
|
||
|
<body bgcolor="#FFFFFF">
|
||
|
<!-- Java sync-link -->
|
||
|
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
||
|
|
||
|
|
||
|
|
||
|
<h2>mv - Move files</h2>
|
||
|
|
||
|
<strong>Synopsis</strong>
|
||
|
|
||
|
<p><strong>mv [-f | -i]</strong> <em>source_file
|
||
|
target_file</em></p>
|
||
|
|
||
|
<p><strong>mv [-f | -i]</strong> <em>source_file ...
|
||
|
target_dir</em></p>
|
||
|
|
||
|
<p><strong>Description</strong></p>
|
||
|
|
||
|
<p>In its first form, the <strong>mv</strong> utility renames the
|
||
|
file named by the <em>source_file</em> operand to the destination
|
||
|
path named by the <em>target_file</em> operand. This form is
|
||
|
assumed when the last operand does not name an already existing
|
||
|
directory.</p>
|
||
|
|
||
|
<p>In its second form, <strong>mv</strong> moves each file named by
|
||
|
a <em>source_file</em> operand to a destination file in the
|
||
|
existing directory named by the <em>target_dir</em> operand. The
|
||
|
destination path for each <em>source_file</em> operand is the path
|
||
|
name produced by the concatenation of <em>target_dir</em>, a slash,
|
||
|
and the final path name component from <em>source_file</em>.</p>
|
||
|
|
||
|
<p>It is an error for either the <em>source_file</em> operand or
|
||
|
the destination path to specify a directory except when both are
|
||
|
directories.</p>
|
||
|
|
||
|
<p>If the destination path does not have a mode which permits
|
||
|
writing, <strong>mv</strong> prompts the user for confirmation as
|
||
|
specified for the <strong>-i</strong> option.</p>
|
||
|
|
||
|
<p><strong>Options</strong></p>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>-f</strong></dt>
|
||
|
|
||
|
<dd>Do not prompt for confirmation before overwriting the
|
||
|
destination path. The <strong>-i</strong> option is ignored if the
|
||
|
<strong>-f</strong> option is specified.</dd>
|
||
|
|
||
|
<dt><strong>-i</strong></dt>
|
||
|
|
||
|
<dd>Write a prompt to standard error before moving a file that
|
||
|
would overwrite an existing file. If the response from the standard
|
||
|
input begins with the first character for the YES response in the
|
||
|
current locale, the move is attempted.</dd>
|
||
|
</dl>
|
||
|
|
||
|
<p><strong>Exit Status</strong></p>
|
||
|
|
||
|
<ul>
|
||
|
<li>0 on success</li>
|
||
|
|
||
|
<li>>0 if an error occurs</li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>Related information</strong></p>
|
||
|
|
||
|
<ul>
|
||
|
<li><a href="cp.htm">cp - Copy files</a></li>
|
||
|
|
||
|
<li><a href="ln.htm">ln - Link files</a></li>
|
||
|
|
||
|
<li><a href="ls.htm">ls - List directory contents</a></li>
|
||
|
|
||
|
<li><a href="rm.htm">rm - Remove directory entries</a></li>
|
||
|
</ul>
|
||
|
|
||
|
<strong>Examples</strong>
|
||
|
|
||
|
<ol>
|
||
|
<li>Move the file "perl5" into the directory "/usr/bin" and prompt
|
||
|
the user to overwrite if the file exists.
|
||
|
|
||
|
<pre>
|
||
|
mv -i perl5 /usr/bin
|
||
|
</pre>
|
||
|
</li>
|
||
|
</ol>
|
||
|
|
||
|
<!-- end ibmbody========================================================= -->
|
||
|
</body>
|
||
|
</html>
|
||
|
|