You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Hairong Kuang (JIRA)" <ji...@apache.org> on 2006/09/26 02:18:51 UTC

[jira] Updated: (HADOOP-559) Support file patterns in dfs commands

     [ http://issues.apache.org/jira/browse/HADOOP-559?page=all ]

Hairong Kuang updated HADOOP-559:
---------------------------------

    Attachment: glob.patch

This patch allows users to manipulate dfs files using globs. The commands that support dfs globs are copyToLocal, copyMergeToLocal, cat, setReplication, ls, lsr, du, mv, copy, and rm. Here are some examples:

hadoop dfs -ls "*.java"
hadoop dfs -ls "a.?"
hadoop dfs -ls "*.[ch]"
hadoop dfs -ls "[a-c].java"
hadoop dfs -ls "[^a].java"
hadoop dfs -ls "/user/h*/???.xx"

Please be aware that dfs globs need to be quoted. This patch does not support local globs.

> Support file patterns in dfs commands
> -------------------------------------
>
>                 Key: HADOOP-559
>                 URL: http://issues.apache.org/jira/browse/HADOOP-559
>             Project: Hadoop
>          Issue Type: New Feature
>          Components: dfs
>    Affects Versions: 0.6.2
>            Reporter: Hairong Kuang
>         Assigned To: Hairong Kuang
>             Fix For: 0.7.0
>
>         Attachments: glob.patch
>
>
> Currently DFSShell does not support file patterns in dfs file names. It's quite inconvenient for users when they need to manipulate multiple files.
> This issue is intended to extend DFSShell to interprete file patterns. A file pattern contains special special pattern matching characters:
> ?: matches any character
> *: matches zero or more characters
> [abc]: matches a character from character set {a, b, c}
> [a-c]: matches a character from character range: {a...c}
> [^a]: matches a character not in character set or range {a}
> \c:  escape any special meaning of character c
>  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira