Re: can't delete a file
Patrick Hsieh wrote: > Hello list, > > I created a file as root and chown it to a common account, then su to > that account, trying to delete it as that account but failed. Any idea? > this is one of the most problems for unix newbies... basically, when you remove a file you don't modify it, but the directory that contains it. so to remove a file you need write permission on the directory, and the permissions on the file are almost completely irrilevant. hope this helps. pietro. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: can't delete a file
On Wednesday 04 September 2002 11:14, Patrick Hsieh wrote: > Hello list, > > I created a file as root and chown it to a common account, then su to > that account, trying to delete it as that account but failed. Any idea? > > # touch todel > # chown pahud todel > # ls -l todel > -rw-r--r--1 pahud root0 Sep 4 16:08 todel > # su pahud > > > rm -f todel > > rm: cannot unlink `todel': Permission denied > > > ls -al todel > > -rw-r--r--1 pahud root0 Sep 4 16:08 todel > > > > -- > Patrick Hsieh <[EMAIL PROTECTED]> this may have something to do with the permitions of the directory this file is in. i would check that. tal. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re[2]: can't delete a file
Hello Sean 'Shaleh' Perry <[EMAIL PROTECTED]>, the permission of that dir is home:/home/swiab# ls -dl . drwxr-xr-x 16 swiabswiab4096 Sep 4 16:25 . Is there anything wrong? > > Check the permissions of the directory the file is in. > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- Patrick Hsieh <[EMAIL PROTECTED]> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: can't delete a file
On Wednesday 04 September 2002 01:14, Patrick Hsieh wrote: > Hello list, > > I created a file as root and chown it to a common account, then su to > that account, trying to delete it as that account but failed. Any idea? > > # touch todel > # chown pahud todel > # ls -l todel > -rw-r--r--1 pahud root0 Sep 4 16:08 todel > # su pahud > > > rm -f todel > > rm: cannot unlink `todel': Permission denied > > > ls -al todel > > -rw-r--r--1 pahud root0 Sep 4 16:08 todel Check the permissions of the directory the file is in. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
can't delete a file
Hello list, I created a file as root and chown it to a common account, then su to that account, trying to delete it as that account but failed. Any idea? # touch todel # chown pahud todel # ls -l todel -rw-r--r--1 pahud root0 Sep 4 16:08 todel # su pahud > rm -f todel rm: cannot unlink `todel': Permission denied > ls -al todel -rw-r--r--1 pahud root0 Sep 4 16:08 todel -- Patrick Hsieh <[EMAIL PROTECTED]> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Can't delete a file
Andre, Type: rm - -test A -- permits the user to mark explicitly the end of any com- mand line options, allowing rm to recognize file arguments that begin with a -. Regards, Dan A. M. Varon wrote: > > On Mon, 11 Aug 1997, Mike Miller wrote: > > > I have a file on my machine that I created that begins with a hyphen. > > How can I delete it. rm -test says can't delete est using option -t (or > > whatever). How do I tell it not to use the hyphen as a switch? > > Use Midnight Commander. Type mc to run the program. > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > Andre M. Varon Lasaltech Incorporated > Technical Head Fax-Tel: (034)433-3520 > e-mail : [EMAIL PROTECTED] > web page: http://www.lasaltech.com/andre.html > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > -- > TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to > [EMAIL PROTECTED] . > Trouble? e-mail to [EMAIL PROTECTED] . -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Can't delete a file
On Mon, 11 Aug 1997, Mike Miller wrote: > I have a file on my machine that I created that begins with a hyphen. > How can I delete it. rm -test says can't delete est using option -t (or > whatever). How do I tell it not to use the hyphen as a switch? Use Midnight Commander. Type mc to run the program. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Andre M. Varon Lasaltech Incorporated Technical Head Fax-Tel: (034)433-3520 e-mail : [EMAIL PROTECTED] web page: http://www.lasaltech.com/andre.html =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Can't delete a file
The universal answer comes from comp.unix.faq. Try rm ./-test This should work no matter which ls you are using. Mike Miller wrote: > > I have a file on my machine that I created that begins with a hyphen. > How can I delete it. rm -test says can't delete est using option -t (or > whatever). How do I tell it not to use the hyphen as a switch? // Heikki -- Heikki Vatiainen * [EMAIL PROTECTED] Tampere University of Technology * Tampere, Finland -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Can't delete a file
try rm "-test" Regards, | Debian GNU/ __ o .| R L / / _ _ _ _ _ __ __ Jeff | E I / /__ / / / \// //_// \ \/ / (FidoNet 1:3644/9) | D N// /_/ /_/\/ /___/ /_/\_\ ([EMAIL PROTECTED]) | H U...because lockups are for convicts... ([EMAIL PROTECTED]) | A X ([EMAIL PROTECTED]) HOME| T On Mon, 11 Aug 1997, Mike Miller wrote: > I have a file on my machine that I created that begins with a hyphen. > How can I delete it. rm -test says can't delete est using option -t (or > whatever). How do I tell it not to use the hyphen as a switch? > > > -- > TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to > [EMAIL PROTECTED] . Trouble? > e-mail to [EMAIL PROTECTED] . > -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Can't delete a file
> > I have a file on my machine that I created that begins with a hyphen. > How can I delete it. rm -test says can't delete est using option -t (or > whatever). How do I tell it not to use the hyphen as a switch? > > The easiest (and more portable since not all versions of rm include the "--" option) of doing it is: rm ./-test Richard.. - Richard Dansereau Email: [EMAIL PROTECTED] Home page: http://pobox.com/~rdanse Electrical and Computer Engineering - University of Manitoba - Canada - -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Can't delete a file
I have a file on my machine that I created that begins with a hyphen. How can I delete it. rm -test says can't delete est using option -t (or whatever). How do I tell it not to use the hyphen as a switch? -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Can't delete a file
On Aug 11, Mike Miller wrote > I have a file on my machine that I created that begins with a hyphen. How > can I delete it. rm -test says can't delete est using option -t (or > whatever). How do I tell it not to use the hyphen as a switch? With most GNU tools, '--' means "end option processing here". So "rm -- -test" will do what you want. HTH, Ray -- Cyberspace, a final frontier. These are the voyages of my messages, on a lightspeed mission to explore strange new systems and to boldly go where no data has gone before. -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Can't delete a file
> I have a file on my machine that I created that begins with a hyphen. > How can I delete it. rm -test says can't delete est using option -t (or > whatever). How do I tell it not to use the hyphen as a switch? Try: rm -- -test Andreas -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .