gzip: already exists; do you wish to overwrite (y or n)? n

Fórumok

Szervusztok!

Ilyen itt még nincs, gondoltam okulásképp megírom.
A gzip kérdez kicsomagolásnál, ha létezik hasonló nevű file, de hiába utasítod el, felülcsapja.
It's a BUG or a feature?
Példa lentebb. Üdv, vfero


#!/bin/bash -u
#
# gzip decompressing overwrite test script
# vfero 07/12/2013

\mkdir ~/gzipTest					# create test directory
\cd $_							# get it
\echo $_ > bug_file					# dummy file containt
\echo "gzip is overwrite" | gzip -9 > bug_file.gz	# create archive
\gzip -d bug_file.gz					# choose n
\cat bug_file						# overwrite :(
\ls -al							# list
\cat << EOF
My gzip version is:

gzip -V
gzip 1.5
Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Jean-loup Gailly.

My system versions are:
lsb_release -a
LSB Version:	core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID:	Debian
Description:	Debian GNU/Linux 7.2 (wheezy)
Release:	7.2
Codename:	wheezy
EOF

\exit

# \rm -rf ~/gzipTest								# remove all

Hozzászólások

Nálam 1.5-1.1 gzip van, azzal nem tudom reprodukálni a hibát.