Re: to delete file "q!"
From: Bryan Dongray (altnews_at_dongrays.com)
Date: 08/11/05
- Previous message: Lew Pitcher: "Re: prevent user to delete files in its own directory"
- In reply to: ukarekar: "Re: to delete file "q!""
- Next in thread: Urs Thuermann: "Re: to delete file "q!""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 11 Aug 2005 01:16:40 GMT
ukarekar wrote:
> Something else please
It's likely it was created through using vi and ending the session with:
:w q!
so my guess is there are no hidden characters in the filename (like spaces).
But use:
ls -q
to see if there are.
Ways to remove such a file:
rm q!
as ! should not be a special character
But if it is:
rm 'q!'
Using a shell variable might mask the specialness via the shell:
X=q!
rm "$X"
How about using a known shell:
sh -c "/bin/rm 'q!'"
How about using a totally different program:
perl -e 'unlink "q!";'
I'm sure this can be done in even more inventive ways.
Bryan Dongray
- Previous message: Lew Pitcher: "Re: prevent user to delete files in its own directory"
- In reply to: ukarekar: "Re: to delete file "q!""
- Next in thread: Urs Thuermann: "Re: to delete file "q!""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|