2018-11-09 11:47:59 +00:00
|
|
|
---
|
|
|
|
layout: page
|
2018-11-10 21:05:37 +00:00
|
|
|
category-page: fs
|
|
|
|
category-title: FileSystem
|
|
|
|
tags: directory list move rename
|
2018-11-09 11:47:59 +00:00
|
|
|
author: Mattia Hijman
|
|
|
|
title: mv
|
|
|
|
---
|
2018-11-12 10:47:50 +00:00
|
|
|
<p>
|
|
|
|
The <code>mv</code> command is used to move a file from a given path to another.
|
|
|
|
It can also be used to rename a file by moving it into the same directory,
|
|
|
|
but with a different name.<br>
|
2018-11-10 21:05:37 +00:00
|
|
|
It stands for <i>MoVe</i>.
|
2018-11-09 11:47:59 +00:00
|
|
|
|
2018-11-10 21:05:37 +00:00
|
|
|
<pre>
|
|
|
|
mv [-finv] source target
|
|
|
|
</pre>
|
2018-11-09 11:47:59 +00:00
|
|
|
|
2018-11-12 10:47:50 +00:00
|
|
|
<h3>Flags</h3>
|
2018-11-09 11:47:59 +00:00
|
|
|
|
|
|
|
<ul>
|
2018-11-10 21:05:37 +00:00
|
|
|
<li> <b>-f</b>: Do not prompt for confirmation before overwriting the
|
|
|
|
destination path.</li>
|
|
|
|
<li> <b>-i</b>: Asks user confirmation before proceeding.</li>
|
|
|
|
<li> <b>-n</b>: Do not overwrite an existing file.</li>
|
|
|
|
<li> <b>-v</b>: Cause mv to be verbose, showing files after they are moved.</li>
|
2018-11-09 11:47:59 +00:00
|
|
|
</ul>
|