Andreas Krey <a.krey@xxxxxx> writes: > On Thu, 23 May 2013 13:25:55 +0000, Ramkumar Ramachandra wrote: >> Junio C Hamano wrote: >> > I have "largedir" I want to get rid of, but there is a directory >> > I want to save, "largedir/precious", in it, so I do >> > >> > cp -R largedir/precious precious >> > >> > and then run 'rm -rf largedir' in another terminal in parallel. > > 'mv largedir/precious precious; rm -rf largedir'? No race here. Yeah, but 'cp -R largedir/precious precious; rm -fr largedir' is the same thing. Ram's original issue was "I do something else in another terminal without waiting for the first command to finish". Even with 'mv', between the time the main in mv starts and the process finally issues rename(2) on the directory, you can start running what competes and interferes with it in another terminal, so it does not fundamentally change anything, I would have to say. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html