> I'm quite careful writing command lines
A safety measure I picked up from a sysadmin while watching over their shoulder: start writing nifty command lines by prefixing them with # first, to prevent havoc when fat fingering the [enter].
A safety measure I picked up from a sysadmin while watching over their shoulder: start writing nifty command lines by prefixing them with # first, to prevent havoc when fat fingering the [enter].
The reason is that you'll see expanded variables and wildcards before commiting to them.
CREATE TABLE mytable_backup AS SELECT * FROM mytable;
SELECT * FROM mytable WHERE condition;
DELETE FROM mytable WHERE condition;For those who don't know... "The fc utility lists or edits and reexecutes, commands previously entered to an interactive sh."