It was thus said that the Great Liam Proven once stated:
On 12 December 2011 22:43, Mouse <mouse at
rodents-montreal.org> wrote:
There are
certain commands I've come across that handles extentions
poorly. ?Like gunzip:
[spc]lucy:/tmp>mv x-grey.tar.gz
x-grey.tar.foo
[spc]lucy:/tmp>gunzip x-grey.tar.foo
gunzip: x-grey.tar.foo: unknown suffix -- ignored
[spc]lucy:/tmp>
Yes. ?Annoying, but understandable - without the .gz on there, how is
it to know what file to put the result in?
*Shudder*
Your acceptable peculiarity is my hated misfeature.
gunzip will create a file based on the filename but without the ".gz"
extension. There are only a few choices I see for gunzip handing this:
* extract to a temporary file, then replace the original contents of the
given file with the extracted contents (expand "x-grey.tar.foo" and
place the results in "x-grey.tar.foo")
* extract to a file in another directory (say "/tmp") with the same name
as the original. Problem: What to do if the original file is already in
"/tmp"?
* extract to stdout. Problem: binary data to a tty could leave the tty
with odd settings (or could crash it).
* bitch, which is the current method.
Assuming the Principle of Least Astonishment [1], that last option is the
best. I could live with the first option, but that could be surprising to
some people.
-spc (Still likes his command line ... )
[1]
http://en.wikipedia.org/wiki/Principle_of_least_astonishment