bugGNU Core Utilities - Bugs: bug #5477, mv --backup <some_directory>...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #5477: mv --backup <some_directory> "cannot overwrite directory"

Submitted by:  Richard Neill <richardneill>
Submitted on:  Mon 22 Sep 2003 06:59:52 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Jim Meyering <meyering>
Open/Closed: Closed

Sat 26 Aug 2006 10:43:43 AM UTC, comment #1:

Thanks for the report.
This is fixed in coreutils-6.0.

Jim Meyering <meyering>
Project AdministratorIn charge of this item.
Mon 22 Sep 2003 06:59:52 PM UTC, original submission:

If I have:
trashcan as a trash directory
and
deleteme as a file I want to move to trash,
then doing:
mv --backup=numbered deleteme trashcan
works as it should.
If I then recreate the file deleteme, and repeat the above, mv quite correctly ends up with two files:
trashcan/deleteme
and
trashcan/deleteme.~1~

BUT, if deleteme is a directory, then this fails with "cannot overwrite directory".

It's a very good idea that mv shouldn't normally be able to overwrite entire directories (to stop typos being disastrous), but if --backup is explicitly specified, then this should go ahead and work.

(I'm trying to write a "trashcan" script, BTW)

Richard Neill <richardneill>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 26 Aug 2006 10:45:59 AM UTCmeyeringOpen/ClosedOpen=>Closed
Sat 26 Aug 2006 10:43:43 AM UTCmeyeringStatusNone=>Fixed
Sun 11 Apr 2004 06:31:24 PM UTCmeyeringAssigned toNone=>meyering

Back to the top


Powered by Savane 3.1-cleanup1