• remon@ani.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      10 hours 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
    link
    fedilink
    English
    arrow-up
    12
    ·
    edit-2
    18 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
    link
    fedilink
    English
    arrow-up
    6
    ·
    18 hours ago

    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.

  • redlemace@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    19 hours ago

    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)