File permissions?

Andrew Farris flyindragon1 at aol.com
Sun Dec 27 16:21:04 UTC 2009


On Sat, 2009-12-26 at 14:10 +0000, nepal (PO) wrote:
> On Friday 25 Dec 2009 18:28:20 Johnny Rosenberg wrote:
> > Is there a special reason why the files have to be located there?
> >  For most tasks, your personal files should be located somewhere in
> >  your home directory (home folder), called $HOME, which is an
> >  environment variable containing the address of your home folder.
> >  The ”~” means the same thing. So ~/MyFolder is the same thing as
> >  $HOME/MyFolder, which is the same thing as /home/Jim/MyFolder if
> >  your user name is Jim. If you still want to place your file at
> >  /usr/share/jedit/modes you have to do it with root permissions,
> >  unless you want to change the owner of the folder.
> > 
> 
> This is incorrect.
> 
> In a console type in "echo $HOME" not including the quotes and it will 
> show the *full* path to your home folder which is /home/_username_.
> 
> $HOME is an environment variable set up for each user of the system.

But...

if you type in "cd $HOME/Documents", you will still get the same results
as doing any of the following:
        cd /home/<your username>/Documents
        cd ~/Documents
        cd /home/`whoami`/Documents
        cd `echo $HOME`/Documents
        
and probably dozens of other combinations.

-- 
Andrew
_____________________________
Registered Linux User: 473690
Registered Ubuntu User: 22747




More information about the ubuntu-users mailing list