Browse Source

HADOOP-19358. Update command usage of appendToFile. (#7209)

Contributed by fuchaohong
fuchaohong 5 months ago
parent
commit
2c2beb715d

+ 7 - 1
hadoop-common-project/hadoop-common/src/site/markdown/FileSystemShell.md

@@ -37,10 +37,16 @@ See the [Commands Manual](./CommandsManual.html) for generic shell options.
 appendToFile
 appendToFile
 ------------
 ------------
 
 
-Usage: `hadoop fs -appendToFile <localsrc> ... <dst> `
+Usage: `hadoop fs -appendToFile [-n] <localsrc> ... <dst>`
 
 
 Append single src, or multiple srcs from local file system to the destination file system. Also reads input from stdin and appends to destination file system.
 Append single src, or multiple srcs from local file system to the destination file system. Also reads input from stdin and appends to destination file system.
 
 
+Options
+
+* The `-n` option represents that use NEW_BLOCK create flag to append file.
+
+Example:
+
 * `hadoop fs -appendToFile localfile /user/hadoop/hadoopfile`
 * `hadoop fs -appendToFile localfile /user/hadoop/hadoopfile`
 * `hadoop fs -appendToFile localfile1 localfile2 /user/hadoop/hadoopfile`
 * `hadoop fs -appendToFile localfile1 localfile2 /user/hadoop/hadoopfile`
 * `hadoop fs -appendToFile localfile hdfs://nn.example.com/hadoop/hadoopfile`
 * `hadoop fs -appendToFile localfile hdfs://nn.example.com/hadoop/hadoopfile`