Skip to content

Commit 4c2e17b

Browse files
authored
Use find instead of ls to search files (#234)
1 parent 9849594 commit 4c2e17b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/run_client_script.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if [[ "$EXPERIMENT_MODE" == "full" ]] || [[ "$EXPERIMENT_MODE" == "upload" ]]; t
6161
fi
6262

6363
if [[ "$EXPERIMENT_MODE" == "full" ]] || [[ "$EXPERIMENT_MODE" == "search" ]]; then
64-
SEARCH_RESULT_FILE=$(ssh -o ServerAliveInterval=10 -o ServerAliveCountMax=10 "${SERVER_USERNAME}@${IP_OF_THE_CLIENT}" "ls -t results/*-search-*.json | head -n 1")
64+
SEARCH_RESULT_FILE=$(ssh -o ServerAliveInterval=10 -o ServerAliveCountMax=10 "${SERVER_USERNAME}@${IP_OF_THE_CLIENT}" "find results/ -type f -name '*-search-*.json' -printf '%T@ %p\n' | sort -nr | head -n 1 | cut -d' ' -f2-")
6565
result_files_arr+=("$SEARCH_RESULT_FILE")
6666
fi
6767

0 commit comments

Comments
 (0)