From owner-freebsd-questions@FreeBSD.ORG Sat Mar 31 21:49:30 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9EA5316A53F for ; Sat, 31 Mar 2007 21:49:30 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout5.cac.washington.edu (mxout5.cac.washington.edu [140.142.32.135]) by mx1.freebsd.org (Postfix) with ESMTP id 1FD7A13C45A for ; Sat, 31 Mar 2007 21:49:30 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9] (may be forged)) by mxout5.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l2VLnTrn031001 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 31 Mar 2007 14:49:29 -0700 X-Auth-Received: from [192.168.10.7] (c-67-187-172-183.hsd1.ca.comcast.net [67.187.172.183]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l2VLnTkP003701 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 31 Mar 2007 14:49:29 -0700 Message-ID: <460EE543.5080104@u.washington.edu> Date: Sat, 31 Mar 2007 14:48:35 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <1794.212.25.54.147.1175369763.squirrel@mail.uni-svishtov.bg> <6.0.0.22.2.20070331151239.02578380@mail.computinginnovations.com> In-Reply-To: <6.0.0.22.2.20070331151239.02578380@mail.computinginnovations.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.0.289146, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.3.31.143734 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: deleting file '--preserve-permissions' 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: Sat, 31 Mar 2007 21:49:30 -0000 Derek Ragona wrote: > try: > rm -i * > > only answer y to the one you want deleted. > > -Derek > > > At 02:36 PM 3/31/2007, lalev@uni-svishtov.bg wrote: >> I've made mistake with tar. Something like >> >> tar cvfz --preserve-permissions home.tgz * >> >> or >> >> tar cvfz --preserve-permissions * home.tgz >> >> As result I have a file with name '--preserve-permissions'. >> It seems that it's not easy to delete this file. >> >> rm '--preserve-permissions' >> >> does not give the desired result. >> What should I do :-) rm -- '--perserve-permissions'. -- tells getopt to stop searching and the single quotes are a double bonus because it doesn't interpret the string contents beforehand, but instead passes it on as a straight string. Try: rm "--perserve-permissions" and rm '--perserve-permissions', in that order to just see what happens ;).. -Garrett