Answers

Question and Answer:

  Home  Shell Scripting

⟩ How do you test for file properties in shell scripts?

-s filename tells you if the file is not empty, -f filename tells you whether the argument is a file, and not a directory, -d filename tests if the argument is a directory, and not a file, -w filename tests for writeability, -r filename tests for readability, -x filename tests for executability

 153 views

More Questions for you: