Hadoop HDFS Shell 命令

hadoop的基本操作 第一章 使用常用的Shell命令访问HDFS 前言 理解HDFS在Hadoop体系结构中的角色; 使用常用的Shell命令访问HDFS; 提示:以下是本篇文章正文内容,下面案例可供参考 提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 前提准备 进入实验环境后,需要通过jps命令确认hadoop环境是否已启动 如果出现这上图情况说明还没有hadoop未启动,接下来我们便需要启动Hadoop cd /opt/hadoop/sbin hadoop namenode -format ./start-all.sh 启动之后输入 阅读详情

Hadoop Shell Commands

FS Shell

The FileSystem (FS) shell is invoked by bin/hadoop fs <args>. All the FS shell commands take path URIs as arguments. The URI format is scheme://autority/path. For HDFS the scheme is hdfs, and for the local filesystem the scheme is file. The scheme and authority are optional. If not specified, the default scheme specified in the configuration is used. An HDFS file or directory such as/parent/child can be specified as hdfs://namenodehost/parent/child or simply as /parent/child (given that your configuration is set to point to hdfs://namenodehost). Most of the commands in FS shell behave like corresponding Unix commands. Differences are described with each of the commands. Error information is sent to stderr and the output is sent to stdout.

cat

Usage: hadoop fs -cat URI [URI …]

Copies source paths to stdout.

Example:

  • hadoop fs -cat hdfs://nn1.example.com/file1 hdfs://nn2.example.com/file2
  • hadoop fs -cat file:///file3 /user/hadoop/file4

Exit Code:
Returns 0 on success and -1 on error.

chgrp

Usage: hadoop fs -chgrp [-R] GROUP URI [URI …]

Change group association of files. With -R, make the change recursively through the directory structure. The user must be the owner of files, or else a super-user. Additional information is in the Permissions User Guide.

chmod

Usage: hadoop fs -chmod [-R] <MODE[,MODE]... | OCTALMODE> URI [URI …]

Change the permissions of files. With -R, make the change recursively through the directory structure. The user must be the owner of the file, or else a super-user. Additional information is in the Permissions User Guide.

chown

Usage: hadoop fs -chown [-R] [OWNER][:[GROUP]] URI [URI ]

Change the owner of files. With -R, make the change recursively through the directory structure. The user must be a super-user. Additional information is in the Permissions User Guide.

copyFromLocal

Usage: hadoop fs -copyFromLocal <localsrc> URI

Similar to put command, except that the source is restricted to a local file reference.

copyToLocal

Usage: hadoop fs -copyToLocal [-ignorecrc] [-crc] URI <localdst>

Similar to get command, except that the destination is restricted to a local file reference.

cp

Usage: hadoop fs -cp URI [URI …] <dest>

Copy files from source to destination. This command allows multiple sources as well in which case the destination must be a directory. 
Example:

  • hadoop fs -cp /user/hadoop/file1 /user/hadoop/file2
  • hadoop fs -cp /user/hadoop/file1 /user/hadoop/file2 /user/hadoop/dir

Exit Code:

Returns 0 on success and -1 on error.

du

Usage: hadoop fs -du URI [URI …]

Displays aggregate length of files contained in the directory or the length of a file in case its just a file.
Example:
hadoop fs -du /user/hadoop/dir1 /user/hadoop/file1 hdfs://nn.example.com/user/hadoop/dir1 
Exit Code:
Returns 0 on success and -1 on error. 

dus

Usage: hadoop fs -dus <args>

Displays a summary of file lengths.

expunge

Usage: hadoop fs -expunge

Empty the Trash. Refer to HDFS Design for more information on Trash feature.

get

Usage: hadoop fs -get [-ignorecrc] [-crc] <src> <localdst> 

Copy files to the local file system. Files that fail the CRC check may be copied with the -ignorecrc option. Files and CRCs may be copied using the -crc option.

Example:

  • hadoop fs -get /user/hadoop/file localfile
  • hadoop fs -get hdfs://nn.example.com/user/hadoop/file localfile

Exit Code:

Returns 0 on success and -1 on error.

