[
https://issues.apache.org/jira/browse/HDFS-9614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082946#comment-15082946
]
tangshangwen commented on HDFS-9614:
------------------------------------
This is my test
{noformat}
$hdfs dfs -ls /user/hadoop/
Found 6 items
drwx------ - hadoop supergroup 0 2016-01-05 11:49 /user/hadoop/.Trash
drwx------ - hadoop supergroup 0 2016-01-05 12:04
/user/hadoop/.staging
drwxr-xr-x - hadoop supergroup 0 2016-01-05 12:42
/user/hadoop/DistributedShell
drwxr-xr-x - hadoop supergroup 0 2016-01-05 15:46
/user/hadoop/tangshangwen
drwxr-xr-x - hadoop supergroup 0 2016-01-05 20:07 /user/hadoop/test1
drwxr-xr-x - hadoop supergroup 0 2016-01-05 20:07 /user/hadoop/test2
$ hdfs dfs -rm -R /user/hadoop/tes*
16/01/05 20:08:10 INFO fs.TrashPolicyDefault: Namenode trash configuration:
Deletion interval = 1440 minutes, Emptier interval = 0 minutes.
Moved: 'hdfs://auxo1/user/hadoop/test1' to trash at:
hdfs://ns1/user/hadoop/.Trash/Current
16/01/05 20:08:10 INFO fs.TrashPolicyDefault: Namenode trash configuration:
Deletion interval = 1440 minutes, Emptier interval = 0 minutes.
Moved: 'hdfs://auxo1/user/hadoop/test2' to trash at:
hdfs://ns1/user/hadoop/.Trash/Current
$ hdfs dfs -rm -R /user/hadoop/tang*
rm: `/user/hadoop/tang*': No such file or directory
{noformat}
> If the path contains '\r' character, can not be deleted from the command line
> -----------------------------------------------------------------------------
>
> Key: HDFS-9614
> URL: https://issues.apache.org/jira/browse/HDFS-9614
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 2.2.0, 2.7.1
> Reporter: tangshangwen
> Assignee: tangshangwen
>
> In our cluster, I found that some users create directory contains '\r'
> character, cause we can not be deleted from the command line. for example
> {code:title=Test.java|borderStyle=solid}
> try {
> FileSystem fs = FileSystem.get(new Configuration());
> fs.mkdirs(new Path("/user/hadoop/tangshangwen\r"));
> IOUtils.closeQuietly(fs);
> } catch (IOException e) {
> e.printStackTrace();
> }
> {code}
> Then we delete
> {noformat}
> $ hdfs dfs -ls /user/hadoop/
> Found 4 items
> drwx------ - hadoop supergroup 0 2016-01-05 11:49
> /user/hadoop/.Trash
> drwx------ - hadoop supergroup 0 2016-01-05 12:04
> /user/hadoop/.staging
> drwxr-xr-x - hadoop supergroup 0 2016-01-05 12:42
> /user/hadoop/DistributedShell
> drwxr-xr-x - hadoop supergroup 0 2016-01-05 15:46
> /user/hadoop/tangshangwen
> $ hdfs dfs -rm -R /user/hadoop/tangshang*
> rm: `/user/hadoop/tangshang*': No such file or directory
> $ hdfs dfs -ls /user/hadoop/tangshangwen
> ls: `/user/hadoop/tangshangwen': No such file or directory
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)