2015-09-03 9:56 GMT-06:00 Pádraig Brady <[email protected]>: > I see your point. It's similar to the prompting discussed in > http://bugs.gnu.org/16669
Thanks for pointing me to that discussion, it was very interesting. Reading through it made me realize that step 3 of the current POSIX rm standard <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html> requires rm to always prompt if the file is read-only, regardless of whether the file can actually be deleted. 2015-09-03 11:55 GMT-06:00 Jim Meyering <[email protected]>: > If you can find a way to avoid the spurious prompt without > the cost of an additional stat-style FS access, or a way to > ensure that the cost is incurred only when we're going to > present an interactive prompt (in which case it's negligible), > then maybe. I'd like to see the standard changed so that once rm determines that the file is read-only, it may optionally check that the file can actually be deleted and skip the prompt if it cannot. The default codepath would not be affected, and the extra compute time is nothing compared to the time it would save the user. What is the appropriate place to discuss proposed revisions to the POSIX standard? -Alex
