https://issues.apache.org/jira/browse/HADOOP-7222
It's the first Jira I've created. Hopefully it is acceptable. Thanks! -----Original Message----- From: Harsh J [mailto:ha...@cloudera.com] Sent: Monday, April 11, 2011 11:25 AM To: hdfs-user@hadoop.apache.org Subject: Re: Bug using ^ in a file name Hello Karl, On Mon, Apr 11, 2011 at 8:44 PM, Karl Kuntz <kku...@tradebotsystems.com> wrote: > Hi all, > When I specify the ^ char in a file name within a hadoop command line it > works just fine for commands that don't use globbing like put. > > But after putting that file, then I can't get a listing of the file with ls > or view the file with cat/text using the same path. > i.e. > > hadoop dfs -put test^ing /tmp <- works > > hadoop dfs -ls /tmp <- works and shows the file > in the dir > > hadoop dfs -ls /tmp/test^ing <- returns "ls: Cannot access > /tmp/test^ing: No such file or directory." Good hunting down! The "^" is a valid regex symbol and hadoop-common's 'globbing' support adds a bit of regex support to itself. And since most FsShell funcs do glob matching by default, it is difficult to escape this from the shell. However, if you were to use a non globbing java API (pure FS.listStatus, instead of FS.globStatus) for doing the same operation in code with that string, it should work just fine. So while ^ is acceptable in DFS filenames, it means a different thing in the FsShell utils. Maybe adding a fix for this somehow (a glob switch?) can help in certain scenarios. Remember file a JIRA on this at https://issues.apache.org/jira/browse/HADOOP if you do want it fixed! :) -- Harsh J