Hi,

I was helping somebody who's getting stuck with temporary indices (index.tmp*) 
due to some hardware/network error.  I saw the following in snapinstaller:

cp -lr ${name}/ ${data_dir}/index.tmp$$
/bin/rm -rf ${data_dir}/index
mv -f ${data_dir}/index.tmp$$ ${data_dir}/index

Would it be better/safer to do things like the following (in general, not just 
here) instead?
 
cp -lr ${name}/ ${data_dir}/index.tmp$$ && \
/bin/rm -rf ${data_dir}/index && \
mv -f ${data_dir}/index.tmp$$ ${data_dir}/index



Thanks,
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch


Reply via email to