Problem removing a file

Peter Fales pfales at ttrde.UUCP
Mon Jan 30 12:27:20 AEST 1989


In article <695 at flatline.UUCP>, erict at flatline.UUCP (The Evil Mel Fujitsu) writes:
> Ok, I've really done it now.  I've created, in my home directory,
> a file by the name of:
> -ef

It was almost a religious experience when I found a general solution to
this kind of problem:

1) ls -i  (to get the inode number of  the file.  Call it N)
2) find . -inum N -print -exec rm {} \;

It works on every problem I have had:  names with spaces, names with
my KILL or INTR characters, names starting with '-', etc.  

Disclaimer:  Your mileage may vary.

-- 
Peter Fales			AT&T, Room 2F-217
				200 Park Plaza
UUCP:	...att!ttrde!pfales	Naperville, IL 60566
Domain: pfales at ttrde.att.com	work:	(312) 416-5357		



More information about the Unix-pc.general mailing list