2 ms·
What do you mean by "unix -r custom"? It's not like "-r" is some kind of standard, and many commands or programs have other ideas. For example, GNU cp uses -r
by simiones 5y ago
What do you mean by "unix -r custom"? It's not like "-r" is some kind of standard, and many commands or programs have other ideas.
For example, GNU cp uses -r or -R for recursive copy, but OpenBSD cp only uses -R. ls uses -R only (-r is listing in reverse order). scp uses -r only (-R is remote copy). rm allows both -r and -R.
But then, commands like mv or find don't support anything like -r or -R, they implicitly affect the whole directory structure. Bash has * (with shopt -s globstar) for globbing with subdirectories. Make doesn't support any concept of recursive subdirectory traversal.
- sneak 5y agoYou're absolutely right it's not a standard, but neither is ./... and one is in widespread use (a custom) and one is not. Other software that supports -r: rsync, fdupes, zfs destroy, et c. I'm not saying they're breaking spec, I'm saying they're being weird and divergent for no particular benefit (and at a quite obvious cost in terms of Google-specific learning curve, as Go is used widely outside of Google).