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
escaping special characters in file name... lau0001 Shell Programming and Scripting 1 01-19-2008 08:54 PM
Removing special characters in file srivsn Shell Programming and Scripting 6 01-03-2008 06:10 AM
Replace Special characters in a file solai UNIX for Dummies Questions & Answers 1 07-13-2006 10:36 AM
how to see special characters in a file using vi jingi1234 UNIX for Dummies Questions & Answers 6 10-19-2005 11:57 AM
search special characters in a file cramya80 UNIX for Dummies Questions & Answers 2 05-13-2005 12:08 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-2006
yveslagace yveslagace is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 2
How to delete a file with special characters

I don't now exactly how I did it, but I created a file named " -C "

cexdi:/home1 $ls -lt
total 1801336
-rw------- 1 cexdi ced-group 922275840 23 mars 10:03 -C

How do I delete this file ?

cexdi:/home1 $rm -C
rm: invalid option -- C
Syntax : rm [-Rfir] filename ...

Doesn't work... I'm stuck.
  #2 (permalink)  
Old 04-12-2006
yveslagace yveslagace is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 2
Found it.

bash-3.00# mkdir tata
bash-3.00# cd tata
bash-3.00# rm ../"-C"
  #3 (permalink)  
Old 04-12-2006
matrixmadhan matrixmadhan is online now Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,951
many ways of doing it,

1) give the full path and delete
2) find the inode no and delete through that
3) rm \-C
  #4 (permalink)  
Old 04-12-2006
x96riley3 x96riley3 is offline
Registered User
  
 

Join Date: Mar 2006
Location: Nashville
Posts: 79
Long way.

Do a rm -i. This will prompt you 1 file at a time.

Works good if dirs are small or your scared of what might happen.

-X
  #5 (permalink)  
Old 08-14-2007
abhishek_akj abhishek_akj is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 1
two very ways to do this:

1.) rm -- -r
2.) rm ./-r

Beauty lies in Simplicity!!!!!!
  #6 (permalink)  
Old 08-22-2007
psiva_arul's Avatar
psiva_arul psiva_arul is offline
Registered User
  
 

Join Date: Jul 2007
Location: Bangalore, India
Posts: 97
You can delete filename with full path

let me see

rm <filename_path> <filename>

or
rm <filename_path> *-C

Regards,
Siva.P
Bangalore
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 04:00 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