mv—moves or renames files

mv [options] source dest
mv [options] source… directory
Options:
[-bfiuv] [-S  backup-suffix] [-V {numbered,existing,simple}]
[--backup] [--force] [--interactive] [--update] [--verbose]
[--suffix=backup-suffix]
[--version-control={numbered,existing,simple}] [--help][--version]

The mv command moves a source filename to a target filename. The filename and the target may not have the same name. If target is not a directory, only one file may be specified before it; if it is a directory, more than one file may be specified. If target does not exist, mv creates a file named target. If target exists and is not a directory, its contents are overwritten. If target is a directory, the file(s) are moved to that directory.

Example A.40.
1  mv file1 newname
2  mv -i test1 test2 train
				

Explanation

  1. Renames file1 to newname. If newname exists, its contents are overwritten.

  2. Moves files test1 and test2 to the train directory. The -i switch is for interactive mode, meaning it asks first before moving the files.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.113.55