-21
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 17 Jun 2026
-21 points (16.1% liked)
Explain Like I'm Five
21703 readers
28 users here now
Simplifying Complexity, One Answer at a Time!
Rules
- Be respectful and inclusive.
- No harassment, hate speech, or trolling.
- Engage in constructive discussions.
- Share relevant content.
- Follow guidelines and moderators' instructions.
- Use appropriate language and tone.
- Report violations.
- Foster a continuous learning environment.
founded 3 years ago
MODERATORS
The $ is unquoted and so it's interpreted as a if variable name will follow. That does not happen (a literal string follows the $) so it casts an error
You probably are looking for this : rm -r 'folder'$'003'
The slash will cause the shell or interpret the next character literally (as as $ and not as variable indicator)
You should wrap
rm -r 'folder'\$'003'in backticks, because in my Lemmy client the backwards slash wasn't showing.Here's the result :
After this, i gave the ls command, and it's showing up.
Did you try with bash autocomplete?
rm -r folder
And see how it spells it? Also you could wildcard depending on what you (don't) want to delete in the process.
You put an extra backslash in there, it should be
rm -r "folder'\$'003"