in reply to Re: Renaming Direcotries
in thread Renaming Directories

I missed the fact that you could do a straight rename("OLDNAME", "NEWNAME");
Careful. That will not work across filesystems. Otherwise, ++

Makeshifts last the longest.

Replies are listed 'Best First'.
•Re: Re^2: Renaming Direcotries
by merlyn (Sage) on Jun 26, 2002 at 17:19 UTC
      And in that case, neither would system "mv"....
      Hmmm, my docs (v5.6.1) disagree. From perldoc -f rename
      Behavior of this function varies wildly depending on your system implementation. For example, it will usually not work across file system boundaries, even though the system mv command sometimes compensates for this.

      davis
      Is this going out live?
      No, Homer, very few cartoons are broadcast live - it's a terrible strain on the animator's wrist
        The docs are fuzzy, and probably deserve patching.

        The mv command has issued a cp behind the scenes to rename a file from one volume to another for at least 20-ish years of Unix history.

        However, I have yet to see an mv command that would transparently handle the moving of a directory from one filesystem to another. Are you aware of even one?

        -- Randal L. Schwartz, Perl hacker