• just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    19
    arrow-down
    1
    ·
    3 months ago

    Tab Completion if you’re unsure how to escape characters in this case. Start the name of the folder, then hit TAB a couple times

  • sjohannes@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    3 months ago

    Is this homework of some sort?

    By default, GNU ls will quote entries containing certain special or unprintable characters. For example, if a file name contains the space character, GNU ls will print e.g. 'hello world'. This quoting is done using Bash syntax.

    In Bash, 'folder'$'\003' (or $'folder\003') represents the text folder followed by octal byte 3. Because you use Fish instead of Bash, this doesn’t work­—it has a different syntax to specify unprintable/special characters.

    I can tell you how to refer to this file in Fish, but I hesitate to do it if it’s for homework. What I will do is point you to the part of the Fish documentation where this is (kind of) explained: in Fish for bash users#Quoting.

  • sin_free_for_00_days@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    3 months ago

    As others have said, tab-complete should be able to do it. If not, here are two other options:

    Is it the only “folder*” in the directory?

    $  ls *folder*
    ‘folder’$‘003’
    

    If you only have that, you should be able to use the wildcards to delete it:

    rm *folder*
    

    Another is just find the inode and delete using that:

    $  ls -li | grep folder
    5120013  .rw-rw-r-- user user  0 B  Fri Jun 19 21:09:02 2026 ‘folder’$‘003’
    
    $ find . -inum 5120013 -delete
    
  • Victor@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    Nobody’s getting into the real issue lol. Yes, yes, tab completion. But all you need to do is escape the dollar sign: \$. Or include it inside the single quotes.

    👍👍