MV Command: How to move file/folder in Linux?

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Shane
    Senior Member
    • Jun 2006
    • 264

    MV Command: How to move file/folder in Linux?

    Hello All,

    In order to move or rename file or folder in Linux VPS, one needs to execute mv command. Below mentioned are the details of it like syntax, example to execute command:

    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 name of file or folder needs to move
    newname The name of the file or folder after moving to destination.

    filename The name of the file one want to move
    directory - The name of directory one want the file to go.

    Example:

    mv shane.tar.gz shane/

    It will move the zip file shane.tar.gz to the shane directory.

    Thanks,

    Shane
    Accuwebhosting.com
    Last edited by Marc_AccuWebHosting; 01-01-2018, 05:25 PM.
Working...
X