How to check the remote file whether it exists?

Check the remote file whether it exists

ssh -q ubuntu@10.10.10.10 [[ -f /etc/nginx/conf.d/test.conf ]] && echo "true" || echo "false"

Leave a Reply

Your email address will not be published. Required fields are marked *