bug#16287: RFE rm -x == --one-file-system
On 12/30/2013 02:17 AM, Linda Walsh wrote: Bernhard Voelker wrote: However, although -x is indeed a common option of several programs, we are reluctant to add new short options. I'd only consider doing so for compatibility reasons I'm looking at compatibility reasons with coreutil programs that recurse directories. All of the other *recursive* core utils that have the ability to isolate action to 1 file system have -x. chmod, cp, df, ls, dir, du find uses -xdev tar uses -x secure rm (srm) uses -x mkzftree uses -x (makes a zisofs) primarily was thinking about consistency in the coreutils -- Stop, stop, stop. This is not an 'which program has a -x option?' contest. Some of the above programs don't even have a -x or --one-file-system option (e.g. chmod) while others have a -x option, but that don't stand for --one-file-system (e.g. df and ls); and finally, some are not even part of coreutils package (e.g. tar). To stick to your argument - compatibility among coreutils programs - here is a little list: * These coreutils programs have a -x option (with mostly a completely different meaning, of course): cp df du ls od shred stty test * These coreutils programs have a --recursive option: chcon chgrp chmod chown cp ls rm * These coreutils programs have a --one-file-system option: cp du rm So even with that more accurate table, this is a quite weak argument to add rm -x. What I meant (and I thought that would be obvious): I wanted to know if there are other 'rm' implementations which have the -x option - the *BSDs, Solaris, etc. Have a nice day, Berny
bug#16287: RFE rm -x == --one-file-system
Bernhard Voelker wrote: * These coreutils programs have a --one-file-system option: cp du rm - Guess I got a bit carried away. On the above list with --one-file-system, only 'rm' is missing -x as a shorthand for it. I don't know that either BSD or Solaris have a one-file-system option, so it seems unlikely they would have a -x. secure rm does have -x, which has the same meaning. You can create any arbitrary set of conditions that fulfill your need for acceptance or denial. tar also uses -x and find uses -xdev. Clearly there are 4 other utils that use -x to mean stay on this file-system with -xdev being a weak fifth since find doesn't have many (if any) --long options.
bug#16287: RFE rm -x == --one-file-system
Would it be possible to let rm have a -x flag to be consistent with other utils that use -x to mean --one-file-system? It seems to be a widespread convention.
bug#16287: RFE rm -x == --one-file-system
On 12/29/2013 06:10 PM, Linda Walsh wrote: Would it be possible to let rm have a -x flag to be consistent with other utils that use -x to mean --one-file-system? It seems to be a widespread convention. Thanks for the suggestion. However, although -x is indeed a common option of several programs, we are reluctant to add new short options. I'd only consider doing so for compatibility reasons if there would already exist an implementation of 'rm -x'. I didn't find any ... apart from 'srm' [1] which even has a different program name. Do you know any other? [1] http://srm.sourceforge.net/ Have a nice day, Berny
bug#16287: RFE rm -x == --one-file-system
Bernhard Voelker wrote: On 12/29/2013 06:10 PM, Linda Walsh wrote: Would it be possible to let rm have a -x flag to be consistent with other utils that use -x to mean --one-file-system? It seems to be a widespread convention. Thanks for the suggestion. However, although -x is indeed a common option of several programs, we are reluctant to add new short options. I'd only consider doing so for compatibility reasons I'm looking at compatibility reasons with coreutil programs that recurse directories. More important that other implementations, would be an expectation of similar switch options within one distribution of these programs. Of the core utils that recurse directories, only chgrp does not have an option to stay on the current file system. All of the other *recursive* core utils that have the ability to isolate action to 1 file system have -x. chmod, cp, df, ls, dir, du find uses -xdev tar uses -x secure rm (srm) uses -x mkzftree uses -x (makes a zisofs) primarily was thinking about consistency in the coreutils -- for that matter, chgrp should probably follow suit in providing the ability to stay on 1 fs, and -x as it's the only recursive utils that doesn't provide that ability. As you mention the only other 'rm' util secure rm, also provides -x. Suppose you didn't put it to use to mean what all those other utilities use it for. How could would it be if it took on some completely different (and perhaps cross-purpose) meaning? Wouldn't consistency among those tools that have recursive options be desirable?