From 4824a54419f1ccb24aa0af07edfbcf1539084089 Mon Sep 17 00:00:00 2001 From: Konstantin Shvachko Date: Tue, 30 Jun 2009 18:48:45 +0000 Subject: [PATCH] HADOOP-6080. Introduce -skipTrash option to rm and rmr. Contributed by Jakob Homan. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@789875 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 + .../content/xdocs/hdfs_shell.xml | 13 ++-- src/java/org/apache/hadoop/fs/FsShell.java | 56 ++++++++++++------ .../core/org/apache/hadoop/fs/TestTrash.java | 59 ++++++++++++++++++- 4 files changed, 107 insertions(+), 24 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b90bd7fb4e..0ed8c640bf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -154,6 +154,9 @@ Trunk (unreleased changes) HADOOP-3315. Add a new, binary file foramt, TFile. (Hong Tang via cdouglas) + HADOOP-6080. Introduce -skipTrash option to rm and rmr. + (Jakob Homan via shv) + IMPROVEMENTS HADOOP-4565. Added CombineFileInputFormat to use data locality information diff --git a/src/docs/src/documentation/content/xdocs/hdfs_shell.xml b/src/docs/src/documentation/content/xdocs/hdfs_shell.xml index c9dace03f6..9544f480e8 100644 --- a/src/docs/src/documentation/content/xdocs/hdfs_shell.xml +++ b/src/docs/src/documentation/content/xdocs/hdfs_shell.xml @@ -325,10 +325,13 @@
rm

- Usage: hadoop fs -rm URI [URI …] + Usage: hadoop fs -rm [-skipTrash] URI [URI …]

- Delete files specified as args. Only deletes non empty directory and files. Refer to rmr for recursive deletes.
+ Delete files specified as args. Only deletes non empty directory and files. If the -skipTrash option + is specified, the trash, if enabled, will be bypassed and the specified file(s) deleted immediately. This can be + useful when it is necessary to delete files from an over-quota directory. + Refer to rmr for recursive deletes.
Example: