Results 1 to 5 of 5
I made I typo in my /etc/fstab file where I told a disk to mount to /media/Windows\ Storage
It created that folder but named it "Windows\" (I guess fstab doesn't ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-26-2013 #1Just Joined!
- Join Date
- Jun 2011
- Posts
- 5
How do I delete a folder with \ at the end?
I made I typo in my /etc/fstab file where I told a disk to mount to /media/Windows\ Storage
It created that folder but named it "Windows\" (I guess fstab doesn't recognize the space the way the terminal does).now when I try to remove it the terminal detects \ to allow for a space and it says "cannot remove 'Windows': no such file or directory." Anyone know how I can go about deleting the folder?
- 01-27-2013 #2Just Joined!
- Join Date
- May 2011
- Location
- NJ
- Posts
- 56
Hello,
Try renaming it, then deleting it.
- 01-27-2013 #3
You're likely having trouble because of the space after the slash. When attempting to delete the folder, try using your <tab> key to auto-complete the name.
Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 01-27-2013 #4Linux Enthusiast
- Join Date
- Apr 2012
- Location
- Virginia, USA
- Posts
- 561
rm Windows\\
\ instructs bash to interpret the next character as text.
So, if the directory is named Windows\ Share
You would have to use \\.
Pro tip: Don't ever use spaces in file and directory names. There's just no good reason to do so; as you can see, it's only going to cause you grief. Use _ underscore instead.
- 01-27-2013 #5
Solid advice right there. I rename every single download to avoid the grief, it can be a major hassle.
EDIT: Another way to look at the folder is to use the dir command. For example:
Output of ls
Code:00002.vcf George-thorogood.WAV loki_update-full-1.0.13-x86.run cnijfilter-3.20-r1.ebuild gtk-gnutella-downloads MANUAL000006616.pdf conky.sh how-to-gentoo-consolefont output Desktop IMG_20110815_174241.jpg shared Downloads installed-progs tmp dwhelper iso VirtualBox VMs Foo Fighters - Greatest Hits.m3u loki_update-1.0.6-x86.run workspace
Output of dir
So you cannot type cd VirtualBox VMs, you'll get an error.Code:00002.vcf George-thorogood.WAV loki_update-full-1.0.13-x86.run cnijfilter-3.20-r1.ebuild gtk-gnutella-downloads MANUAL000006616.pdf conky.sh how-to-gentoo-consolefont output Desktop IMG_20110815_174241.jpg shared Downloads installed-progs tmp dwhelper iso VirtualBox\ VMs Foo\ Fighters\ -\ Greatest\ Hits.m3u loki_update-1.0.6-x86.run workspace
But if you use the output from the dir commandCode:cd VirtualBox VMs bash: cd: VirtualBox: No such file or directory
cd VirtualBox\ VMs
It works. Also as metioned, just use the {Tab} button to autocomplete for you.
cd Vir{Press tab once}Last edited by MikeTbob; 01-27-2013 at 04:00 PM.
I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
I'd rather be lost at the lake than found at home.


Reply With Quote

