From owner-freebsd-questions@FreeBSD.ORG Fri Jan 16 10:38:13 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1EAC1065690 for ; Fri, 16 Jan 2009 10:38:13 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id 20D478FC0A for ; Fri, 16 Jan 2009 10:38:12 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: by ewy14 with SMTP id 14so2329950ewy.19 for ; Fri, 16 Jan 2009 02:38:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=zg/qNFa05kh9XSQ+R+NShykIvt8ndNnvaE3mg1fP8Cg=; b=PYbY4WS9iM2JmY99dK2l4LHMlo5PE1gOSZvc3j12pMQW9v++bl6fwubiI+5W8f5VUk Icr4FuvKkOgIU7qyr4N4qdp8ZlJJfsCK/tn3shqsAfnXiYGJ9pSpuyN89dyhZEdSpIrG la1RBGNjCyRTb8SWRPkzGtewp0FngASVXBOIQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; b=E16XAMpFCNW3JY7T/u1dkudNJ3Rw15vmSdMMaNUr9YVf8NoJWbb/Rxq3trtk9G8u+o O301EBjveluBzhevUJNiUKvaFv5zJZu3ck8S7csBOPgIX5iJn/+GwCqjFjIfk1ywuvEF kM6+FuR/cMTAtNA60W4Ppb6aRX2O1jMiuQWgU= Received: by 10.210.104.20 with SMTP id b20mr1585578ebc.164.1232102292049; Fri, 16 Jan 2009 02:38:12 -0800 (PST) Received: from darklight.homeunix.org ([85.175.87.173]) by mx.google.com with ESMTPS id 2sm2821269nfv.66.2009.01.16.02.38.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Jan 2009 02:38:11 -0800 (PST) Received: from darklight.homeunix.org (yuri@darklight.homeunix.org [127.0.0.1]) by darklight.homeunix.org (8.14.3/8.14.3) with ESMTP id n0GAbsMb034994; Fri, 16 Jan 2009 13:38:05 +0300 (MSK) (envelope-from yuri.pankov@gmail.com) Received: (from yuri@localhost) by darklight.homeunix.org (8.14.3/8.14.3/Submit) id n0GAbscD034993; Fri, 16 Jan 2009 13:37:54 +0300 (MSK) (envelope-from yuri.pankov@gmail.com) X-Authentication-Warning: darklight.homeunix.org: yuri set sender to yuri.pankov@gmail.com using -f Date: Fri, 16 Jan 2009 13:37:54 +0300 From: Yuri Pankov To: Anton Shterenlikht Message-ID: <20090116103754.GA2317@darklight.homeunix.org> References: <20090116103313.GA40221@mech-cluster238.men.bris.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090116103313.GA40221@mech-cluster238.men.bris.ac.uk> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-questions@freebsd.org Subject: Re: can't work with a file starting with dash space '- ' ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2009 10:38:14 -0000 On Fri, Jan 16, 2009 at 10:33:13AM +0000, Anton Shterenlikht wrote: > 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 Try cp/rm -- -- here denotes the end of command options. HTH, Yuri