本文章基于尚硅谷Hadoop 3.x视频进行总结,仅作为学习交流使用 视频链接如下:44_尚硅谷_Hadoop_HDFS_Shell命令上传_哔哩哔哩_bilibili
1.在hadoop-3.3.4目录下启动hdfs服务
[atguigu@hadoop102 hadoop-3.3.4]$ sbin/start-dfs.sh
Starting namenodes on [hadoop102]
Starting datanodes
Starting secondary namenodes [hadoop104]
#2.查看一个命令的用法
[atguigu@hadoop102 hadoop-3.3.4]$ hadoop fs -help rm
-rm [-f] [-r|-R] [-skipTrash] [-safely] <src> ... :
Delete all files that match the specified file pattern. Equivalent to the Unix
command "rm <src>"
-f If the file does not exist, do not display a diagnostic message or
modify the exit status to reflect an error.
-[rR] Recursively deletes directories.
-skipTrash option bypasses trash, if enabled, and immediately deletes <src>.
-safely option requires safety confirmation, if enabled, requires
&n