hdfs dfs test 命令

阅读 139

2022-10-28


test

Usage: hadoop fs -test -[defswrz] URI

Options:

-d: if the path is a directory, return 0.
-e: if the path exists, return 0.
-f: if the path is a file, return 0.
-s: if the path is not empty, return 0.
-w: if the path exists and write permission is granted, return 0.
-r: if the path exists and read permission is granted, return 0.
-z: if the file is zero length, return 0.
Example:

hadoop fs -test -e filename

 

 

精彩评论(0)

0 0 举报