I am trying to get rid of this folder, but the result is saying that fish expects a variable name after this $. What does it mean ? And how do i get rid of this folder ?

0 points · 16 comments · view on lemmy.world

16 Comments

deadbeef79000@lemmy.nz · 4 pts · 46d (2 replies)

It's just not escaped properly.

You can probably just get away with putting a backslash \ before the $ so it looks like \$.

OrangePumkin@piefed.nl · 0 pts · 46d (1 reply)

Didn't work.

deadbeef79000@lemmy.nz · 2 pts · 46d

I'm unfamiliar with fish but that $'\003' also looks a lot like how bash escapes unprintable control characters (ASCII 3 is 'end of text' apparently).

You probably have sh or bash available. Try the same command in that.

sh -c "rm -rf 'folder'$'\003'"

Or just delete all directories that start with folder with confirmation (no -f):

rm -r folder*
one_old_coder@piefed.social · 2 pts · 46d
statelesz@slrpnk.net · 2 pts · 46d

Just type rm -rf f and use tab to auto complete.

fartsparkles@lemmy.world · 2 pts · 46d (5 replies)

The quotes and escapes are mangled.

cd into the directory with the folder to remove, type rm -rf ./ then press tab until the folder you’re looking for is autocompleted after the ./

OrangePumkin@piefed.nl · -1 pts · 46d (4 replies)

Doesn't seem to work.

fartsparkles@lemmy.world · 2 pts · 46d (3 replies)

If you’re struggling, might as well either open a file manager like midnight commander to make your life easier.

OrangePumkin@piefed.nl · -2 pts · 46d (2 replies)

What's that ?

Janx@piefed.social · 4 pts · 46d

a file manager

one_old_coder@piefed.social · 2 pts · 46d

Google.

Lojcs@piefed.social · 1 pts · 46d

Are you sure the name is 'folder'$'\003'? I think the outer quotes might be added by ls. I would try rm -rf 'folder\'\$\'\\003'

Edit: Or rm -rf 'folder\'$\'\\003'

altphoto@lemmy.today · 0 pts · 46d (3 replies)

You probably don't own the folder. Use sudo.

OrangePumkin@piefed.nl · -1 pts · 46d (2 replies)

Meaning ??

d5sVJ1TsorJCfyZ.png

OrangePumkin@piefed.nl · 0 pts · 46d (1 reply)

It's right here.

altphoto@lemmy.today · 2 pts · 46d

Oh. Sudo is the special word meaning admin. So if you have a command like rm and it fails due to permissions you simply add sudo. sudo rm. But I see that your problem is the folder name. So nevermind. Maybe look at the spaces? Maybe you have tab$tab instead of space$space?