HDFs Common shell commands

Source: Internet
Author: User
Tags hadoop fs

HDFS File Operations Command
[ email protected] sbin]$ Hadoop fsusage: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] [-l] <localsrc> ... <dst>]    [-copytolocal [-P] [-IGNORECRC] [-CRC] <src> ... <localdst>]    [-count [-Q] [-h] <path> ...] [-CP [-f] [-P |-p[topax]] <src> ... <dst>]    [-createsnapshot <snapshotDir> [<snapshotname>]]    [-deletesnapshot <snapshotDir> <snapshotName>]    [-DF [-h] [<path> ...]] [-du [-S] [-h] <path> ...] [-Expunge] [-find <path> ... <expression> ...] [-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] [-l] <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> ...] [-truncate [-W] <length> <path> ...] [-usage [cmd ...]

Management commands for HDFs
[Email protected] hadoop-2.7.3]$ bin/HDFs Dfsadminusage:hdfs dfsadminnote:administrative commands can only be run as the HDFs Superuser. [-report [-live] [-dead] [-Decommissioning]] [-safemode <enter | Leave | Get | Wait>]    [-Savenamespace] [-Rolledits] [-restorefailedstoragetrue|false|Check] [-Refreshnodes] [-setquota <quota> <dirname>...<dirname>]    [-clrquota <dirname>...<dirname>]    [-setspacequota <quota> [-storagetype <storagetype>] <dirname>...<dirname>]    [-clrspacequota [-storagetype <storagetype>] <dirname>...<dirname>]    [-Finalizeupgrade] [-rollingupgrade [<query|prepare|finalize>]]    [-Refreshserviceacl] [-Refreshusertogroupsmappings] [-Refreshsuperusergroupsconfiguration] [-Refreshcallqueue] [-refresh [Arg1. ARGN] [-reconfig <datanode|...> ]    [-Printtopology] [-Refreshnamenodes Datanode_host:ipc_port] [-deleteblockpool datanode_host:ipc_port blockpoolid [Force]] [-setbalancerbandwidth <bandwidth in bytes per second>]    [-fetchimage <local directory>]    [-allowsnapshot <snapshotDir>]    [-disallowsnapshot <snapshotDir>]    [-shutdowndatanode <datanode_host:ipc_port>[upgrade]] [-getdatanodeinfo <datanode_host:ipc_port>]    [-metasave FileName] [-triggerblockreport [-incremental] <datanode_host:ipc_port>]    [-help [CMD]]

Start a service individually

hadoop-deamon.sh Start Namenode

Start a DN

hadoop-daemon.sh Start Datanode

hadoop-daemon.sh Start NodeManager

HDFs Common shell commands

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.