hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Lucene-hadoop Wiki] Update of "hadoop-0.1-dev/bin/hadoop dfs" by WendyChien
Date Fri, 02 Mar 2007 01:39:39 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucene-hadoop Wiki" for change notification.

The following page has been changed by WendyChien:
http://wiki.apache.org/lucene-hadoop/hadoop-0%2e1-dev/bin/hadoop_dfs

------------------------------------------------------------------------------
  hadoop dfs is the command used to execute dfs commands. The full syntax is 
- hadoop dfs -fs [local | <namenode:port>] [-ls <path>] [-lsr <path>] [-du
<path>] [-mv <src> <dst>] [-cp <src> <dst>] [-rm <src>]
[-put <localsrc> <dst>] [-copyFromLocal <localsrc> <dst>] [-moveFromLocal
<localsrc> <dst>] [-get <src> <localdst>] [-cat <src>] [-copyToLocal
<src><localdst>] [-moveToLocal <src> <localdst>] [-mkdir <path>]
[-report] [-setrep [-R] <rep> <path/file>]
+ hadoop dfs -fs [local | <namenode:port>] [-conf <configuration file>] [-D <property=value>]
[-ls <path>] [-lsr <path>] [-du <path>] [-dus <path>] [-mv <src>
<dst>] [-cp <src> <dst>] [-rm <src>] [-rmr <src>] [-put <localsrc>
<dst>] [-copyFromLocal <localsrc> <dst>] [-moveFromLocal <localsrc>
<dst>] [-get <src> <localdst>] [-getmerge <src> <localdst> [addnl]]
[-cat <src>] [-copyToLocal <src><localdst>] [-moveToLocal <src> <localdst>]
[-mkdir <path>] [-setrep [-R] <rep> <path/file>] [-help [cmd]]
  
  -fs [local | <namenode:port>]: if not specified, the current configuration is used,
taken from the following, in increasing precedence:
     * hadoop-default.xml inside the hadoop jar file
@@ -13, +13 @@

  exactly one additional argument must be specified.
  A word about paths: a path may be relative or absolute. An absolute path starts with a '/',
a relative path does not, and always relates to /user/<currentUser>. There is no notion
of current working directory.
  
- -ls <path>: list the contents of the specified path. If path is not specified, the
contents of /user/<currentUser> will be listed. The output contains one line of the
form
+ -ls <path>: list the contents that match the specified file pattern. If path is not
specified, the contents of /user/<currentUser> will be listed. The output contains one
line of the form
   Found n items
  followed by one line per directory and one line per file.  Directory entries are of the
form 
   dirName (full path)   <dir>
@@ -21, +21 @@

   fileName(full path)   <r n>   size
  where n is the number of replicas specified for the file and size is the size of the file,
in bytes.
  
- -lsr <path>: recursively list the contents of the specified path. Behaves very similarly
to hadoop dfs -ls, except that the first line (Found n items) is omitted, and data is shown
for all the entries in the subtree.
+ -lsr <path>: recursively list the contents that match the specified file pattern.
Behaves very similarly to hadoop dfs -ls, except that the first line (Found n items) is omitted,
and data is shown for all the entries in the subtree.
  
- -du <path>: show the amount of space, in bytes, used by given path. Equivalent to
the unix command "du -sb <path>/*" in case of a directory, and to "du -b <path>"
in case of a file. The output is in the form
+ -du <path>: show the amount of space, in bytes, used by the files that match the specified
file pattern. Equivalent to the unix command "du -sb <path>/*" in case of a directory,
and to "du -b <path>" in case of a file. The output is in the form
   name(full path)  size (in bytes)
  
- -mv <src> <dst>: move a file or directory from one location in dfs to another.
Equivalent to the Unix command mv <src> < dst>
+ -dus <path>: show the amount of space, in bytes, used by the files that match the
specified file pattern.  Equivalent to the unix command "du -sb <path>"  The output
is in the form 
+  name (full path) size (in bytes)
+  
+ -mv <src> <dst>: move the files that match the specified file pattern <src>
to a destination <dst>.  When moving multiple files, the destination must be a directory.
  
- -cp <src> <dst>: copy a file or directory from one location in dfs to another.
Equivalent to the Unix command cp -rf <src> < dst>
+ -cp <src> <dst>: copy files that match the file pattern <src> to a destination.
 When copying multiple files, the destination must be a directory.  Equivalent to the Unix
command cp -rf <src> < dst>
  
- -rm <src>: remove a file or directory. Equivlent to the Unix command "rm -rf <src>".
+ -rm <src>: remove all files that match the specified file pattern.  Equivalent to
the Unix command "rm <src>"
+ 
+ -rmr <src>: remove all directories which match the specified file pattern.  Equivlent
to the Unix command "rm -rf <src>".
  
  -put <localsrc> <dst>: copy a single file from the local file system into dfs.
+ 
  -copyFromLocal <localsrc> <dst>: identical to the -put command
  
  -moveFromLocal <localsrc> <dst>: same as -put, except that the source is deleted
after it's copied.
  
- -get <src> <localdst>] [-cat <src>:
- -copyToLocal <src><localdst>: copy a single file from dfs to a local file
+ -get <src> <localdst>: copy files that match the file pattern <src> to
the local name.  <src> is kept.  When copying mutiple files, the destination must be
a directory. 
+ 
+ -cat <src>:  Fetch all files that match the file pattern <src> and display their
content on stdout.
+ 
+ -copyToLocal <src><localdst>: identical to the -get command.
  
  -moveToLocal <src> <localdst>: not implemented yet
  
  -mkdir <path>: create a directory in specified location.
  
- -report: print statistics about the file system
- 
  -setrep [-R] <rep> <path/file>: set the replication level of a file. The -R
flag requests a recursive change of replication level for an entire tree
  
+ -help [cmd]: Displays help for given command or all commands if none is specified.
+ 

Mime
View raw message