NAME

mv - move files and/or directories


SYNOPSIS

mv [ -fiv ] source_file target_file

mv [ -fiv ] source... target_dir


DESCRIPTION

The mv utility moves the source files/directories to the target. If the target is a file you may only specify one file as the source. <B>mv will not move a file onto itself nor move a parent directory into a sub-directory. If source and target are on the same filesystem a simple rename is attempted, otherwise, what amounts to a copy followed by a remove is done.


OPTIONS

-f Force move if possible (DEFAULT)

-i Prompt for confirmation whenever the move would overwrite an existing target.

-v Verbose. Echo ``mv source target'' before move is done.

Specifying both -f and -i options is not considered an error. The -f option will override the -i option.


BUGS

mv has no known bugs, but be aware that the current move mode is binary mode.


EXIT STATUS

0 = All input sources were moved successfully.


REVISION HISTORY

$Revision: 1.5 $

$Log: mv.pl,v $ Revision 1.5 1999/03/27 12:58:21 schumacks Fix for Windows when target doesn't exist and source is a file

Revision 1.4 1999/03/27 12:00:23 schumacks Try to preserve file attributes. Binary mode is default.

Revision 1.3 1999/03/24 05:57:19 schumacks Cleaned up for release to PPT Added ``verbose'' switch I thought would be nice

Revision 1.2 1999/03/23 12:34:56 schumacks added some fixes for Windows

Revision 1.1 1999/03/23 11:03:42 schumacks Initial revision


AUTHOR

This Perl implementation of mv was written by <A HREF=``mailto:schumacks@att.net''>Ken Schumack</A> for the <A HREF=``http://language.perl.com/ppt/''>Perl Power Tools project</A>


COPYRIGHT and LICENSE

This program is copyright by Ken Schumack 1999.

This program is free and open software. You may use, modify, distribute and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same.