nixCraft Linux Forum

nixCraft

Linux 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

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 06-09-2006, 11:58 PM
Member
User
 
Join Date: Jul 2005
Posts: 85
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
Sponsored Links
  #2 (permalink)  
Old 06-10-2006, 01:02 AM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 482
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
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 06-10-2006, 09:40 AM
Member
User
 
Join Date: Jul 2005
Posts: 85
Rep Power: 0
ricc
Default

Thanks monk,

Works great!!!.

ricc
Reply With Quote
Reply

Bookmarks


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 On

Similar Threads

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


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


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

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