* SUMMARY: Trap for the careless with mv (was) Anyone have trouble with mv?
@ 1997-06-03 2:32 David Bremer
0 siblings, 0 replies; only message in thread
From: David Bremer @ 1997-06-03 2:32 UTC (permalink / raw)
To: tru64-unix-managers
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
>
>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-06-03 2:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-06-03 2:32 SUMMARY: Trap for the careless with mv (was) Anyone have trouble with mv? David Bremer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox