LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-01-2012, 11:19 AM   #1
cdvries
LQ Newbie
 
Registered: Jun 2012
Location: Netherlands
Distribution: Mint, Debian and Ubuntu are my favorites
Posts: 7

Rep: Reputation: Disabled
Undeletable directory


Hello. I have accidentally created a directory named "--arch=i386" and now I am unable to delete it.
How to delete such directory?

Linux-Mint ~ # ls
--arch=i386 -arch=i386
Linux-Mint ~ # rm --arch=i386
rm: unrecognized option '--arch=i386'
Try `rm ./'--arch=i386'' to remove the file `--arch=i386'.
Try `rm --help' for more information.
Linux-Mint ~ # rm "--arch=i386" -fr
rm: unrecognized option '--arch=i386'
Try `rm ./'--arch=i386'' to remove the file `--arch=i386'.
Try `rm --help' for more information.
Linux-Mint ~ #
 
Old 06-01-2012, 11:21 AM   #2
cdvries
LQ Newbie
 
Registered: Jun 2012
Location: Netherlands
Distribution: Mint, Debian and Ubuntu are my favorites
Posts: 7

Original Poster
Rep: Reputation: Disabled
o yea.
rm ./'--arch=i386' gives me
rm: cannot remove `./--arch=i386': Is a directory
 
Old 06-01-2012, 11:27 AM   #3
rosehosting.com
Member
 
Registered: Jun 2012
Location: Missouri, USA
Posts: 236

Rep: Reputation: 64
Try to remove it by passing '--' to 'rm'. Something like:

Code:
rm -rf -- --arch\=i386/
assuming you're within the directory where it resides.

Last edited by rosehosting.com; 06-01-2012 at 11:28 AM.
 
Old 06-01-2012, 11:29 AM   #4
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Rep: Reputation: 107Reputation: 107
With the rm command, you need to pass the -r option to delete a directory.

Alternatively, you could use rmdir which is an rm for directories.
 
Old 06-01-2012, 11:38 AM   #5
cdvries
LQ Newbie
 
Registered: Jun 2012
Location: Netherlands
Distribution: Mint, Debian and Ubuntu are my favorites
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Cultist View Post
With the rm command, you need to pass the -r option to delete a directory.

Alternatively, you could use rmdir which is an rm for directories.
rm ./'--arch=i386' -fr worked for me. Sorry for asking stupid questions :-)
 
Old 06-01-2012, 11:50 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
It's not a stupid question. Not asking, that's stupid.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Chromium Profile undeletable issues JohnLocke Linux - Software 5 06-28-2011 08:38 AM
Username & Password Sync Fedora Directory and Microsoft Active Directory karnac01 Fedora 4 07-19-2010 12:51 AM
change default vsftp anonymous accout directory /var/ftp to other directory? hocheetiong Linux - Newbie 2 01-24-2010 06:33 PM
Undeletable directory/corrupt directory dnadave Linux - General 4 12-17-2009 04:24 PM
Undeletable links on desktop!!! Zeno Cosini Mandriva 9 05-27-2004 01:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration