deleting file '--preserve-permissions'
youshi10 at u.washington.edu
Sat Mar 31 21:49:30 UTC 2007
Derek Ragona wrote:
> rm -i *
> only answer y to the one you want deleted.
> At 02:36 PM 3/31/2007, lalev at uni-svishtov.bg wrote:
>> I've made mistake with tar. Something like
>> tar cvfz --preserve-permissions home.tgz *
>> 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 ;)..
More information about the freebsd-questions