Announcement

Collapse
No announcement yet.

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

Collapse

Ads on showthread pages

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

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

    WordPress Hosting on SSD Servers
    Hello All,

    In order to move or rename file or folder in Linux 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 admin; 07-29-2015, 10:50 AM.
Working...
X
Sign up for a News Letter Click here to sign up