From: David Bremer <DaveB () healthotago ! co ! nz>
To: tru64-unix-managers
Subject: SUMMARY: Trap for the careless with mv (was) Anyone have trouble with mv?
Date: Tue, 03 Jun 1997 02:32:46 +0000 [thread overview]
Message-ID: <96078613510159.tru64-unix-managers.marc@archive.invalid> (raw)
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@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
>
>
reply other threads:[~1997-06-03 2:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox