For example:

rm long/path/to/some/dir  -r

instead of:

rm  -r  long/path/to/some/dir

Is it possible to make it work like that, as in GNU command line utils?

TIA, Karol

1 Answer 1


Unfortunately the answer is negative unless you are willing to switch to GNU command line utilities. OS/X command line tools derive from BSD sources which process command line arguments differently. This all boils down to usage of the library calls like getopt() in the standard C-library. OS/X command line tools use the standard library functions whereas GNU command line tools use their own, similar, but slightly more "advanced" version of getopt() and companions.

That said, you could work around that by installing GNU coreutils. One way of doing that would be to use Homebrew. That, of course, is not the same thing as making OS/X provided BSD command line utilities to the parse command line like the GNU command line utilities do.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .