The only scenario that I can come up with (ie what I probably did!) is:
If I misnamed the target directory in the script then the mv command
would assume this is a file name.
SO as I read in each filename to move - mv diligently renames it. IE as
I'm reading in a list of names, each one clobbers the previous one (even
with noclobber set)
But of course we always make a temporary backup (ie copy or tar
elsewhere) don't we? In this case NOT!!
But I think I've recovered most of it one way or another
Original query:
>I've just had a minor (is there any such thing?) catastrophe with using
>mv to sort out some used vs unused scripts
>
>I had a list of used scripts in a file .
>I read that into a "while" (using ksh) that mv'd them to a dir called
>"used"
>then I moved the remaining contents of the target dir to "unused"
>then mv'd the used/* back into the original directory
>
>BUT
>
>a number of files are missing - not on the machine ANYWHERE!!!
>
>Is there / was there / a problem with mv that I should have patched????
>
>anyone else had this prob
>
>oh woe is me :-(
>
>Dave
>
>--
>Clinical Account Manager, Information Systems
>Healthcare Otago (Dunedin NZ)
>
>Ph external: 03 - 4747699
>Ph internal: NB CHANGE extn 8830
>email: daveb_at_healthotago.co.nz
>
>Pretentious quote of the week/month (whatever):
>"On the Internet people who are normally under rocks are out there and
>in your face" - Douglas Adams
>
>
Received on Tue Jun 03 1997 - 04:39:10 NZST