Around 05:00pm on Monday, July 09, 2007 (UK time), lists@xxxxxxxxxxx scrawled: > Hi, I don't know if I already sent this question or not, my server > died before, and I havn't been able to receive the mails for a while. > > I want to move the files from one dir to another, but only if they are > newer. So I do: > > mv -u /tmp/dirA/dirB /dirC/dirB > > Meaning moving it from being a subdir of /tmp/dirA to be a subdir of /dirC. > > The first time it works, but the next time it will end up being like this: > > /dirC/dirB/dirB :( You should have done: mv -u /tmp/dirA/dirB /dirC This will put dirB as a sub directory of /dirC. The only reason it worked the first time as you expected was because /dirC/dirB didn'e exist, so it realised that you wanted the directory moveing. Once it already exists, it assuems you want to move the direcory into the path given in the second argument. I haven't explained this vey well, but I am sure man 'mv will'. Steve -- Play Champions - my free football predictions game at: http://www.stevesearle.com/champs/about.html 20:00:23 up 13 days, 23:39, 1 user, load average: 0.13, 0.10, 0.10
Attachment:
pgpkLJrKD8HDb.pgp
Description: PGP signature