You are not logged in.

#1 2009-06-30 04:09:12

SpeedVin
Member
From: Poland
Registered: 2009-04-29
Posts: 955

[Solved] Removing files with space in name.

Hello!
I have files named Feh wallpaper (exactly with space in name) and I was trying to remove it but i don't have any file manager and I remove files by rm.
I was try rm -r feh_wallpaper and rm feh wallpaper and rm can't remove it sad

Last edited by SpeedVin (2009-06-30 04:23:29)


Shell Scripter | C/C++/Python/Java Coder | ZSH

Offline

#2 2009-06-30 04:13:40

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Removing files with space in name.

rm feh\ wallpaper


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2009-06-30 04:23:03

SpeedVin
Member
From: Poland
Registered: 2009-04-29
Posts: 955

Re: [Solved] Removing files with space in name.

Great that's works thanks for help smile


Shell Scripter | C/C++/Python/Java Coder | ZSH

Offline

#4 2009-06-30 04:28:06

oib111
Member
Registered: 2009-06-20
Posts: 87

Re: [Solved] Removing files with space in name.

You can also use quotes:

rm "feh wallpaper"

Offline

#5 2009-06-30 04:28:41

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [Solved] Removing files with space in name.

Another way (for reference) is rm "feh wallpaper"


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#6 2009-06-30 14:59:07

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: [Solved] Removing files with space in name.

Try tabbing also wink


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#7 2009-07-15 10:29:19

SpeedVin
Member
From: Poland
Registered: 2009-04-29
Posts: 955

Re: [Solved] Removing files with space in name.

Hello again i have a question how to copy files with space in neme i was trying /file but no succes and i have () in the name of file that's are a problem sad
I can't rename it i got the same error when i want copy this file smile


Shell Scripter | C/C++/Python/Java Coder | ZSH

Offline

#8 2009-07-15 10:36:54

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: [Solved] Removing files with space in name.

SpeedVin wrote:

Hello again i have a question how to copy files with space in neme i was trying /file but no succes and i have () in the name of file that's are a problem sad
I can't rename it i got the same error when i want copy this file smile

Did you try with quotes? and it is \file "\" is an escape sequence.


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#9 2009-07-15 10:58:53

Curly Wurly
Member
Registered: 2009-05-25
Posts: 20

Re: [Solved] Removing files with space in name.

Yeah if it helps to know, you use a backslash before any characters that would otherwise be used by the command. In this case rm.


Life in Linux: Ubuntu 8.10 > Mint 6 > Debian > Backtrack 3 > Arch Linux.

Offline

#10 2009-07-15 11:23:00

SpeedVin
Member
From: Poland
Registered: 2009-04-29
Posts: 955

Re: [Solved] Removing files with space in name.

sHyLoCk wrote:
SpeedVin wrote:

Hello again i have a question how to copy files with space in neme i was trying /file but no succes and i have () in the name of file that's are a problem sad
I can't rename it i got the same error when i want copy this file smile

Did you try with quotes? and it is \file "\" is an escape sequence.

Ohh thanks option with quotes work smile

Last edited by SpeedVin (2009-07-15 11:23:16)


Shell Scripter | C/C++/Python/Java Coder | ZSH

Offline

Board footer

Powered by FluxBB