Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
mv
mv [option] sources
						target

Move or rename files and directories. The source (first column) and target (second column) determine the result (third column):

Source Target Result
File name (nonexistent) Rename file to name.
File Existing file Overwrite existing file with source file.
Directory name (nonexistent) Rename directory to name.
Directory Existing directory Move directory to be a subdirectory of existing directory.
One or more files Existing directory Move files to directory.


The mv command is often aliased as mv -i in the .bashrc file, especially for the root account, to prevent inadvertently overwriting files.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial