The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how unix called as secure sanjeev1 UNIX for Dummies Questions & Answers 5 06-18-2007 09:29 AM
Need help with ksh script that uses sqlplus, called from PHP j2owilson Shell Programming and Scripting 7 02-27-2006 04:35 PM
cpio in shell called from php mmarino Shell Programming and Scripting 3 10-07-2005 11:39 AM
Procedures are not called ? dreams5617 Shell Programming and Scripting 2 11-11-2004 08:02 PM
I tried to get the PID on the files called PID_Server hoang Shell Programming and Scripting 1 04-16-2002 02:46 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-12-2007
pondlife pondlife is offline
Registered User
  
 

Join Date: May 2004
Location: UK
Posts: 85
Help I've created a dir called /

OK, I had some odd characters in my mkdir command which resulted in the following directory getting created:


drwxr-xr-x 2 fred fredgroup 512 Apr 12 16:52 /

Any ideas how I get rid of it safely?

Interestingly that's a straight cut'n'paste and there appear to be some odd characters before the /...

Thanks!
  #2 (permalink)  
Old 04-12-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,206
Code:
rmdir '/'
  #3 (permalink)  
Old 04-16-2007
pondlife pondlife is offline
Registered User
  
 

Join Date: May 2004
Location: UK
Posts: 85
Hi Reborg,

Just tried this but it keeps giving me a command continuation prompt ( > )

Is there a way of deleting files/directories via the inode?


Thanks, p.

Last edited by pondlife; 04-16-2007 at 04:43 AM..
  #4 (permalink)  
Old 04-25-2007
dam294 dam294 is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 16
Quote:
Originally Posted by pondlife
Hi Reborg,

Just tried this but it keeps giving me a command continuation prompt ( > )

Is there a way of deleting files/directories via the inode?


Thanks, p.
Yes, you should be able to remove a file using it's inode.

1. cd to the directory containing the file
2. ls -li (will provide inode numbers in the far left column)
3. find . -xdev -inum inode_number -exec rm {} \;
  #5 (permalink)  
Old 05-01-2007
kahuna's Avatar
kahuna kahuna is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 149
It may not be possible if the name contains a "/".
http://www.faqs.org/faqs/unix-faq/fa...section-2.html

But you could try the
Code:
rm -ri .
and answer "n" to everything but the problem directory/file.

Last edited by kahuna; 05-02-2007 at 07:21 AM.. Reason: Additional thought.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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




All times are GMT -4. The time now is 03:47 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0