On 08/31/2010 05:01 PM, Michael Thomas wrote: > On 08/31/2010 03:12 PM, Gang Luo wrote: >> Thanks Edward. >> >> I was thinking is the home directory on HDFS also comply with the linux >> system? >> Since I create '/usr/research/home/smith' on HDFS for user 'smith', which is >> also the home directory for smith in linux. When he input ' 'bin/hadoop fs >> -ls >> ~/' he will get this directory, instead of '/user/smith'. >> >> -Gang > > The tilde character '~' is a shell metacharacter. It is converted to > value of $HOME before the shell invokes the bin/hadoop command. For > example: > > 1) User types "bin/hadoop fs -ls ~/" > 2) Your shell changes this command to "bin/hadoop fs -ls /user/smith/" > (or wherever the user's local linux home directory is located). > 3) Your shell invokes the command and hadoop returns the contents of > '/usr/research/home/smith' from hdfs (which probably doesn't exist), not > from the local filesystem.
Of course, I meant to say "...returns the contents of '/user/smith' from hdfs..." --Mike > Hadoop doesn't do anything special with the ~ character. > > --Mike >
smime.p7s
Description: S/MIME Cryptographic Signature