hadoop fs -test -e <path>
: 检查指定路径是否存在。如果存在,返回0;否则返回非0值。hadoop fs -test -d <path>
: 检查指定路径是否为目录。如果是目录,返回0;否则返回非0值。hadoop fs -test -f <path>
: 检查指定路径是否为普通文件。如果是普通文件,返回0;否则返回非0值。hadoop fs -test -r <path>
: 检查指定路径是否可读。如果可读,返回0;否则返回非0值。hadoop fs -test -w <path>
: 检查指定路径是否可写。如果可写,返回0;否则返回非0值。hadoop fs -test -x <path>
: 检查指定路径是否可执行。如果可执行,返回0;否则返回非0值。hadoop fs -test -s <path>
: 检查指定路径的大小。返回文件或目录的大小(以字节为单位)。hadoop fs -test -z <path>
: 检查指定路径是否为空。如果为空,返回0;否则返回非0值。hadoop fs -test -c <path>
: 检查指定路径是否为符号链接。如果是符号链接,返回0;否则返回非0值。hadoop fs -test -h <path>
: 显示指定路径的详细信息,包括权限、所有者、组和其他属性。