bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mv's newfound intelligence


From: Fergal Daly
Subject: mv's newfound intelligence
Date: Mon, 22 Jan 2001 16:02:57 +0000
User-agent: Mutt/1.2.5i

It's debatable if this a bug since it's actually intentional but I consider
mv's new ability to move files across filesystems to be a bad idea, for
serveral reasons:

* I've been using Linux for many years and mv has always refused to move
across filesystems, changing the default behaviour of something as
frequently used as mv is a bad idea, especially without giving an option to
disable it or a warning that something unusual is going on in the
background or prompting for confirmation.

* If the copy runs out of space, it doesn't tidy up after itself.

* If you move a dir structure onto another filesystem without realising it
and then move it back, you will have silently broken any hard links you had.

* Mvoing large directories/files across filesystems usually requires a bit
of thought and shouldn't necessarily be too easy to do. People often
partition their disks for a reason and I would like to be reminded when I'm
about to cross partition boundaries.

* Even if there's only 1 filesystem involved, you can still run into
trouble. If you don't have permission to move the source file but you do
have permission to create the destination, again mv will silently copy the
whole source file/directory, potentially filling up your disk when you
thought you were just renaming something - a very bad idea.

* The unix philosophy is that each tool should do one simple thing and do it
well. If I want to copy and delete, I'll use cp and rm ;-)

I really think you should reconsider having this as the default behaviour or
at least provide a switch to turn it off. I think you also warn people or
ask for confirmation when mv is about to do something besides just renaming
things.

I'm sorry I can't provide patches for all this, I'm not much of a C hacker.

By the way, thanks for all the work you've done with fileutils, it might
seem from above that I don't appreciate all your hard work but I do,

Fergal



reply via email to

[Prev in Thread] Current Thread [Next in Thread]