getmerge

Usage: hadoop fs -getmerge <src> <localdst> [addnl]

Takes a source directory and a destination file as input and concatenates files in src into the destination local file. Optionally addnl can be set to enable adding a newline character at the end of each file.

ls

Usage: hadoop fs -ls <args>

For a file returns stat on the file with the following format:
filename <number of replicas> filesize modification_date modification_time permissions userid groupid 
For a directory it returns list of its direct children as in unix. A directory is listed as: 
dirname <dir> modification_time modification_time permissions userid groupid 
Example:
hadoop fs -ls /user/hadoop/file1 /user/hadoop/file2 hdfs://nn.example.com/user/hadoop/dir1 /nonexistentfile 
Exit Code:
Returns 0 on success and -1 on error. 

lsr

Usage: hadoop fs -lsr <args> 
Recursive version of ls. Similar to Unix ls -R.

mkdir

Usage: hadoop fs -mkdir <paths> 

Takes path uri's as argument and creates directories. The behavior is much like unix mkdir -p creating parent directories along the path.

Example:

  • hadoop fs -mkdir /user/hadoop/dir1 /user/hadoop/dir2
  • hadoop fs -mkdir hdfs://nn1.example.com/user/hadoop/dir hdfs://nn2.example.com/user/hadoop/dir

Exit Code:

Returns 0 on success and -1 on error.

movefromLocal

Usage: dfs -moveFromLocal <src> <dst>

Displays a "not implemented" message.

mv

Usage: hadoop fs -mv URI [URI …] <dest>

Moves files from source to destination. This command allows multiple sources as well in which case the destination needs to be a directory. Moving files across filesystems is not permitted. 
Example:

  • hadoop fs -mv /user/hadoop/file1 /user/hadoop/file2
  • hadoop fs -mv hdfs://nn.example.com/file1 hdfs://nn.example.com/file2 hdfs://nn.example.com/file3 hdfs://nn.example.com/dir1

Exit Code:

Returns 0 on success and -1 on error.

put

Usage: hadoop fs -put <localsrc> ... <dst>

Copy single src, or multiple srcs from local file system to the destination filesystem. Also reads input from stdin and writes to destination filesystem.

  • hadoop fs -put localfile /user/hadoop/hadoopfile
  • hadoop fs -put localfile1 localfile2 /user/hadoop/hadoopdir
  • hadoop fs -put localfile hdfs://nn.example.com/hadoop/hadoopfile
  • hadoop fs -put - hdfs://nn.example.com/hadoop/hadoopfile 
    Reads the input from stdin.

Exit Code:

Returns 0 on success and -1 on error.

rm

Usage: hadoop fs -rm URI [URI …]

Delete files specified as args. Only deletes non empty directory and files. Refer to rmr for recursive deletes.
Example:

  • hadoop fs -rm hdfs://nn.example.com/file /user/hadoop/emptydir

Exit Code:

Returns 0 on success and -1 on error.

rmr

Usage: hadoop fs -rmr URI [URI …]

Recursive version of delete.
Example:

  • hadoop fs -rmr /user/hadoop/dir
  • hadoop fs -rmr hdfs://nn.example.com/user/hadoop/dir

Exit Code:

Returns 0 on success and -1 on error.

setrep

Usage: hadoop fs -setrep [-R] <path>

Changes the replication factor of a file. -R option is for recursively increasing the replication factor of files within a directory.

Example:

  • hadoop fs -setrep -w 3 -R /user/hadoop/dir1

Exit Code:

Returns 0 on success and -1 on error.

stat

Usage: hadoop fs -stat URI [URI …]

Returns the stat information on the path.

Example:

  • hadoop fs -stat path

Exit Code:
Returns 0 on success and -1 on error.

tail

Usage: hadoop fs -tail [-f] URI

Displays last kilobyte of the file to stdout. -f option can be used as in Unix.

Example:

  • hadoop fs -tail pathname

Exit Code: 
Returns 0 on success and -1 on error.

test

Usage: hadoop fs -test -[ezd] URI

