Hadoop File
system (fs) shell provides number of commands, to interact with Hadoop
Distributed File System (HDFS).
copyFromLocal: Copy file from local file system to HDFS
cat: Display contents of a file
appendToFile: append contents of one/more files to a file in
HDFS
checksum: Calculates the checksum of a file
copyToLocal: Copy file from HDFS to local file system
count: Count the number of directories, files and bytes under the paths that
match the specified file pattern.
cp: Copy multiple files from HDFS to other HDFS directory
df: Display free space
du: Displays sizes of files and directories contained in the given
directory
get: Copy files to the local file system
help: Get
help
ls: Displays all contents of a directory (or) displays information about
file
mkdir: Create directories
moveFromLocal: (cut + paste feature) Move file to HDFS
mv: Move files from one location to other (within HDFS only)
put: Copy multiple files from local system to HDFS
rm: Delete files
rmdir: Remove a directory
stat: Print statistics about a file
tail: Display last kilobyte of the file
text: Output zip file in text format
touchz: Creates a file of zero length
usage: Get the help for a command
chgrp: Change group association of files
chmod: Change the permissions of files
chown: Change the owner of files
createSnapshot: Create snapshot
deleteSnapshot: Delete snapshot
renameSnapshot: Rename snapshot
getmerge: Concatenate all files in a source directory
setfacl: Sets Access Control Lists (ACLs) of files and
directories
getfacl: Displays the Access Control Lists (ACLs) of files
and directories
setrep: Set replication factor to a file/directory
setfattr: Sets an extended attribute name and value for a
file or directory.
getfattr: Displays the extended attribute names and values
of a file (or) directory
truncate: Truncate files to specific length
find: Finds all files that match the specified expression
In
subsequent posts, i am going to explain each command in detail.
No comments:
Post a Comment