this post was submitted on 30 Jun 2026
51 points (100.0% liked)
Linux
14231 readers
659 users here now
A community for everything relating to the GNU/Linux operating system (except the memes!)
Also, check out:
Original icon base courtesy of lewing@isc.tamu.edu and The GIMP
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Basic habit to get into:
If you're contemplating doing something destructive, do a dry-run first.
In this case, remove the
-deleteflag, run the command and see what you get.A good approach is to build a command step by step and test your assumptions each iteration.
Things might take a few moments longer, but one day it's going to save your bacon.
As for unexpected globbing, learn the difference between quoted and unquoted, and single versus double quotes.
Source: Linux user for 25+ years
What's the difference between single vs double quotes?
Presuming BASH:
https://www.gnu.org/software/bash/manual/bash.html#Quoting
Single quotes are much safer/predictable because:
Not to say they are always the right choice though.
The shell doesn't expand or interpolate single-quoted strings, they are literals
@vk6flab@lemmy.radio is a WITCH I tell you! This is black magic!!