bug-bash
[Top][All Lists]
Advanced

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

Re: bash bug - unexpect file deleted using rm command


From: Chet Ramey
Subject: Re: bash bug - unexpect file deleted using rm command
Date: Tue, 28 May 2019 10:46:27 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 5/28/19 7:56 AM, address@hidden wrote:

> Bash Version: 4.1
> Patch Level: 2
> Release Status: release
> 
> Description:
>       I deleted the file .DS_Store fom a fat32 partition as root.  bash 
> properly warned me and I answered y which deleted that file.
>       A second different file, named ._.DS_Store was also erased - but 
> without warning, and I did not ask for this.  
>       Therein lies the bug.
>       I recreated two text files with different contents having those same 
> names, and repeated the steps - same problem - both files got erased with the 
> one rm command for just one of them.
> 
> Repeat-By:
>       Create those 2 files. Delete just one.
> 
> Fix:
>       probably some shell filename matching code has an error?

This doesn't have anything to do with bash. It's an artifact of how Mac OS
X treats such files (which are special to the Finder) on non-native file
systems.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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