Nicolas Williams wrote: > On Wed, Mar 05, 2008 at 06:09:15PM -0800, Alan M Wright wrote: >> Nicolas Williams wrote: >>> On Wed, Mar 05, 2008 at 03:09:22PM -0800, Alan M Wright wrote: >>>> Nicolas Williams wrote: >>>>> Should a CR be filed against mv(1) here? Or an RFE for an option to it >>>>> that obviates the identical file check, at least on case-insensitive >>>>> file systems? >>>> Fromm an mv perspective this is indistinguishable from >>>> having multiple links to a file. >>> >>> nit: not if the link count is 1 :) >> >> So ... it would be unfortunate if the thing you wanted >> to rename was a directory. > > I'm not sure I follow.
Directories never have a link count of 1. > rename(2) can rename files and directories; so > can mv(1) (which uses rename(2)). Directories cannot be hardlinked the > way files can be. because the link count is used for another purpose. > The point is that mv(1) has a check that assumes case sensitivity. > > Dropping that check would change its semantics in a case-sensitive > filesystem -- it would let you rename a file even when a hardlink exists > with the new name, in which case the hardlink would be unlinked during > the rename. So it can't just be dropped; mv needs to become smarter > (i.e., more complicated) or users have to deal. > > The fact that a work-around exists is nice -- this is a P4 or a P5. Feel free to raise the RFE but (my opinion) I don't think changing mv(1) to allow this by default is a good idea. What do you do on mixed-mode file systems, would mv(1) take the case-sensitive or the case-insensitive perpspective? Even if you add a new flag, you would still have caveats - perhaps better to create a new command. Alan _______________________________________________ storage-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/storage-discuss
