[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: possible flaw in mv
From: |
Eric Blake |
Subject: |
Re: possible flaw in mv |
Date: |
Wed, 12 Jul 2006 06:09:33 -0600 |
User-agent: |
Thunderbird 1.5.0.4 (Windows/20060516) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Josh Peck on 7/12/2006 3:03 AM:
> I'm not sure this is a flaw, but 'mv *' seems to make files disappear
> without making "deleted" blocks in the file system available. shouldn't
> mv always require 2 args? and as a side note does anyone know how to
> recover data from this. doesn't seem to effect hidden files
Thanks for the report. However, this is not a bug, but a misunderstanding
on your part on how shells work. Try "echo mv *" to see what is actually
happening - the shell expands the * prior to invoking mv, and you are
invoking mv with as many arguments as you have non-hidden entries in the
current directory. And if you are unfortunate enough to have a directory
as the last element listed in the current directory, then the rest of the
directory contents are moved into that final subdirectory. To recover
things, go looking in that remaining subdirectory where you moved them to.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEtOZ984KuGfSFAYARAqT5AKCMEWWAA03naoUzYFPJRgK4keKcewCgr9c8
MN8edFTzE9IOYV+504Qj9FQ=
=fSGl
-----END PGP SIGNATURE-----