summaryrefslogtreecommitdiffstats
path: root/bin/mv
Commit message (Collapse)AuthorAgeFilesLines
* - Roll-back attempts to mimic rename(2) atomicity introduced in 1.47,dds2007-12-271-95/+69
| | | | | | | | | | | | | | and follow the letter of the POSIX specification. - Moving a directory to an existing non-empty directory will now fail, as required. - Improve consistency and remove some style bugs of earlier versions. This version passes all tests of tools/regression/bin/mv/regress.sh 1.6 Reviewed by: bde MFC after: 1 month
* Calling any function from vfork other than exec* and _exit yieldsdds2007-12-171-3/+9
| | | | | | undefined behavior. Noted by: alfred
* Eliminate gcc "variable clobbered" warnings by declaring the variablesdds2007-12-161-1/+2
| | | | | | living across the vfork as volatile. Noted by: kan
* When moving a directory across devices to a place where a directorydds2007-12-161-22/+82
| | | | | | | | | | | | | | | | | with the same name exists, delete that directory first, before performing the copy. This ensures that mv(1) across devices follows the semantics of rename(2), as required by POSIX. This change could introduce the potential of data loss, even if the copy fails, violating the atomicity properties of rename(2). This is (mostly) mitigated by first renaming the destination and obliterating it only after a succesfull copy. The above logic also led to the introduction of code that will cleanup the results of a partial copy, if a cross-device copy fails. PR: bin/118367 MFC after: 1 month
* Bump document date on behalf of previous revision.ru2007-11-011-1/+1
|
* Replace a fairly opaque sentence with a much clearer wording from NetBSD.pav2007-05-121-2/+2
| | | | | | PR: docs/101330 (inspired by) Submitted by: Peter Gildea <peter@gildea.com> Obtained from: NetBSD
* Attempt to complete the userspace integration of POSIX.1e extended ACLs.csjp2005-09-051-1/+18
| | | | | | | | | | | | | | This includes adding support for ACLs into cp(1) and mv(1) userspace utilities. For mv(1), if _PC_ACL_EXTENDED is in effect for the source AND destination operands, the destination file's ACLs shall reflect the source. For cp(1), if _PC_ACL_EXTENDED is in effect for both source and destination operands, and -p has been specified, the ACLs from the source shall be preserved on the destination. MFC after: 1 month
* Correct a few places where we called warn() when warnx() should havemux2005-05-191-4/+4
| | | | | | | been used. Submitted by: "Liam J. Foy" <liamfoy@sepulcrum.org> Obtained from: DragonFlyBSD
* Add the new standard EXIT STATUS section where appropriate.ru2005-01-161-5/+5
| | | | Sort standard sections in the (documented) preferred order.
* /*- or .\"- or #- to begin license clauses.imp2005-01-102-1/+2
|
* Remove clause 3 from the UCB licenses.markm2004-04-062-8/+0
| | | | OK'ed by: imp, core
* When symbolic link is pointed onto a mount point, it can't be movedpjd2004-03-211-6/+17
| | | | | | | | | to a different file system. Patch in PR was incorrect. PR: bin/64430 Submitted by: Samuel Tardieu MFC after: 3 days
* Centralize _PATH_* definitions.obrien2003-05-052-39/+0
| | | | Submitted by: Tim Kientzle <kientzle@acm.org> (embellished by me)
* Quiet warnings about copyright[].obrien2003-05-011-2/+2
|
* Grammar fix.keramida2002-08-261-1/+1
| | | | | | PR: docs/42021 Submitted by: Jeff Ito <jeffi@rcn.com> MFC after: 3 days
* s/filesystem/file system/ as discussed on -developerstrhodes2002-08-211-1/+1
|
* mdoc(7) police: tidy up, bump document date on behalf of the -n option.ru2002-08-091-9/+9
|
* Update usage for the addition of -n in rev 1.35 of mv.c.johan2002-07-092-3/+3
| | | | Approved by: obrien, sheldonh (mentor).
* When trying to emulate a cross-device move operation with cp and rm, addtjr2002-06-161-2/+2
| | | | | | | | | a "--" argument after the options so filenames with leading dashes are handled correctly. PR: 39318 Submitted by: Serge van den Boom <svdb@stack.nl> MFC after: 1 week
* Remove local definition of _PATH_CP, and use <paths.h>, _PATH_CP is in thejmallett2002-05-172-1/+1
| | | | CURRENT <paths.h>.
* Consistancy check s/file system/filesystem/trhodes2002-05-161-1/+1
| | | | Reviewed by: brian
* Update SCM ID.obrien2002-03-221-2/+2
|
* Note that -n is non-standard.obrien2002-03-221-1/+3
|
* Add the -n option, which automatically answers "no" to the overwrite question.obrien2002-03-222-6/+27
|
* Warnings fixes.markm2002-02-221-1/+2
|
* Move user_from_uid to pwd.himp2002-02-141-0/+2
| | | | | | | | | | | | | Move group_from_gid to grp.h Remove from stdlib.h Make the prototypes match the code Fix rm and mv to include new files. NetBSD has these defined in those files, and others too that I've not done. Approved by: terminal room kabal Reviewed by: jhb, phk
* missed a few registersimp2002-02-021-3/+3
|
* o __P has been reovedimp2002-02-021-16/+9
| | | | | | | | | o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are.
* Default to WARNS=2. Binary builds that cannot handle this must explicitlyobrien2001-12-041-1/+0
| | | | | | set WARNS=0. Reviewed by: mike
* mdoc(7) police: utilize the new .Ex macro.ru2001-08-151-3/+1
|
* Set WARNS=2 on programs which compile cleanly.dd2001-07-151-0/+1
| | | | Submitted by: Mike Barcroft <mike@q9media.com>
* Remove whitespace at EOL.dd2001-07-151-1/+1
|
* Fix the type of the NULL arg to execl()brian2001-07-091-2/+3
| | | | Idea from: Theo de Raadt <deraadt@openbsd.org>
* Use PATH_MAX in preference to MAXPATHLEN.imp2001-05-291-3/+4
|
* Silence WARNS=2 and BDECFLAGS on alpha and i386, except for mode_tkris2001-05-201-7/+8
| | | | | | warnings. MFC after: 1 week
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-2/+2
|
* Don't emit a warning message if fchflags() returns EOPNOTSUPPsada2000-07-201-1/+10
| | | | | Requested by: FUJISHIMA Satsuki <k5@cheerful.com> Obtained from: OpenBSD
* To make inherit file flags when mv(1) moves file between directoriessada2000-07-151-0/+2
| | | | | | | | | on different file systems. PR: bin/12375 Submitted by: Takashi SHIRAI <shirai@nintendo.co.jp> No response by: steve No problem with: building 5-current world
* Use lstat(2) instead of stat(2) when deciding if we should fastcopydwmalone2000-07-111-1/+1
| | | | | | | a file. This fixes moving symlinks across partitions. PR: 17847 Reviewed by: bde
* Removed bogus dependancy on libutil.joe2000-01-011-3/+0
| | | | Noticed by: bde
* mention that -v is non-standardmharo1999-09-041-0/+4
| | | | Reviewed-by: obrien
* add verbose flagmharo1999-08-292-7/+23
|
* $Id$ -> $FreeBSD$peter1999-08-274-4/+4
|
* Various spelling/formatting changes.kris1999-05-081-2/+2
| | | | Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
* Calls one or more of malloc(), warn(), err(), syslog(), execlp() ordes1998-10-131-2/+2
| | | | | | | | | | | execvp() in the child branch of a vfork(). Changed to use fork() instead. Some of these (mv, find, apply, xargs) might benefit greatly from being rewritten to use vfork() properly. PR: Loosely related to bin/8252 Approved by: jkh and bde
* Fixed printf format errors.bde1998-06-281-3/+3
|
* Make sure we don't overflow the path buffer. Exit if we do.imp1998-06-091-2/+4
| | | | Obtained from or inspired by: A similar change in OpenBSD by theo
* Don't append a '/' to the destination directory if theresteve1998-05-251-3/+5
| | | | | | is already one there. PR: 3025
* Correct use of .Nm. Add rcsid.charnier1998-05-152-13/+14
|
* Merge from OpenBSD:eivind1997-12-101-2/+16
| | | | | | | | | > Error out if someone tries to mv a mount point. Old behavior was to > move all files contained in the mounted filesystem to the dest. dir > which could be quite nasty. Personally, I think rename(2) should > return EPERM or EINVAL instead of EXDEV. Obtained from: OpenBSD mv.c rev 1.6 by Todd Miller <millert@openbsd.org>
OpenPOWER on IntegriCloud