Options: 
-e check to see if the file exists. Return 0 if true. 
-z check to see if the file is zero length. Return 0 if true 
-d check return 1 if the path is directory else return 0. 

Example:

  • hadoop fs -test -e filename

text

Usage: hadoop fs -text <src> 

Takes a source file and outputs the file in text format. The allowed formats are zip and TextRecordInputStream.

touchz

Usage: hadoop fs -touchz URI [URI …] 

Create a file of zero length.

Example:

  • hadoop -touchz pathname

Exit Code:
Returns 0 on success and -1 on error.


DistCp

Overview

DistCp (distributed copy) is a tool used for large inter/intra-cluster copying. It uses Map/Reduce to effect its distribution, error handling and recovery, and reporting. It expands a list of files and directories into input to map tasks, each of which will copy a partition of the files specified in the source list. Its Map/Reduce pedigree has endowed it with some quirks in both its semantics and execution. The purpose of this document is to offer guidance for common tasks and to elucidate its model.

Usage

Basic

The most common invocation of DistCp is an inter-cluster copy:

bash$ hadoop distcp hdfs://nn1:8020/foo/bar \ 
                    hdfs://nn2:8020/bar/foo

This will expand the namespace under /foo/bar on nn1 into a temporary file, partition its contents among a set of map tasks, and start a copy on each TaskTracker from nn1 to nn2. Note that DistCp expects absolute paths.

One can also specify multiple source directories on the command line:

bash$ hadoop distcp hdfs://nn1:8020/foo/a \ 
                    hdfs://nn1:8020/foo/b \ 
                    hdfs://nn2:8020/bar/foo

Or, equivalently, from a file using the -f option:
bash$ hadoop distcp -f hdfs://nn1:8020/srclist \ 
                       hdfs://nn2:8020/bar/foo 

Where srclist contains
    hdfs://nn1:8020/foo/a 
    hdfs://nn1:8020/foo/b

When copying from multiple sources, DistCp will abort the copy with an error message if two sources collide, but collisions at the destination are resolved per the options specified. By default, files already existing at the destination are skipped (i.e. not replaced by the source file). A count of skipped files is reported at the end of each job, but it may be inaccurate if a copier failed for some subset of its files, but succeeded on a later attempt (see Appendix).

It is important that each TaskTracker can reach and communicate with both the source and destination file systems. For HDFS, both the source and destination must be running the same version of the protocol or use a backwards-compatible protocol (see Copying Between Versions).

After a copy, it is recommended that one generates and cross-checks a listing of the source and destination to verify that the copy was truly successful. Since DistCp employs both Map/Reduce and the FileSystem API, issues in or between any of the three could adversely and silently affect the copy. Some have had success running with -update enabled to perform a second pass, but users should be acquainted with its semantics before attempting this.

It's also worth noting that if another client is still writing to a source file, the copy will likely fail. Attempting to overwrite a file being written at the destination should also fail on HDFS. If a source file is (re)moved before it is copied, the copy will fail with a FileNotFoundException.

Options

Option Index
FlagDescriptionNotes
-p[rbugp]Preserve
  r: replication number
  b: block size
  u: user
  g: group
  p: permission
Modification times are not preserved. Also, when -update is specified, status updates will not be synchronized unless the file sizes also differ (i.e. unless the file is re-created).
-iIgnore failuresAs explained in the Appendix, this option will keep more accurate statistics about the copy than the default case. It also preserves logs from failed copies, which can be valuable for debugging. Finally, a failing map will not cause the job to fail before all splits are attempted.
-log <logdir>Write logs to <logdir>DistCp keeps logs of each file it attempts to copy as map output. If a map fails, the log output will not be retained if it is re-executed.
-m <num_maps>Maximum number of simultaneous copiesSpecify the number of maps to copy data. Note that more maps may not necessarily improve throughput.
-overwriteOverwrite destinationIf a map fails and -i is not specified, all the files in the split, not only those that failed, will be recopied. As discussed in the following, it also changes the semantics for generating destination paths, so users should use this carefully.
-updateOverwrite if src size different from dst sizeAs noted in the preceding, this is not a "sync" operation. The only criterion examined is the source and destination file sizes; if they differ, the source file replaces the destination file. As discussed in thefollowing, it also changes the semantics for generating destination paths, so users should use this carefully.
-f <urilist_uri>Use list at <urilist_uri> as src listThis is equivalent to listing each source on the command line. The urilist_uri list should be a fully qualified URI.
Update and Overwrite

