Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jan 2009 10:33:13 +0000
From:      Anton Shterenlikht <mexas@bristol.ac.uk>
To:        freebsd-questions@freebsd.org
Subject:   can't work with a file starting with dash space '- ' ?
Message-ID:  <20090116103313.GA40221@mech-cluster238.men.bris.ac.uk>

Next in thread | Raw E-Mail | Index | Archive | Help
By mistake I saved an email attachmed as it was called, probably
from MS world:
- Reviewer Comments - FFEMS - Closure paper.pdf

Now I cannot delete, or rename it.

% cp -\ Reviewer\ Comments\ -\ FFEMS\ -\ Closure\ paper.pdf z
cp: illegal option --  
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file ... target_directory
% rm -\ Reviewer\ Comments\ -\ FFEMS\ -\ Closure\ paper.pdf 
rm: illegal option --  
usage: rm [-f | -i] [-dIPRrvW] file ...
       unlink file
% 

I can view it with xpdf, but that's about all.
I tried wildcards and quotes, sh, csh, bash, tcsh and superuser but no luck.

How can I delete or rename this file?

many thanks
anton

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 928 8233 
Fax: +44 (0)117 929 4423



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20090116103313.GA40221>