GNU bug report logs - #14628
mv: safeguard against renaming dir with open files

Previous Next

Package: coreutils;

Reported by: "S. Dara" <saif.dara <at> gmail.com>

Date: Sat, 15 Jun 2013 20:18:02 UTC

Severity: wishlist

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "S. Dara" <saif.dara <at> gmail.com>
To: 14628 <at> debbugs.gnu.org
Subject: bug#14628: mv command (and suggesting a feature for it)
Date: Sat, 15 Jun 2013 22:02:22 +0200
Dear authors of the mv command,

With this email, I would like to suggest a feature for the mv command. I 
believe this command should contain a safeguard feature which will deny 
renaming a directory that contains files which are currently opened by 
the user.

For example, I have a directory named 'my directory'. In this directory, 
there is a .txt file which I had opened and was entering text in it. In 
the command prompt, I decided to change the name of 'my directory' to 
'mydirectory' using the command 'mv -ivT my\ directory mydirectory'. 
Although command succeeded, when I wanted to save the text file which I 
was working on I got an error from my text editor saying the directory 
does not exist. This is due to the name change of the parent directory 
of the .txt-file.

I hope the problem is clear by above example. If there already exists 
such safeguard by providing some specific option to the mv command, then 
please discard this email and my apologies.


With kind regards,


Saif Dara





This bug report was last modified 6 years and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.