changed from using ls to find to handle very large number of snapshots

git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@415631 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
William Au 2006-06-20 12:22:57 +00:00
parent 1160b4de26
commit 193ca199e3
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ fi
# get directory name of latest snapshot if not specified on command line
if [[ -z ${snap_name} ]]
then
snap_name=`ssh -o StrictHostKeyChecking=no ${master_host} "ls -d ${master_data_dir}/snapshot.* 2>/dev/null"|tail -1`
snap_name=`ssh -o StrictHostKeyChecking=no ${master_host} "find ${master_data_dir} -name snapshot.* -print"|grep -v wip|sort -r|head -1`
fi
if [[ "${snap_name}" == "" ]]
then