Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

Linux / Unix mv command

Quick links

About mv
Syntax
Examples
Related commands
Linux / Unix main page

About mv

Renames a file or moves it from one directory to another directory.

Syntax

mv [-f] [-i] oldname newname

-f mv will move the file(s) without prompting even if it is writing over an existing target. Note that this is the default if the standard input is not a terminal.
-i Prompts before overwriting another file.
oldname The oldname of the file renaming.
newname The newname of the file renaming.
filename The name of the file you want to move directory - The directory of were you want the file to go.

Examples

mv myfile.txt newdirectory/ - moves the file myfile.txt to the directory newdirectory.

mv myfile.txt ../ - moves the file myfile.txt back one directory (if available).

Related commands

copy
cp

cpio
ln
rm
setfacl

 

Index

Category:
Linux / Unix

Companies:
Click here

Related Pages:

 

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope