[root@hadoop-master sbin]# jps
2464 NameNode
2963 JobHistoryServer
2667 SecondaryNameNode
3005 Jps
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# hadoop fs -ls
Found 2 items
drwxr-xr-x - root supergroup 0 2022-09-02 03:42 QuasiMonteCarlo_1662061361140_1397960672
drwxr-xr-x - root supergroup 0 2022-09-02 08:46 QuasiMonteCarlo_1662079592104_554319868
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# hadoop fs -mkdir /zwf
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# hadoop fs -ls /zwf
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# hadoop fs -ls /
Found 3 items
drwxrwx--- - root supergroup 0 2022-09-02 02:49 /tmp
drwxr-xr-x - root supergroup 0 2022-09-02 02:52 /user
drwxr-xr-x - root supergroup 0 2022-09-02 16:26 /zwf
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# hadoop fs -copyFromLocal /zwf/ZengWenFeng-hadoop.txt /zwf
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# hadoop fs -ls /zwf
Found 1 items
-rw-r--r-- 3 root supergroup 16 2022-09-02 16:27 /zwf/ZengWenFeng-hadoop.txt
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# hadoop fs -getToLocal /zwf/ZengWenFeng-hadoop.txt /zwf_hadoop
-getToLocal: Unknown command
[root@hadoop-master sbin]# hadoop fs -getToLocal /zwf/ZengWenFeng-hadoop.txt
-getToLocal: Unknown command
[root@hadoop-master sbin]# hadoop fs -get /zwf/ZengWenFeng-hadoop.txt
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# ll
total 124
-rw-r--r-- 1 root root 16 Sep 2 16:32 ZengWenFeng-hadoop.txt
-rwxr-xr-x 1 1000 ftp 2752 Jul 19 2018 distribute-exclude.sh
-rwxr-xr-x 1 1000 ftp 6452 Jul 19 2018 hadoop-daemon.sh
-rwxr-xr-x 1 1000 ftp 1360 Jul 19 2018 hadoop-daemons.sh
-rwxr-xr-x 1 1000 ftp 1640 Jul 19 2018 hdfs-config.cmd
-rwxr-xr-x 1 1000 ftp 1427 Jul 19 2018 hdfs-config.sh
-rwxr-xr-x 1 1000 ftp 2291 Jul 19 2018 httpfs.sh
-rwxr-xr-x 1 1000 ftp 3128 Jul 19 2018 kms.sh
-rwxr-xr-x 1 1000 ftp 4080 Jul 19 2018 mr-jobhistory-daemon.sh
-rwxr-xr-x 1 1000 ftp 1648 Jul 19 2018 refresh-namenodes.sh
-rwxr-xr-x 1 1000 ftp 2145 Jul 19 2018 slaves.sh
-rwxr-xr-x 1 1000 ftp 1779 Jul 19 2018 start-all.cmd
-rwxr-xr-x 1 1000 ftp 1471 Jul 19 2018 start-all.sh
-rwxr-xr-x 1 1000 ftp 1128 Jul 19 2018 start-balancer.sh
-rwxr-xr-x 1 1000 ftp 1401 Jul 19 2018 start-dfs.cmd
-rwxr-xr-x 1 1000 ftp 3734 Jul 19 2018 start-dfs.sh
-rwxr-xr-x 1 1000 ftp 1357 Jul 19 2018 start-secure-dns.sh
-rwxr-xr-x 1 1000 ftp 1571 Jul 19 2018 start-yarn.cmd
-rwxr-xr-x 1 1000 ftp 1347 Jul 19 2018 start-yarn.sh
-rwxr-xr-x 1 1000 ftp 1770 Jul 19 2018 stop-all.cmd
-rwxr-xr-x 1 1000 ftp 1462 Jul 19 2018 stop-all.sh
-rwxr-xr-x 1 1000 ftp 1179 Jul 19 2018 stop-balancer.sh
-rwxr-xr-x 1 1000 ftp 1455 Jul 19 2018 stop-dfs.cmd
-rwxr-xr-x 1 1000 ftp 3206 Jul 19 2018 stop-dfs.sh
-rwxr-xr-x 1 1000 ftp 1340 Jul 19 2018 stop-secure-dns.sh
-rwxr-xr-x 1 1000 ftp 1642 Jul 19 2018 stop-yarn.cmd
-rwxr-xr-x 1 1000 ftp 1340 Jul 19 2018 stop-yarn.sh
-rwxr-xr-x 1 1000 ftp 4295 Jul 19 2018 yarn-daemon.sh
-rwxr-xr-x 1 1000 ftp 1353 Jul 19 2018 yarn-daemons.sh
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# hadoop fs -get /zwf/ZengWenFeng-hadoop.txt /zwf_hadoop
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# hadoop fs -copyToLocal /zwf/ZengWenFeng-hadoop.txt /zwf_hadoop
copyToLocal: `/zwf_hadoop/ZengWenFeng-hadoop.txt': File exists
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# ll /zwf_hadoop
total 4
-rw-r--r-- 1 root root 16 Sep 2 16:33 ZengWenFeng-hadoop.txt
drwxr-xr-x 4 root root 30 Sep 1 23:52 hdfs
drwxr-xr-x 3 root root 17 Sep 2 02:24 tmp
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# hadoop fs -text /zwf/ZengWenFeng-hadoop.txt
dsflajlajfl;ksdj
[root@hadoop-master sbin]#
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# hadoop fs -cat /zwf/ZengWenFeng-hadoop.txt
dsflajlajfl;ksdj
[root@hadoop-master sbin]#
[root@hadoop-master sbin]#
[root@hadoop-master sbin]#
export HADOOP_HOME=/zwf/hadoop-2.7.7
export PATH=${JAVA_HOME}/bin:${HADOOP_HOME}/bin:${HADOOP_HOME}/sbin:$PATH
unset i
unset -f pathmunge
[root@hadoop-master sbin]#
[root@hadoop-master sbin]# cd /
[root@hadoop-master /]#
[root@hadoop-master /]# hadoop fs -cat /zwf/ZengWenFeng-hadoop.txt
dsflajlajfl;ksdj[root@hadoop-master /]#
[root@hadoop-master /]#
[root@hadoop-master /]# hadoop fs -mkdir /zwf2
[root@hadoop-master /]#
[root@hadoop-master /]# hadoop fs -ls /
Found 4 items
drwxrwx--- - root supergroup 0 2022-09-02 02:49 /tmp
drwxr-xr-x - root supergroup 0 2022-09-02 02:52 /user
drwxr-xr-x - root supergroup 0 2022-09-02 16:27 /zwf
drwxr-xr-x - root supergroup 0 2022-09-02 16:40 /zwf2
[root@hadoop-master /]#
[root@hadoop-master /]#
[root@hadoop-master /]#
![](https://i-blog.csdnimg.cn/blog_migrate/e2ebfc8b472264f245df147e9678d5b5.png)
![](https://i-blog.csdnimg.cn/blog_migrate/ec7d7aaac6ecc8001c3b321af434d64b.png)
![](https://i-blog.csdnimg.cn/blog_migrate/c9389eeff718a19313aa8f7a271af25b.png)