this post was submitted on 17 Jun 2026
-7 points (29.4% liked)

Explain Like I'm Five

21449 readers
91 users here now

Simplifying Complexity, One Answer at a Time!

Rules

  1. Be respectful and inclusive.
  2. No harassment, hate speech, or trolling.
  3. Engage in constructive discussions.
  4. Share relevant content.
  5. Follow guidelines and moderators' instructions.
  6. Use appropriate language and tone.
  7. Report violations.
  8. Foster a continuous learning environment.

founded 3 years ago
MODERATORS
 
top 12 comments
sorted by: hot top controversial new old
[–] LoveEspresso@retrofed.com 1 points 1 hour ago (1 children)

@remon@ani.social what would you say in this particular case ??

[–] remon@ani.social 1 points 1 hour ago* (last edited 57 minutes ago)

Is there an important reason why this folder needs to be deleted? If not I'd just leave it and move on.

[–] one_old_coder@piefed.social 11 points 8 hours ago* (last edited 8 hours ago)
  1. Try !learn_programming@programming.dev next time, you'll get downvoted here.
  2. Don't put everything in your home directory (I see ~ in the path), create a folder named Projects or something like that, and work there.
  3. Try to see if your shell has tab-completion. Type folder<TAB><TAB> (the TAB key twice) and see if your offending folder is selected, that would be easier. Or better, type rm -r folder<TAB><TAB>.
  4. Don't put $ or special characters like ? in your names, it's always a bad idea.
[–] foggy@lemmy.world 4 points 9 hours ago (1 children)

Those chars aren't what they seem. The $'\003' is how gnu renders a byte it can't print.

Do

rm -r (printf 'folder\003')

Printf is your friend here.

[–] LoveEspresso@retrofed.com 1 points 1 hour ago
[–] flyingSock@feddit.org 3 points 9 hours ago

try rm -rf folder and then press tab to autocomplete the folder name for you

[–] redlemace@lemmy.world 2 points 9 hours ago* (last edited 9 hours ago) (1 children)

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)

[–] BlackEco@lemmy.blackeco.com 6 points 9 hours ago (1 children)

You should wrap rm -r 'folder'\$'003' in backticks, because in my Lemmy client the backwards slash wasn't showing.

[–] LoveEspresso@retrofed.com 1 points 9 hours ago (2 children)
[–] Calfpupa@lemmy.ml 1 points 9 hours ago

You put an extra backslash in there, it should be rm -r "folder'\$'003"

[–] LoveEspresso@retrofed.com 1 points 9 hours ago (1 children)

After this, i gave the ls command, and it's showing up.

[–] Strider@lemmy.world 1 points 9 hours ago* (last edited 9 hours ago)

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.