HIVE常用命令——使用SHELL命令和HDFS命令

HIVE客户端使用SHELL命令和HDFS命令
如果需要使用shell命令,可以通过!+shell命令来实现,注意结尾带上分号;

hive (default)> ! ls -l /usr;
dr-xr-xr-x.  2 root root 28672 56 13:53 bin
drwxr-xr-x.  2 root root     6 411 2018 etc
drwxr-xr-x.  2 root root     6 411 2018 games
drwxr-xr-x. 43 root root  8192 318 15:17 include
drwxr-xr-x   3 root root    26 31 12:34 java
dr-xr-xr-x. 30 root root  4096 37 20:06 lib
dr-xr-xr-x. 44 root root 28672 318 15:17 lib64
drwxr-xr-x. 23 root root  4096 37 19:19 libexec
drwxr-xr-x. 15 root root   175 318 15:17 local
dr-xr-xr-x.  2 root root 16384 37 19:19 sbin
drwxr-xr-x. 92 root root  4096 38 10:10 share
drwxr-xr-x.  4 root root    34 114 17:12 src

如果需要使用HDFS命令,可以通过dfs来实现,注意结尾带上分号;

hive (default)> dfs -ls /user/hive;
Found 1 items
drwxrwxrwt   - hive hive          0 2019-05-23 09:58 /user/hive/warehouse

你可能感兴趣的:(Hive)