Re: Can't Delete File with Crazy -name

From: Steven Kurylo <sk_at_no.spam.please>
Date: Sat Mar 03 2007 - 11:46:36 CST

From the man page...

To remove a file whose name starts with a `-', for example `-foo', use
one of these commands:

              rm -- -foo

              rm ./-foo

On 3/3/07, Tim Schneider <tim@timsworld.net> wrote:
>
> So on one server with samba running Winblows client created a file named
> -Empress.
>
> On another server rsync runs and pulls a backup of the samba server's
> files.
>
> Cleaning up, I was not able to delete the diectory on the samba server
> using the Winblows client but I was able to change the name of the
> directory to +Empress then delete it with a shell command.
>
> I can not get rid of the copy on the backup server. No samba available
> either so now what? Below is a short list of some things I have tried.
>
> $ mv '/-Empress' +Empress
> mv: cannot stat `/-Empress': No such file or directory
>
> $ mv '-Empress' +Empress
> mv: invalid option -- E
> Try `mv --help' for more information.
>
> $ ls ?Empress
> ls: invalid option -- E
> Try `ls --help' for more information.
>
> --
> "Those who do not understand Unix are condemned to reinvent it, poorly."
> (Henry Spencer, 1987)
>
> To unsubscribe, send a message with the word "unsubscribe" (without the
> quotes) in the body to linux-request@slg.org
> Archives are at http://list.slg.org/
>
Received on Sat, 3 Mar 2007 09:46:36 -0800

This archive was generated by hypermail 2.1.8 : Sat Mar 03 2007 - 11:46:49 CST