如何强制将文件从Hdfs复制到linux文件系统?

时间:2019-03-20 18:05:32

标签: linux hadoop hdfs

对于命令-copyFromLocal,有一个-f选项,它将强制将数据从本地文件系统复制到Hdfs。与-copyToLocal选项类似,我尝试了-f选项,但是没有用。所以,任何人都可以在这方面指导我。

谢谢

Karthik

1 个答案:

答案 0 :(得分:0)

-f中没有这样的copytolocal

$ hadoop fs -help

Usage: hadoop fs [generic options]

    [-appendToFile <localsrc> ... <dst>]

    [-cat [-ignoreCrc] <src> ...]

    [-checksum <src> ...]

    [-chgrp [-R] GROUP PATH...]

    [-chmod [-R] <MODE[,MODE]... | OCTALMODE> PATH...]

    [-chown [-R] [OWNER][:[GROUP]] PATH...]

    [-copyFromLocal [-f] [-p] <localsrc> ... <dst>]

    [-copyToLocal [-p] [-ignoreCrc] [-crc] <src> ... <localdst>]

    [-count [-q] <path> ...]

    [-cp [-f] [-p | -p[topax]] <src> ... <dst>]

    [-createSnapshot <snapshotDir> [<snapshotName>]]

    [-deleteSnapshot <snapshotDir> <snapshotName>]

    [-df [-h] [<path> ...]]

    [-du [-s] [-h] <path> ...]

    [-expunge]

    [-get [-p] [-ignoreCrc] [-crc] <src> ... <localdst>]

    [-getfacl [-R] <path>]

    [-getfattr [-R] {-n name | -d} [-e en] <path>]

    [-getmerge [-nl] <src> <localdst>]

    [-help [cmd ...]]

    [-ls [-d] [-h] [-R] [<path> ...]]

    [-mkdir [-p] <path> ...]

    [-moveFromLocal <localsrc> ... <dst>]

    [-moveToLocal <src> <localdst>]

    [-mv <src> ... <dst>]

    [-put [-f] [-p] <localsrc> ... <dst>]

    [-renameSnapshot <snapshotDir> <oldName> <newName>]

    [-rm [-f] [-r|-R] [-skipTrash] <src> ...]

    [-rmdir [--ignore-fail-on-non-empty] <dir> ...]

    [-setfacl [-R] [{-b|-k} {-m|-x <acl_spec>} <path>]|[--set <acl_spec> <path>]]

    [-setfattr {-n name [-v value] | -x name} <path>]

    [-setrep [-R] [-w] <rep> <path> ...]

    [-stat [format] <path> ...]

    [-tail [-f] <file>]

    [-test -[defsz] <path>]

    [-text [-ignoreCrc] <src> ...]

    [-touchz <path> ...]

请参考此以获取更多信息Hadoop hdfs commands