Support -f for mv
At the moment this does nothing as we do not check anyway.
This commit is contained in:
parent
8c87c20054
commit
82bff35228
6
mv.1
6
mv.1
|
@ -3,10 +3,12 @@
|
|||
mv \- move files and directories
|
||||
.SH SYNOPSIS
|
||||
.B mv
|
||||
.RB [ \-f ]
|
||||
.I file
|
||||
.RI [ name ]
|
||||
.P
|
||||
.B mv
|
||||
.RB [ \-f ]
|
||||
.RI [ file ...]
|
||||
.RI [ directory ]
|
||||
.SH DESCRIPTION
|
||||
|
@ -14,3 +16,7 @@ mv \- move files and directories
|
|||
moves or renames a given file or directory, naming it the given name. If
|
||||
multiple files and directories are listed they will be moved into the given
|
||||
directory.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-f
|
||||
do not prompt for confirmation before overwriting the destination path.
|
||||
|
|
4
mv.c
4
mv.c
|
@ -12,7 +12,7 @@ int mv(const char *, const char *);
|
|||
static void
|
||||
usage(void)
|
||||
{
|
||||
eprintf("usage: %s source... dest\n", argv0);
|
||||
eprintf("usage: %s [-f] source... dest\n", argv0);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -21,6 +21,8 @@ main(int argc, char *argv[])
|
|||
struct stat st;
|
||||
|
||||
ARGBEGIN {
|
||||
case 'f':
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
} ARGEND;
|
||||
|
|
Loading…
Reference in New Issue
Block a user