It's worth giving some examples of -update and -overwrite. Consider a copy from /foo/a and /foo/b to /bar/foo, where the sources contain the following:

    hdfs://nn1:8020/foo/a 
    hdfs://nn1:8020/foo/a/aa 
    hdfs://nn1:8020/foo/a/ab 
    hdfs://nn1:8020/foo/b 
    hdfs://nn1:8020/foo/b/ba 
    hdfs://nn1:8020/foo/b/ab

If either -update or -overwrite is set, then both sources will map an entry to /bar/foo/ab at the destination. For both options, the contents of each source directory are compared with the contents of the destination directory. Rather than permit this conflict, DistCp will abort.

In the default case, both /bar/foo/a and /bar/foo/b will be created and neither will collide.

Now consider a legal copy using -update:
distcp -update hdfs://nn1:8020/foo/a \ 
               hdfs://nn1:8020/foo/b \ 
               hdfs://nn2:8020/bar

With sources/sizes:

    hdfs://nn1:8020/foo/a 
    hdfs://nn1:8020/foo/a/aa 32 
    hdfs://nn1:8020/foo/a/ab 32 
    hdfs://nn1:8020/foo/b 
    hdfs://nn1:8020/foo/b/ba 64 
    hdfs://nn1:8020/foo/b/bb 32

And destination/sizes:

    hdfs://nn2:8020/bar 
    hdfs://nn2:8020/bar/aa 32 
    hdfs://nn2:8020/bar/ba 32 
    hdfs://nn2:8020/bar/bb 64

Will effect:

    hdfs://nn2:8020/bar 
    hdfs://nn2:8020/bar/aa 32 
    hdfs://nn2:8020/bar/ab 32 
    hdfs://nn2:8020/bar/ba 64 
    hdfs://nn2:8020/bar/bb 32

Only aa is not overwritten on nn2. If -overwrite were specified, all elements would be overwritten.

Appendix

Map sizing

DistCp makes a faint attempt to size each map comparably so that each copies roughly the same number of bytes. Note that files are the finest level of granularity, so increasing the number of simultaneous copiers (i.e. maps) may not always increase the number of simultaneous copies nor the overall throughput.

If -m is not specified, DistCp will attempt to schedule work for min (total_bytes / bytes.per.map, 20 * num_task_trackers)where bytes.per.map defaults to 256MB.

Tuning the number of maps to the size of the source and destination clusters, the size of the copy, and the available bandwidth is recommended for long-running and regularly run jobs.

Copying between versions of HDFS

For copying between two different versions of Hadoop, one will usually use HftpFileSystem. This is a read-only FileSystem, so DistCp must be run on the destination cluster (more specifically, on TaskTrackers that can write to the destination cluster). Each source is specified as hftp://<dfs.http.address>/<path> (the default dfs.http.address is <namenode>:50070).

Map/Reduce and other side-effects

As has been mentioned in the preceding, should a map fail to copy one of its inputs, there will be several side-effects.

  • Unless -i is specified, the logs generated by that task attempt will be replaced by the previous attempt.
  • Unless -overwrite is specified, files successfully copied by a previous map on a re-execution will be marked as "skipped".
  • If a map fails mapred.map.max.attempts times, the remaining map tasks will be killed (unless -i is set).
  • If mapred.speculative.execution is set set final and true, the result of the copy is undefined.

https://hadoop.apache.org/docs/r0.18.3/hdfs_shell.html

大数据Hadoop(八):HDFS的Shell命令行使用 目录 HDFS的Shell命令行使用 一、Shell命令行客户端 二、Shell命令选项 三、常用的Shell命令 -ls -lsr -mkdir -put -moveFromLocal -moveToLocal -get -getmerge -mv -rm -cat -du -chmod -chown -appendToFile HDFS的Shell命令行使用 一、Shell命令行客户端 HDFS是存取数据的分布式文件系统,那么对HDFS的操作,就... 阅读详情

