27.04.2009
8> mv command.
SUMMERY:
The Linux command ‘mv‘ can be use to rename files or to rename directory in Linux system. The ‘mv‘ command also can be use to moving the files or to moving directory to different directory. The ‘mv‘ command can be interpret as copying and then deleting the files or directory but this is done in much faster paste than manually copying and then deleting the files or folder.
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. |
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).