test
Performs a file test.
The usage is as follows:
$ hadoop fs -test -[defswrz] URI
-d |
If the path is a directory, returns |
-e |
If the path exists, returns |
-f |
If the path is a file, returns |
-s |
If the path is not empty, returns |
-s |
If the path exists and write permission is granted, returns |
-r |
If the path exists and read permission is granted, returns |
-z |
If the file is zero length, returns |
Example:
$ hadoop fs -test -e filename