Skip to content

Instantly share code, notes, and snippets.

@lslucas
Created March 6, 2014 18:49
Show Gist options
  • Save lslucas/9396753 to your computer and use it in GitHub Desktop.
Save lslucas/9396753 to your computer and use it in GitHub Desktop.
Check if file exists in bash/terminal/unix
[ -f /etc/hosts ] && echo "Found" || echo "Not found"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment