How to check if a file exists on a server with bash
Checking if a file exists on my computer is easy. But how about checking if this file exist on my server?
If my file is:
What do I need to do to check if it exists?
How about this?
ssh user@host 'if [ -f /path/to/my/file.txt ]; then echo yes; else echo no; fi'