It is clear now. Thanks Mike. -Gang
----- 原始邮件 ---- 发件人: Michael Thomas <tho...@hep.caltech.edu> 收件人: common-user@hadoop.apache.org 发送日期: 2010/8/31 (周二) 8:04:07 下午 主 题: Re: accounts permission on hadoop 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 >