4 ms·
What's that do? Unless you change the order, I'd expect it to delete two files: foo and -rf. How does the Mac get it wrong? I don't have a Mac at hand.
by imd 17y ago
What's that do? Unless you change the order, I'd expect it to delete two files: foo and -rf. How does the Mac get it wrong? I don't have a Mac at hand.
- kelnos 17y agoGNU tools generally allow you to put your options anywhere you please, even after regular arguments. Whether or not this is a good thing is of course up for debate, but it certainly can add convenience. Confusion can occur with some applications (possibly non-GNU ones) for which option/argument order does matter, or with those where options have different affects on later/earlier arguments depending on where they are placed. Note that the parent didn't say the Mac gets it "wrong," just that GNU "rm foo -rf" works in the sense that it will do what he intends it to do.