相关推荐

DNF服务器搭建服务端架设教程

第三步:打开winscp,上传Script.pvf(版本)、publickey.pem(密钥)、df_game_r(等级补丁)到home/neople/game目录下。第四步:打开putty输入./stop,./stop(两次,如果是首次架设不用./stop),./run,运行刚才上传的三个游戏文件。③是本地配置登录器的配置文件,自动生成,可以删除,但是还是会根据你生成的登录器生成这个文件,类似日志。⑤密钥中所上传的三个文件其中之一,重中之重,上传到服务器的密钥必须和登录器中的密钥为一个。

V13807970340的博客 6261

Flink之MemoryStateBackend

flink-runtime_2.11-1.7.0-sources.jar!/org/apache/flink/runtime/state/StateBackend.java源代码: @PublicEvolving public interface StateBackend extends java.io.Serializable { // ------------------------...

ChengYanan的博客 1587

非华为设备实现多屏协同:最新电脑管家破解安装指南

本文提供了在非华为电脑上安装华为电脑管家并实现多屏协同功能的详细破解指南。通过绕过硬件检测机制,用户可在联想、戴尔等设备上体验与华为生态类似的无缝文件拖拽、跨屏操作等功能。文章涵盖了从系统准备、工具下载、破解安装到手机连接及故障排查的全流程,助您打破设备壁垒,提升办公效率。

weixin_29209805的博客 1135

mkdir: No FileSystem for scheme “null“

在使用 Hadoop shell 命令在Hadoop 集群中新建文件夹 /usr/data/input 时报错 mkdir: No FileSystem for scheme "null" 。 运行的命令是: hadoop fs -mkdir -p /usr/data/input

c_lanxiaofang的博客 1173

Ubuntu升级遇到grub-efi-amd64-signed安装失败?3步搞定这个烦人错误

本文深度解析Ubuntu系统升级时grub-efi-amd64-signed安装失败并提示“cannot find EFI directory”错误的根本原因。该错误通常由EFI系统分区挂载异常、BIOS/UEFI引导模式不匹配或dpkg包状态死锁导致。文章提供了三步精准修复流程:首先检查并修复ESP分区挂载,其次处理dpkg依赖问题,最后针对传统BIOS系统提供适配方案,帮助用户安全彻底地解决这一常见升级难题。

r7s8t的博客 398

uni-app蓝牙MTU设置失效探因:从20字节限制到跨设备兼容性实战

本文深入探讨了uni-app蓝牙开发中MTU设置失效的常见问题,特别是20字节限制的成因及解决方案。通过分析设备兼容性、蓝牙协议栈特性和系统版本差异,提供了智能延迟策略、设备特征检测和渐进式MTU提升等实战方案,帮助开发者优化蓝牙数据传输效率。

weixin_29289821的博客 289

No FileSystem for scheme: hdfs

从代码中可以看出最终需要调用getFileSystemClass(String scheme, Configuration conf)方法,在此方法中需要读取core-default.xml文件中定义的“fs.” + scheme + “.impl”(在本例中应读取fs.hdfs.impl)的配置信息,但此配置信息在默认的配置文件中没有配置(hadoop-common-x.jar中的core-default.xml文件中).

weixin_45131680的博客 2406

生成式引擎优化(GEO)的概念与技术路径

生成式引擎优化(GEO)是针对生成式AI引擎的新型优化策略,旨在提升内容在AI搜索与问答平台中的可见性和可信度。与传统SEO相比,GEO更注重语义理解、知识图谱和多模态生成等技术,通过优化内容的结构化和平台适配性,使品牌信息在生成式AI中更易被采纳和呈现。其核心技术包括语义理解、向量数据库和实时反馈优化等,应用于品牌传播、智能客服和个性化推荐等领域。随着AI技术发展,GEO将向智能化、自动化方向演进,成为内容优化的重要工具。

Baixue5209的博客 1047

聊聊flink的FsStateBackend

序 本文主要研究一下flink的FsStateBackend StateBackend flink-runtime_2.11-1.7.0-sources.jar!/org/apache/flink/runtime/state/StateBackend.java @PublicEvolving public interface StateB...

weixin_33881041的博客 662

OpenCV视频防抖算法实现与优化指南

本文详细解析了如何使用OpenCV实现视频防抖算法。通过特征点检测与光流跟踪估算帧间运动,利用滑动平均平滑运动轨迹,并应用仿射变换重塑视频帧。文章提供了完整的代码实现、参数调优指南及黑边处理等优化技巧,帮助开发者高效处理手持拍摄等场景下的视频抖动问题。

weixin_29062823的博客 341

ArduPilot简介

一,什么是ArduPilot? ArduPilot是一个可信的,多用途的,开源的自动驾驶系统。该系统支持了非常多的交通工具类型,包括多旋翼无人机,传统直升机,固定翼飞行器,船,潜艇,巡逻车等。源码由大型开发者社区的专家和爱好者共同开发和维护。也欢迎更多的开发者加入源码的迭代演进,最好的“打开”方式就是加入开发者团队论坛。该论坛对所有人开放,在这里可以深入感受到开发者们对ArduPilot的热爱。 论坛链接:ArduPilot Discourse 开发者指南:Welcome to the ArduPil

从0到1,突破自己 5454

【hadoop——HDFS操作常用的Shell命令】

1.Hadoop分布式文件系统(Hadoop Distributed File System,HDFS)是Hadoop核心组件之一,我们已经安装好了Hadoop 2.7.1,其中已经包含了HDFS组件,不需要另外安装 最基本的shell命令: HDFS既然是Hadoop的组件,那么首先需要启动Hadoop:启动虚拟机,打开终端,输入以下命令: cd /usr/local/hadoop #进入 hadoop安装目录 ./sbin/start-dfs.sh ...

所爱的博客 1万+

[PCIE5.0] 2.2.8.3 Error Signaling Messages

错误信号消息用于在 PCI Express 设备之间传递错误信息,帮助系统发现并报告错误。每当发生某种错误时,检测到该错误的设备会通过发送这些消息来通知系统。• 没有数据负载:这些错误信号消息不包含任何数据(即 TLP Type 是 Msg),它们仅用于错误报告。• 长度字段保留:在这些消息中,长度字段是保留的,不使用。• 功能号(Function Number)字段:这个字段标识哪个设备发生了错误。

系统固件工程师 292

Hadoop之HDFS常用Shell命令

Hadoop之HDFS常用Shell命令 启动Hadoop集群 sbin/start-dfs.sh sbin/start-yarn.sh -help:输出这个命令参数 hadoop fs -help rm -ls: 显示目录信息 hadoop fs -ls / -mkdir:在hdfs上创建目录 hadoop fs -mkdir -p /hadoop -moveFr...

努力努力再努力L 693

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

hadoop基础:通过 Shell 命令访问 HDFS

HDFS Shell 是由一系列类似 Linux Shell 的命令组成的。命令大致可分为操作命令、管理命令、其他命令三类。

m0_58198500的博客 4886

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

HDFS的Hadoop Shell命令

HDFS的Hadoop Shell命令 FS Shell cat ------将路径指定文件的内容输出到stdout chgrp ------改变文件所属的组 chmod ------改变文件的权限 chown ------改变文件的拥有者 copyFromLocal ------除了限定源路径是一个本地文件外,和put命令相似。 copyToLocal -----...

louzhu_lz的博客 549

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

Hadoop HDFS 的shell命令

下面介绍几个常用的命令-help 如果对于某个命令不熟悉,想要知道具体的用法,可以使用 --help命令查看 比如:查看ls的命令使用说明 二、上传文件 -moveFromLocal:从本地剪切粘贴到 HDFS -copyFromLocal:从本地文件系统中拷贝文件到 HDFS 路径去 -put:等同于 copyFromLocal,生产环境更习惯用 put -appendToFile:追加一个文件到已经存在的文件末尾 三、下载文件 -copyToLocal:从 HDFS 拷贝到本地 -get:等同于

weixin_46429290的博客 759

【Hadoop】【hdfs】【大数据技术基础】作业一 HDFS操作常用Shell命令

Hadoop支持很多Shell命令,比如hadoop fs、hadoop dfs和hdfs dfs都是HDFS最常用的Shell命令,用来查看。这三个命令既有联系有又区别:hadoop fs:适用于任何不同的文件系统,比如本地文件系统和HDFS文件系统;hadoop dfs:只能适用于HDFS文件系统;hdfs dfs:跟hadoop dfs命令的作用一样,也只能适用于HDFS文件系统。在本教程中,统一使用hdfs dfs命令对HDFS进行操作。

Kika写代码的博客 1113

hadoop集群:HDFS的Shell命令行操作与Java 常用API操作

hadoop hdfs的shell命令与java 常用api的操作与思想保持一致,故对比,易于理解与记忆 主要区别点: shell命令行,一般在虚拟机集群或者远程连接工具Xshell上操作,被操作对象分别为 Linux文件系统本地 + HDFS文件系统 Java API,一般在Windows系统下idea软件上编写代码操作,被操作对象分别为 Windows文件系统本地 + HDFS文件系统 (一)HDFS的Shell命令行操作: 1,查看所有的hdfs命令 hadoop dfs 或者 hdfs dfs ,

weixin_41300542的博客 4484

hadoop核心组件——HDFS系列讲解之HDFS的shell命令操作

hadoop核心组件——HDFS系列讲解之HDFS的shell命令操作基本语法常用命令HDFS的特性 基本语法 老版本: hadoop fs 具体命令 新版本: hdfs dfs 具体命令 常用命令 (1)-help:输出这个命令参数 bin/hdfs dfs -help rm (2)-ls: 显示目录信息 hdfs dfs -ls / (3)-mkdir:在hdfs上创建目录 hdfs dfs -mkdir -p /aaa/bbb/cc/dd (4)-moveFromLocal从本地剪切粘

LeeBoolean的博客 1878

Hadoop分布式文件系统命令行接口(HDFS Shell)详细版

Hadoop分布式文件系统命令行接口(HDFS Shell)详细版 HDFS快速入门 HDFS知识梳理详细版 HDFS Shell详细介绍

围炉夜敲的博客 2116

Hadoop HDFS shell 命令行常用操作

Hadoop hdfs shell 命令行常用操作

m0_47889186的博客 2921

Hadoop HDFS 常用Shell命令整理

调用HDFS文件系统(HDFS)Shell命令应使用bin/hadoop fs <args>的形式。 所有的的FS shell命令使用URI路径作为参数。URI格式是scheme://authority/path。 对HDFS文件系统,scheme是hdfs,对本地文件系统,scheme是file。 其中scheme和authority参数都是可选的,如果未加指定,就会使...

qq_654603797 587

Hadoop2 HDFS shell命令

Hadoop2 HDFS shell命令   1. hdfs dfs -appendToFile ...   可同时上传多个文件到HDFS里面   2.  hdfs dfs -cat URI [URI ...]   查看文件内容   3. hdfs dfs -chgrp [-R] GROUP URI [URI ...]   修改文件所属组   4.  hdfs df

零度的博客专栏 2171

大数据之Hadoop学习(一)利用Shell命令与HDFS进行交互

利用Shell命令与HDFS进行交互一、启动Hadoop二、利用Shell命令与HDFS进行交互1.目录操作2.文件操作 在学习HDFS编程实践前,我们需要启动Hadoop。执行如下命令: 一、启动Hadoop cd /usr/local/hadoop ./sbin/start-dfs.sh #启动hadoop 二、利用Shell命令与HDFS进行交互 终端输入如下命令,查看fs总共支持了哪些...

qq_42585108的博客 2494
上一篇: HBase shell commands
下一篇: Windows下连接调试Asus Nexus 7 Tablet
chiiis
博客等级 码龄14年 422粉丝 429原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值