timeout
command$ timeout 10s bash -c "CMD"
timeout [TIME]
TIME:
's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days.
timeout 1s bash -c "ssh user@123.456.789.1 \"du -sh ${DIR}\""
echo $?
--> timeout 발생 시: 124
--> timeout 내 성공 시: 0