Re: [SLUG] Oh Sh.. I made a mistake

From: Bill Triplett (btt@nethouse.com)
Date: Wed Oct 17 2001 - 08:34:26 EDT


On Wed, Oct 17, 2001 at 07:45:35AM -0400, Bryan-TheBS-Smith wrote:
> Mike Manchester wrote:
> > I moved a file with the following command. Thinking it would
> > move the file to my current working dir.
> > mv /path/*.zip
> > Is there anyway to get these files back? They aren't in my
> > current working dir as I would have expected (with dos anyway).
>
> You should have gotten a syntax error and the files weren't moved.
> Check the path again, they should still be there.

Not necessarily. If there were two files ending in .zip in that
directory, the alphabetically-first file's data would be mv'd to
the alphabetically-last file's name, and the last file would be
toast/replaced. The shell expands * into a list before passing it
to mv.

>
> Now use:
> mv /path/*.zip .
>
> -- TheBS



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:24:50 EDT