4 ms·
Protip: don't create aliases that override common commands (e.g. alias cp='cp -r'). Months down the road, you'll try to copy/paste some long piped command, and
by superb-owl 3y ago
Protip: don't create aliases that override common commands (e.g. alias cp='cp -r'). Months down the road, you'll try to copy/paste some long piped command, and be confused as to why it works on everyone else's machine but not yours
Instead, create alternative commands, like alias lsl='ls -lah', and put in the work to make it the default thing you type.
- _def 3y agoI can't stress this enough. It will also kinda poison your intuition.
- downut 3y agouhh, hmm. For thirty years or so I've lived by these two (shell immaterial): mv='mv -i' rm='rm -i' simple enough to add /bin/ to the command if I really mean it. That fixes the pipe issue too. I've had new to linux new hires go 'uh well I shoulda done that thanks I've done it now' more than once.
- adr1an 3y agoYou can also do backslash to skip the aliases, e.g. \rm wouldn't ask for confirmation (skip the -i)
- PurelyApplied 3y agoOr quote-wrap `'rm'`.
- mixmastamyk 3y agoDon't paste long piped commands unless you know exactly what they do.