HDFS 檔案管理

2021-10-11 00:22:34 字數 2703 閱讀 9194

關於hdfs訪問的相對路徑以及絕對路徑

[root@node-01 hadoop-2.6.0-cdh5.14.0]

# hdfs dfs

usage: hadoop fs [generic options]

...

][-cat [-ignorecrc]

...]

[-checksum

...]

[-chgrp [-r] group path...]

[-chmod [-r]

... | octalmode> path...]

[-chown [-r]

[owner]

[:[group]

] path...]

[-copyfromlocal [-f]

[-p]

[-l]

...

][-copytolocal [-p]

[-ignorecrc]

[-crc]

...

][-count [-q]

[-h]

[-v]

[-x]

...]

[-cp [-f]

[-p | -p[topax]

]...

][-createsnapshot

][-deletesnapshot

][-df [-h]

[...]

][-du [-s]

[-h]

[-x]

...]

[-expunge]

[-find

...

...]

[-get [-p]

[-ignorecrc]

[-crc]

...

][-getfacl [-r]

][-getfattr [-r]

[-e en]

][-getmerge [-nl]

][-help [cmd ...]

][-ls [-c]

[-d]

[-h]

[-q]

[-r]

[-t]

[-s]

[-r]

[-u]

[...]

][-mkdir [-p]

...]

[-movefromlocal

...

][-movetolocal

][-mv

...

][-put [-f]

[-p]

[-l]

...

][-renamesnapshot

][-rm [-f]

[-r|-r]

[-skiptrash]

...]

[-rmdir [--ignore-fail-on-non-empty]

...]

[-setfacl [-r]

|[--set

]][-setfattr

][-setrep [-r]

[-w]

...]

[-stat [format]

...]

[-tail [-f]

][-test -[defsz]

][-text [-ignorecrc]

...]

[-touchz

...]

[-usage [cmd ...]

]

hdfs dfs -ls 路徑
hdfs dfs -rm 【-r】 你要刪除的檔案或者目錄

-r:表示遞迴,用於刪除目錄

-skiptrash:不經過**站,直接刪除

hdfs dfs -cp $

$

hdfs dfs -mv $source

$target

hdfs dfs -mkdir 【-p】 你要建立的 路徑

-p:表示遞迴建立

hdfs dfs -chmod 你要修改的許可權 你要修改誰

hdfs dfs -chmod 777 /tmp/test

hdfs dfs -put 本地檔案系統的檔案 hdfs檔案系統
hdfs dfs -get hdfs檔案系統的檔案 本地檔案系統
開啟了**站,並自動定期清理**站,單位為分鐘,7天,預設為0,表示不開啟**站

大資料入門 HDFS檔案管理系統簡介

hadoop作為大資料主流的基礎架構選擇,至今仍然佔據著重要的地位,而基於hadoop的分布式檔案系統hdfs,也在大資料儲存環節發揮著重要的支撐作用。今天的大資料入門分享,我們就主要來講講hdfs分布式檔案管理系統。根據物理儲存形態,資料儲存可分為集中式儲存與分布式儲存兩種。集中式儲存以傳統儲存陣...

合併 hdfs 檔案

待研究,只做儲存 將hdfs中不同目錄下面的資料合在一起,並存放在指定的目錄中,示例如 sqoop merge new data test p1 person onto test p2 person target dir test merged jar file opt data sqoop per...

HDFS 檔案許可權

hadoop fs ls countout rw r r 3 root supergroup 1311 2018 06 20 00 11 coun rw r r 3root supergroup 1311 2018 06 20 00 11 countout part r 00000 檔案訪問許可權 ...