coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] shred: provide --remove methods to avoid excessive syncing


From: Jim Meyering
Subject: Re: [PATCH] shred: provide --remove methods to avoid excessive syncing
Date: Wed, 20 Nov 2013 11:19:16 -0800

On Wed, Nov 20, 2013 at 3:34 AM, Pádraig Brady <address@hidden> wrote:
> On 11/20/2013 06:57 AM, Bernhard Voelker wrote:
>> On 11/20/2013 01:45 AM, Pádraig Brady wrote:
>>> Before I merge this I'd like to understand fully
>>> the reason why shred currently defaults to writing
>>> out progressively shorter names. From the source..
>>>
>>> /* Repeatedly rename a file with shorter and shorter names,
>>>    to obliterate all traces of the file name on any system that
>>>    adds a trailing delimiter to on-disk file names and reuses
>>>    the same directory slot.  */
>>
>> That sounds like the filesystem terminates the file name on disk,
>> e.g. with a NUL character, i.e. during each rename() the last
>> character gets overwritten so that all characters in the original
>> name are changed to the terminating character:
>>
>>   's',  'e',  'c',  'r',  'e',  't', '\0'
>>   's',  'e',  'c',  'r',  'e', '\0', '\0'
>>   's',  'e',  'c',  'r', '\0', '\0', '\0'
>>   's',  'e',  'c', '\0', '\0', '\0', '\0'
>>   's',  'e', '\0', '\0', '\0', '\0', '\0'
>>   's', '\0', '\0', '\0', '\0', '\0', '\0'
>>
>> (Just a guess, of course.)

That also matches what I understood.  Thanks!



reply via email to

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