你在hive上面要想查看 hdfs 的东西, 原本你需要再打开一个crt终端,现在不用了.
hive面板查看hdfs上面的东西
直接 dfs 后面跟上命令就可以了,比如说
下面的查看hdfs 根目录下的文件有哪些
hive (default)> dfs -ls /;Found 11 items-rw-r--r-- 3 root supergroup 261987 2020-08-20 11:45 /0824ab18972bd40787bafea56c899e510fb3096c.jpgdrwxr-xr-x - root supergroup 0 2020-08-20 12:16 /eclipserename-rw-r--r-- 3 root supergroup 14 2020-08-17 18:19 /hello.txtdrwxr-xr-x - root supergroup 0 2020-09-13 14:14 /hivedrwxr-xr-x - root supergroup 0 2020-08-26 21:03 /mroutputdrwx------ - root supergroup 0 2020-09-11 12:41 /tmpdrwxr-xr-x - root supergroup 0 2020-09-12 19:45 /userdrwxr-xr-x - root supergroup 0 2020-08-17 18:34 /wcdrwxr-xr-x - root supergroup 0 2020-08-20 12:46 /wc2drwxr-xr-x - root supergroup 0 2020-08-18 22:13 /wc3drwxr-xr-x - root supergroup 0 2020-08-24 21:31 /wordcounthive (default)>
hive上面执行Linux命令
只需要在命令之前添加 感叹号就行了
hive (default)> [root@zjj101 conf]# hiveLogging initialized using configuration in jar:file:/root/soft/hive-1.2.1/lib/hive-common-1.2.1.jar!/hive-log4j.propertieshive (default)> ! ls> ;beeline-log4j.properties.templatehive-default.xml.templatehive-env.sh.templatehive-exec-log4j.properties.templatehive-log4j.properties.templatehive-site.xmlivysettings.xmlhive (default)>
