diff options
author | sjg <sjg@FreeBSD.org> | 2013-04-12 20:48:55 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2013-04-12 20:48:55 +0000 |
commit | 97d8b9495668afa398ab17c8c5f7e223b5fd2e89 (patch) | |
tree | 54038c9ac32a45f8741dcc23fb9a8ffc0e15ff89 /bin/mv | |
parent | 5ee3bfdb338e7c80af29a67f4425c4be24c7b866 (diff) | |
parent | 086d73aef6d0ab7d21daa2076fdc8d25961f9b05 (diff) | |
download | FreeBSD-src-97d8b9495668afa398ab17c8c5f7e223b5fd2e89.zip FreeBSD-src-97d8b9495668afa398ab17c8c5f7e223b5fd2e89.tar.gz |
sync from head
Diffstat (limited to 'bin/mv')
-rw-r--r-- | bin/mv/mv.1 | 12 | ||||
-rw-r--r-- | bin/mv/mv.c | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/bin/mv/mv.1 b/bin/mv/mv.1 index 5199f27..298dbf9 100644 --- a/bin/mv/mv.1 +++ b/bin/mv/mv.1 @@ -32,7 +32,7 @@ .\" @(#)mv.1 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd August 28, 2012 +.Dd March 15, 2013 .Dt MV 1 .Os .Sh NAME @@ -155,6 +155,16 @@ rm -rf source_file .Ed .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Rename file +.Pa foo +to +.Pa bar , +overwriting +.Pa bar +if it already exists: +.Pp +.Dl $ mv -f foo bar .Sh COMPATIBILITY The .Fl h , diff --git a/bin/mv/mv.c b/bin/mv/mv.c index 5147a2db..2710f89 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -337,7 +337,7 @@ err: if (unlink(to)) * on a file that we copied, i.e., that we didn't create.) */ errno = 0; - if (fchflags(to_fd, (u_long)sbp->st_flags)) + if (fchflags(to_fd, sbp->st_flags)) if (errno != EOPNOTSUPP || sbp->st_flags != 0) warn("%s: set flags (was: 0%07o)", to, sbp->st_flags); |