Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Mv (Unix)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Name clashing== When a file is moved to a path that specifies an existing file, the existing file is [[clobbering|clobbered]] by default. If the existing file is not writable but is in a directory that is writable, the command prompts the user to confirm overwrite (if run from a terminal), unless the {{code|-f}} option is included. Accidental overwriting can be prevented using the GNU implementation <code>-n</code> (long format: <code>--no-clobber</code>) option. Alternatively, <code>-u</code> (<code>--update</code>) only overwrites destination files that are older than source files, <code>-i</code> (<code>--interactive</code>) asks for confirmation upon each name conflict, and <code>-b</code> (<code>--backup</code>) renames target files to prevent overwrite. Ambiguity arises when a file is moved to a path that specifies an existing directory. By default, <code>mv</code> handles this by moving the file inside the directory. The GNU implementation has a {{code|-T}} switch for that tries to overwrite the directory instead. An inverse {{code|-t}} makes the move-to-directory operation explicit.<ref name=gnu>{{man|1|mv|ManKier}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)