.bashrc vs. .bash_profile

Vram lamsokvr at xprt.net
Thu Jul 21 00:18:39 UTC 2005


On Wed, 2005-07-20 at 17:32 -0400, Matthew S-H wrote:
> 

<snip>


> > 
> > 
> > 
> > 
> > 
> > Don't do it...
> > 
> > 
> > There is a time and a place for everything.
> > 
> > 
> > 
> > 
> > It would be like looking the refrigerator and the freezer every
> > time.
> > The milk is in the refrigerator.  Why look in the freezer?
> > 
> > 
> > The system is set up by folks who spent A LOT of time thinking about
> > this.
> > 
> > 
> > So <and this is not a personal comment.  All new users go through
> > this>
> > MR/MISS I have been using the system for three days now I know a
> > better
> > way..
> > 
> > 
> > Trust the system to know what is best for you..
> > 
> > 
> > Remove the link..
> > 
> > 
> > YMMV
> > 
> > 
> > Good Luck
> > 
> > 
> > and OF course You disregard my comments as an OLD SYSTEM
> > ADMINISTRATOR
> > who has spent too much time at the keyboard.
> 
> I was totally expecting to be wrong.  But I just want to know one
> thing:
> why is it a bad thing to use a link?
> 
> 


links are just that...

A link points to a file..

You can't link two different files together with the "ln" command..

The ln command either creates a file <small> that points to a
file.<generally used when the second file is on another partiton>

Or with a hard link it is like giving the file two different names..

Change the data in one file and it is changed in the other file







Go through the example below..

<note:Dog is better then cat>



Create two files:  called one and two

vram at Aether:~/tmp/temp/one $ dog > one
one
vram at Aether:~/tmp/temp/one $ dog > two
two


do an ls to verify two files  one two


vram at Aether:~/tmp/temp/one $ ls
one  two


attempt to soft link the files: fails

vram at Aether:~/tmp/temp/one $ ln -s two one
ln: `one': File exists



soft link file one to a new file called three 
then show contents of three  <it has one's contents>

vram at Aether:~/tmp/temp/one $ ln -s one three
vram at Aether:~/tmp/temp/one $ dog three
one



hard link four to two..
Show contents of four. <two contents.>


vram at Aether:~/tmp/temp/one $ ln two four
vram at Aether:~/tmp/temp/one $ dog four
two

vram at Aeter:~/tmp/temp/one $ ls -ll
total 12
-rw-r--r--  2 vram vram  4 2005-07-20 17:02 four
-rw-r--r--  1 vram vram 4 2005-07-20 17:01 one
lrwxrwxrwx  1 vram vram 3 2005-07-20 17:02 three -> one
-rw-r--r--  2 vram vram  4 2005-07-20 17:02 two
vram @Aether:~/tmp/temp/one $


Notice four and two have two links and one has one link..

Look at the size of the file on 3...
NOT obvious but just a link..


I hope this helps.....

With "ln" there is only ONE file....


Vram




And that is the news from Venersborg: where the women breathe well, the
men are handsome and the children are above average.











More information about the ubuntu-users mailing list