开发者社区> 问答> 正文

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

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

谢谢,

展开
收起
祖安文状元 2020-01-05 19:03:06 441 0
1 条回答
写回答
取消 提交回答
  • 没有这样-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命令

    2020-01-05 19:03:17
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Alibaba Cloud Linux 3 发布 立即下载
ECS系统指南之Linux系统诊断 立即下载
ECS运维指南 之 Linux系统诊断 立即下载