hdfs分布式文件系统
s3 简单存储服务 存储桶与对象
常用指令:
Hadoop客户端(hdfs存储)
hadoop常用指令:
hdfs dfs -ls /
hdfs dfs -put /localfile /user/hadoop/hadoopfile
hdfs dfs -get /user/hadoop/hadoopfile /localfile
hdfs dfs -mv /user/hadoop/hadoopfile1 /user/hadoop/hadoopfile2
hdfs dfs -cp /user/hadoop/hadoopfile1 /user/hadoop/hadoopfile2
hdfs dfs -rm /test.txt
hdfs dfs -rm -r /hello
hdfs dfs -cat /user/hadoop/hadoopfile
hdfs dfs -df -h /
hadoop fs -ls /
hadoop fs -mkdir /user/hadoop
hadoop fs -put localfile /user/hadoop/hadoopfile
hadoop fs -get /user/hadoop/hadoopfile localfile
hadoop fs -rm /user/hadoop/emptydir 删除指定的文件
hadoop fs -rmr /user/hadoop/dir 递归删除
hadoop fs -chmod [-R]
hadoop fs -chown [-R]
MinIO客户端 (S3存储)
mc指令:
chmod +x mc
./mc --help
mc version
mc config host add alias s3-endpoint access-key secret-key --api api-signature --insecure
mc ls test
mc mb test/testbucket
mc cat test/testbucket/testobject.txt
mc cp testobject.txt test/testbucket
mc rm test/testbucket/testobject.txt
本文详细介绍了Hadoop分布式文件系统(HDFS)的基础指令,如文件操作、目录管理,并对比了MinIO客户端在Amazon S3存储服务中的实用命令。通过实例演示,读者可以掌握在HDFS和S3中进行文件上传、下载、移动、复制以及删除的基本技巧。
680

被折叠的 条评论
为什么被折叠?



