RetroFed Forum
Your home away from modern life.
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 ?
Post Reply
AuthorMessage
OrangePumkin piefed.nl OrangePumkin@piefed.nl
Joined: 2026-05-13
Quote

2   Original
fartsparkles lemmy.world fartsparkles@lemmy.world
Joined: 2023-07-01
#2 · Quote Reply

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 ./

2
deadbeef79000 lemmy.nz deadbeef79000@lemmy.nz
Joined: 2023-06-17
#3 · Quote Reply

It's just not escaped properly.

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

4
OrangePumkin piefed.nl OrangePumkin@piefed.nl
Joined: 2026-05-13
#4 · Quote Reply

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 ./

Doesn't seem to work.

1
fartsparkles lemmy.world fartsparkles@lemmy.world
Joined: 2023-07-01
#5 · Quote Reply

Doesn't seem to work.

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

2
OrangePumkin piefed.nl OrangePumkin@piefed.nl
Joined: 2026-05-13
#6 · Quote Reply

It's just not escaped properly. You can probably just get away with putting a backslash \ before the $ so it looks like \$.

Didn't work.

2
altphoto lemmy.today altphoto@lemmy.today
Joined: 2025-04-14
#7 · Quote Reply

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

0
OrangePumkin piefed.nl OrangePumkin@piefed.nl
Joined: 2026-05-13
#8 · Quote Reply

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

Meaning ??

d5sVJ1TsorJCfyZ.png

1
OrangePumkin piefed.nl OrangePumkin@piefed.nl
Joined: 2026-05-13
#9 · Quote Reply

Meaning ??

It's right here.

2
OrangePumkin piefed.nl OrangePumkin@piefed.nl
Joined: 2026-05-13
#10 · Quote Reply

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

What's that ?

0
deadbeef79000 lemmy.nz deadbeef79000@lemmy.nz
Joined: 2023-06-17
#11 · Quote Reply

Didn't work.

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*
2
altphoto lemmy.today altphoto@lemmy.today
Joined: 2025-04-14
#12 · Quote Reply

It's right here.

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?

2
Lojcs piefed.social Lojcs@piefed.social
Joined: 2025-06-30
#13 · (edited) Quote Reply

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'

1
one_old_coder piefed.social one_old_coder@piefed.social
Joined: 2026-02-08
#14 · Quote Reply

Ask loveespresso@retrofed.com.

2
one_old_coder piefed.social one_old_coder@piefed.social
Joined: 2026-02-08
#15 · Quote Reply

What's that ?

Google.

2
Janx piefed.social Janx@piefed.social
Joined: 2025-12-19
#16 · Quote Reply

What's that ?

a file manager

4
statelesz slrpnk.net statelesz@slrpnk.net
Joined: 2026-01-03
#17 · Quote Reply

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

2
Post Reply
Back to top