Skip to content

Commit 069bd97

Browse files
authored
HADOOP-18532. Update command usage in FileSystemShell.md (apache#5141)
Signed-off-by: Akira Ajisaka <[email protected]>
1 parent 696d042 commit 069bd97

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

hadoop-common-project/hadoop-common/src/site/markdown/FileSystemShell.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Copies source paths to stdout.
5959

6060
Options
6161

62-
* The `-ignoreCrc` option disables checkshum verification.
62+
* The `-ignoreCrc` option disables checksum verification.
6363

6464
Example:
6565

@@ -73,18 +73,19 @@ Returns 0 on success and -1 on error.
7373
checksum
7474
--------
7575

76-
Usage: `hadoop fs -checksum [-v] URI`
76+
Usage: `hadoop fs -checksum [-v] URI [URI ...]`
7777

78-
Returns the checksum information of a file.
78+
Returns the checksum information of the file(s).
7979

8080
Options
8181

82-
* The `-v` option displays blocks size for the file.
82+
* The `-v` option displays blocks size for the file(s).
8383

8484
Example:
8585

8686
* `hadoop fs -checksum hdfs://nn1.example.com/file1`
8787
* `hadoop fs -checksum file:///etc/hosts`
88+
* `hadoop fs -checksum file:///etc/hosts hdfs://nn1.example.com/file1`
8889

8990
chgrp
9091
-----
@@ -177,7 +178,7 @@ Returns 0 on success and -1 on error.
177178
cp
178179
----
179180

180-
Usage: `hadoop fs -cp [-f] [-p | -p[topax]] [-t <thread count>] [-q <thread pool queue size>] URI [URI ...] <dest>`
181+
Usage: `hadoop fs -cp [-f] [-p | -p[topax]] [-d] [-t <thread count>] [-q <thread pool queue size>] URI [URI ...] <dest>`
181182

182183
Copy files from source to destination. This command allows multiple sources as well in which case the destination must be a directory.
183184

@@ -187,13 +188,14 @@ Options:
187188

188189
* `-f` : Overwrite the destination if it already exists.
189190
* `-d` : Skip creation of temporary file with the suffix `._COPYING_`.
190-
* `-p` : Preserve file attributes [topx] (timestamps, ownership, permission, ACL, XAttr). If -p is specified with no *arg*, then preserves timestamps, ownership, permission. If -pa is specified, then preserves permission also because ACL is a super-set of permission. Determination of whether raw namespace extended attributes are preserved is independent of the -p flag.
191+
* `-p` : Preserve file attributes [topax] (timestamps, ownership, permission, ACL, XAttr). If -p is specified with no *arg*, then preserves timestamps, ownership, permission. If -pa is specified, then preserves permission also because ACL is a super-set of permission. Determination of whether raw namespace extended attributes are preserved is independent of the -p flag.
191192
* `-t <thread count>` : Number of threads to be used, default is 1. Useful when copying directories containing more than 1 file.
192193
* `-q <thread pool queue size>` : Thread pool queue size to be used, default is 1024. It takes effect only when thread count greater than 1.
193194

194195
Example:
195196

196197
* `hadoop fs -cp /user/hadoop/file1 /user/hadoop/file2`
198+
* `hadoop fs -cp -f -d /user/hadoop/file1 /user/hadoop/file2`
197199
* `hadoop fs -cp /user/hadoop/file1 /user/hadoop/file2 /user/hadoop/dir`
198200
* `hadoop fs -cp -t 5 /user/hadoop/file1 /user/hadoop/file2 /user/hadoop/dir`
199201
* `hadoop fs -cp -t 10 -q 2048 /user/hadoop/file1 /user/hadoop/file2 /user/hadoop/dir`
@@ -403,7 +405,7 @@ Returns 0 on success and non-zero on error.
403405
getmerge
404406
--------
405407

406-
Usage: `hadoop fs -getmerge [-nl] <src> <localdst>`
408+
Usage: `hadoop fs -getmerge [-nl] [-skip-empty-file] <src> <localdst>`
407409

408410
Takes a source directory and a destination file as input and concatenates files in src into the destination local file. Optionally -nl can be set to enable adding a newline character (LF) at the end of each file.
409411
-skip-empty-file can be used to avoid unwanted newline characters in case of empty files.
@@ -412,6 +414,7 @@ Examples:
412414

413415
* `hadoop fs -getmerge -nl /src /opt/output.txt`
414416
* `hadoop fs -getmerge -nl /src/file1.txt /src/file2.txt /output.txt`
417+
* `hadoop fs -getmerge -nl -skip-empty-file /src/file1.txt /src/file2.txt /output.txt`
415418

416419
Exit Code:
417420

0 commit comments

Comments
 (0)