hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10971) Add -C flag to make `hadoop fs -ls` print filenames only
Date Tue, 19 May 2015 15:17:07 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-10971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14550592#comment-14550592

Hudson commented on HADOOP-10971:

SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #200 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/200/])
HADOOP-10971. Add -C flag to make `hadoop fs -ls` print filenames only. Contributed by Kengo
Seki. (aajisaka: rev 3b50dcdce4ffe3d4e5892fca84909ff22be28739)
* hadoop-common-project/hadoop-common/src/test/resources/testConf.xml
* hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Ls.java
* hadoop-common-project/hadoop-common/src/site/markdown/FileSystemShell.md
* hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestLs.java
* hadoop-common-project/hadoop-common/CHANGES.txt

> Add -C flag to make `hadoop fs -ls` print filenames only
> --------------------------------------------------------
>                 Key: HADOOP-10971
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10971
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>    Affects Versions: 2.3.0
>            Reporter: Ryan Williams
>            Assignee: Kengo Seki
>             Fix For: 2.8.0
>         Attachments: HADOOP-10971.001.patch, HADOOP-10971.002.patch, HADOOP-10971.003.patch,
HADOOP-10971.004.patch, HADOOP-10971.005.patch
> It would be useful to have a flag that made {{hadoop fs -ls}} only print filenames, instead
of full {{stat}} info. The "{{-C}}" flag from GNU {{ls}} is the closest analog to this behavior
that I've found, so I propose that as the flag.
> Per [this stackoverflow answer|http://stackoverflow.com/a/21574829], I've reluctantly
added a {{hadoop-ls-C}} wrapper that expands to {{hadoop fs -ls "$@" | sed 1d | perl -wlne'print
+(split " ",$_,8)\[7\]'}} to a few projects I've worked on, and it would obviously be nice
to have hadoop save me (and others) from such hackery.

This message was sent by Atlassian JIRA

View raw message