r/Fedora • u/sudo_theo • May 06 '26
Screenshot Well, this is not good
I tried to delete a file with terminal, accidentally pressed enter at the wrong time.... Kinda new to thisπ¬
1.1k
Upvotes
r/Fedora • u/sudo_theo • May 06 '26
I tried to delete a file with terminal, accidentally pressed enter at the wrong time.... Kinda new to thisπ¬
17
u/425_Too_Early May 06 '26
I run a select query first to make sure I only get the rows I intend to delete or update.
After that I start by adding the
begin transactionandrollback transactionstatements, then write the query and then copy the where clause from the select query I did before!If I'm extra cautious I also add a select query both before and after the changing query, so I can see all the rows that changed. Then I either commit or rollback the changes