1.

How Do You Test For File Properties In Shell Scripts?

Answer»

-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

-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



Discussion

No Comment Found