nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

removing a -- directory

This is a discussion on removing a -- directory within the Linux software forums, part of the Linux Getting Started category; Hi all, I need to delete a directory that was somehow accidentally created by one the users. The directory contains ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-06-2006, 10:58 PM
Member
User
 
Join Date: Jul 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ricc
Default removing a -- directory

Hi all,
I need to delete a directory that was somehow accidentally created by one the users.

The directory contains two -- before the name... i.e. --dir1 and --dir2

When I try to use rmdir or rm -r '--dir1', it says unrecognised option.

How can I delete such directories.

ricc
Reply With Quote
  #2 (permalink)  
Old 10-06-2006, 12:02 AM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
OS: Debian GNU/Linux
Posts: 506
Thanks: 0
Thanked 8 Times in 6 Posts
Rep Power: 7
monk has a spectacular aura about monk has a spectacular aura about
Default

Heh

Prefix -- before dirname i.e.

Code:
 rm -r  -- '--dir1'
Another option is to use an inode see http://www.cyberciti.biz/nixcraft/vi...ode-number.php
Reply With Quote
  #3 (permalink)  
Old 10-06-2006, 08:40 AM
Member
User
 
Join Date: Jul 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ricc
Default

Thanks monk,

Works great!!!.

ricc
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
awk - Removing domain name entires nvbhole Shell scripting 0 18-12-2007 11:14 AM
Shell Script for adding, removing and commiting the SVN (Subversion system ) anilvrathod Shell scripting 0 07-12-2007 05:40 PM
A script for Removing all the files inside a folder and its sub folder vivekv Shell scripting 1 25-10-2007 01:44 PM
Removing useless users in CentOS meowing Web servers 3 15-05-2007 12:43 PM
Shell scripting - Removing file extension urbanreformer Shell scripting 3 07-03-2007 08:44 PM


All times are GMT +5.5. The time now is 05:33 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38