rhama

Bash file testing parameter

Jan 6th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -b filename - Block special file
  2. -c filename - Special character file
  3. -d directoryname - Check for directory Existence
  4. -e filename - Check for file existence, regardless of type (node, directory, socket, etc.)
  5. -f filename - Check for regular file existence not a directory
  6. -G filename - Check if file exists and is owned by effective group ID
  7. -G filename set-group-id - True if file exists and is set-group-id
  8. -k filename - Sticky bit
  9. -L filename - Symbolic link
  10. -O filename - True if file exists and is owned by the effective user id
  11. -r filename - Check if file is a readable
  12. -S filename - Check if file is socket
  13. -s filename - Check if file is nonzero size
  14. -u filename - Check if file set-user-id bit is set
  15. -w filename - Check if file is writable
  16. -x filename - Check if file is executable
Add Comment
Please, Sign In to add comment