Databases Reference
In-Depth Information
Command
Usage and description
chmod hadoop fs -chmod [-R] MODE[,MODE ...] PATH [PATH ...]
Changes the permissions of files and directories. Similar to its Unix
equivalent, MODE can be a 3-digit octal mode, or {augo}+/-{rwxX} . The
-R option applies the change recursively. The user must be the files' owner
or a superuser. See section 8.3 for more background information on the HDFS
file permission system.
chown hadoop fs -chown [-R] [OWNER][:[GROUP]] PATH [PATH
...]
Changes the ownership of files and directories. The -R option applies the
change recursively. The user must be a superuser. See section 8.3 for more
background information on the HDFS file permission system.
copyFromLocal hadoop fs -copyFromLocal LOCALSRC [LOCALSRC ...] DST
Identical to put (copy files from the local file system).
copyToLocal
hadoop fs -copyToLocal [-ignorecrc] [-crc] SRC [SRC
...] LOCALDST
Identical to get (copy files to the local file system).
count
hadoop fs -count [-q] PATH [PATH ...]
Displays the number of subdirectories, number of files, number of bytes
used, and name for all files/directories identified by PATH. The -q option
displays quota information.
cp
hadoop fs -cp SRC [SRC ...] DST
Copies files from source to destination. If multiple source files are specified,
destination has to be a directory.
du
hadoop fs -du PATH [PATH ...]
Displays file sizes. If PATH is a directory, the size of each file in the directory
is reported. Filenames are stated with the full URI protocol prefix. Note that
although du stands for disk usage , it should not be taken literally, as disk
usage depends on block size and replica factors.
dus
hadoop fs -dus PATH [PATH ...]
Similar to du , but for a directory, dus reports the sum of file sizes in
aggregate rather than individually.
expunge
hadoop fs -expunge
Empties the trash. If the trash feature is enabled, when a file is deleted, it
is first moved into the temporary .Trash/ folder. The file will be permanently
deleted from the .Trash/ folder only after a user-configurable delay. The
expunge command forcefully deletes all files from the .Trash/ folder. Note
that as long as a file is in the .Trash/ folder, it can be restored by moving it
back to its original location.
get
hadoop fs -get [-ignorecrc] [-crc] SRC [SRC ...]
LOCALDST
Copies files to the local filesystem. If multiple source files are specified,
local destination has to be a directory. If LOCALDST is - , the files are copied
to stdout.
HDFS computes a checksum for each block of each file. The checksums
for a file are stored separately in a hidden file. When a file is read from HDFS,
the checksums in that hidden file are used to verify the file's integrity. For the
get command, the -crc option will copy that hidden checksum file. The
-ignorecrc option will skip the checksum checking when copying.
 
Search WWH ::




Custom Search