Author: todd
Date: Sat May 14 04:32:55 2011
New Revision: 1102950

URL: http://svn.apache.org/viewvc?rev=1102950&view=rev
Log:
HADOOP-7192. Update fs -stat docs to reflect the format features. Contributed 
by Harsh J Chouraria.

Modified:
    hadoop/common/branches/branch-0.22/CHANGES.txt
    
hadoop/common/branches/branch-0.22/src/docs/src/documentation/content/xdocs/file_system_shell.xml

Modified: hadoop/common/branches/branch-0.22/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/CHANGES.txt?rev=1102950&r1=1102949&r2=1102950&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.22/CHANGES.txt Sat May 14 04:32:55 2011
@@ -237,6 +237,9 @@ Release 0.22.0 - Unreleased
     HADOOP-7189. Add ability to enable 'debug' property in JAAS configuration.
     (Ted Yu via todd)
 
+    HADOOP-7192. Update fs -stat docs to reflect the format features. (Harsh
+    J Chouraria via todd)
+
   OPTIMIZATIONS
 
     HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).

Modified: 
hadoop/common/branches/branch-0.22/src/docs/src/documentation/content/xdocs/file_system_shell.xml
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/src/docs/src/documentation/content/xdocs/file_system_shell.xml?rev=1102950&r1=1102949&r2=1102950&view=diff
==============================================================================
--- 
hadoop/common/branches/branch-0.22/src/docs/src/documentation/content/xdocs/file_system_shell.xml
 (original)
+++ 
hadoop/common/branches/branch-0.22/src/docs/src/documentation/content/xdocs/file_system_shell.xml
 Sat May 14 04:32:55 2011
@@ -482,16 +482,29 @@
                <section>
                        <title> stat </title>
                        <p>
-                               <code>Usage: hdfs dfs -stat URI [URI 
&#x2026;]</code>
+                               <code>Usage: hdfs dfs -stat [format] URI [URI 
&#x2026;]</code>
                        </p>
-                       <p>
-          Returns the stat information on the path.
-          </p>
+                       <p>Print statistics about the file/directory matching 
the given URI pattern in the specified format.</p>
+                       <p>Format accepts:</p>
+                         <ul>
+                           <li>filesize in blocks (%b)</li>
+                           <li>filename (%n)</li>
+                     <li>block size (%o)</li>
+                     <li>replication (%r)</li>
+                     <li>modification date, formatted as Y-M-D H:M:S (%y)</li>
+                     <li>modification date, in epoch seconds (%Y)</li>
+        </ul>
                        <p>Example:</p>
                        <ul>
+        <li>
+          <code> hdfs dfs -stat path </code>
+        </li>
                                <li>
-                                       <code> hdfs dfs -stat path </code>
+                                       <code> hdfs dfs -stat %y path </code>
                                </li>
+        <li>
+          <code> hdfs dfs -stat '%b %r' path </code>
+        </li>
                        </ul>
                        <p>Exit Code:<br/>
           <code> Returns 0 on success and -1 on error.</code></p>


Reply via email to