Live data from Hacker News

Unix command line conventions over time

blog.liw.fi

221–222 of 222 posts

Re: Unix command line conventions over time

#221
post #89

Earlier quoted context omitted.

My favorite example: `cp -r` is recursive. `scp -r` is recursive. `chmod -r` removes read permissions; `chmod -R` is recursive.

I ever use chmod without specifying at least one of ugoa. Helps with that mistake.

Meant to say *never, too late to edit.

Re: Unix command line conventions over time

#222

Example in "Early 1970s" is notoriously bad. Text says: "it would be given some number of filenames as command line arguments, and it would read those ... Options didn’t exist". Example shows: unneeded usage of `cat` as if `wc` is non-standard utility and cannot process file names by itself, option for `wc` is used. It contradicts text in both ways!

Is there any actual, useful, worthwhile reason for avoiding useless `cat` though?

Are several memory copies and context switches free for you? They are most expensive operations on modern hardware (yes, I know about splice syscall in Linux, but it is Linux-specific and don't avoid context switches). I think, on very high-end modern storage subsystem (like, stripe built out of several enterprise-grade NMVe SSDs) impact will be well-measurable in case of simple "wc".
Post reply on HN