[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shred command. Autodetect file type
From: |
John Darrington |
Subject: |
Re: shred command. Autodetect file type |
Date: |
Tue, 5 Dec 2006 09:41:40 +0900 |
User-agent: |
Mutt/1.5.9i |
On Fri, Dec 01, 2006 at 03:59:40PM +0100, Alfred M. Szmidt wrote:
if --remove (-u) is specified. The default is not to remove the
files because it is common to operate on device files like
/dev/hda, and those files usually should not be removed. When
operating on regular files, most people use the --remove option.
Why not use the stat system call to find out what type of file
we're dealing with, and then remove or not remove accordingly ?
That might cause a suprise in some cases. It is better to have a
consitent behaviour than have different behaviours for different types
of files.
Why? Other core GNU commands modify their behaviour based upon the
file type. For example tar and ls treat their arguments differently
depending upon whether they are names of directories or names of
files.
It seems to me that the most common case would be that the shredded
file should be deleted, so that should be the default. If the user
doesn't want that then she can override it with a flag.
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
signature.asc
Description: Digital signature