Unix administration - need help with ln command.

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > November 2004 > need help with ln command.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author need help with ln command.
JustSomeGuy

2004-10-27, 8:46 pm

I have a second partition and would like to have a directory in my home
directory that points to that partition...
I can't seem to figure out what the syntax is for the ln command.

ln FreeDrive /Volumes/FreeDrive/

Where FreeDrive is the directory in my home dir
and /Volumes/FreeDrive/ is the root directory on the free drive..

TIA.
B.



Barry Margolin

2004-10-27, 8:46 pm

In article <xoXfd.41887$nl.20289@pd7tw3no>,
"JustSomeGuy" <nope@nottelling.com> wrote:

> I have a second partition and would like to have a directory in my home
> directory that points to that partition...
> I can't seem to figure out what the syntax is for the ln command.
>
> ln FreeDrive /Volumes/FreeDrive/
>
> Where FreeDrive is the directory in my home dir
> and /Volumes/FreeDrive/ is the root directory on the free drive..


Without the -s option, ln creates hard links, which cannot cross
filesystem boundaries. To go between filesystems you need to use a
symbolic link:

ln -s /Volumes/FreeDrive $HOME

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Patrick Beckhelm

2004-11-04, 5:50 pm

"JustSomeGuy" <nope@nottelling.com> wrote in message news:<xoXfd.41887$nl.20289@pd7tw3no>...
> I have a second partition and would like to have a directory in my home
> directory that points to that partition...
> I can't seem to figure out what the syntax is for the ln command.
>
> ln FreeDrive /Volumes/FreeDrive/
>
> Where FreeDrive is the directory in my home dir
> and /Volumes/FreeDrive/ is the root directory on the free drive..
>
> TIA.
> B.



On another, more general note, you'll be more able to figure this
stuff out if you make liberal use of the 'man' command:

From 'man ln':

A hard link is a pointer to a file and is
indistinguishable from the original directory entry. Any
changes to a file are effective independent of the name used
to reference the file. Hard links may not span file systems
and may not refer to directories.

....just a tip

Patrick
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com