FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 06-25-2008, 03:33 AM
Robert Moskowitz
 
Default Changing the symbolic link for /Centos/5

I do not know the command line for symbolic links. I created the
symbolic link of /Centos/5 to /Centos/5.1 in Nautilus which does not
have a method of changing a symbolic link. Only deleting it and
creating a new one.


Is there a command line to change /Centos/5 to link to /Centos/5.2 ?

IMNSHO, anyone that has more than 2 Centos boxes should maintain their
own local repo. Of course it only took me a few years until I got mine
up and running! Just had some challenges walking the talk




_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-25-2008, 08:48 AM
Johnny Hughes
 
Default Changing the symbolic link for /Centos/5

Robert Moskowitz wrote:
I do not know the command line for symbolic links. I created the
symbolic link of /Centos/5 to /Centos/5.1 in Nautilus which does not
have a method of changing a symbolic link. Only deleting it and
creating a new one.




Not that I know of, I always just delete an recreate it using "rm -f"
and "ln -s" at the command line.



Is there a command line to change /Centos/5 to link to /Centos/5.2 ?



I just delete and re-create it

IMNSHO, anyone that has more than 2 Centos boxes should maintain their
own local repo. Of course it only took me a few years until I got mine
up and running! Just had some challenges walking the talk


I agree with this when maintaining more than a couple boxes, certainly
if maintaining more than 4 or 5 at the same location, especially with
limited bandwidth.




_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-25-2008, 11:15 AM
"William L. Maltby"
 
Default Changing the symbolic link for /Centos/5

On Wed, 2008-06-25 at 03:48 -0500, Johnny Hughes wrote:
> Robert Moskowitz wrote:
> > I do not know the command line for symbolic links. I created the
> > symbolic link of /Centos/5 to /Centos/5.1 in Nautilus which does not
> > have a method of changing a symbolic link. Only deleting it and
> > creating a new one.
> >
>
> Not that I know of, I always just delete an recreate it using "rm -f"
> and "ln -s" at the command line.

It used to be that the -f worked. Sometime in the past that disappeared.
Bad decision, IMHO.

> <snip>

--
Bill

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-26-2008, 12:05 AM
Gavin Carr
 
Default Changing the symbolic link for /Centos/5

On Wed, Jun 25, 2008 at 07:15:00AM -0400, William L. Maltby wrote:
>
> On Wed, 2008-06-25 at 03:48 -0500, Johnny Hughes wrote:
> > Robert Moskowitz wrote:
> > > I do not know the command line for symbolic links. I created the
> > > symbolic link of /Centos/5 to /Centos/5.1 in Nautilus which does not
> > > have a method of changing a symbolic link. Only deleting it and
> > > creating a new one.
> > >
> >
> > Not that I know of, I always just delete an recreate it using "rm -f"
> > and "ln -s" at the command line.
>
> It used to be that the -f worked. Sometime in the past that disappeared.
> Bad decision, IMHO.

It's still there:

nox:~/tmp/ln$ touch foo
nox:~/tmp/ln$ touch bar
nox:~/tmp/ln$ ln -s foo baz
nox:~/tmp/ln$ ll
total 12
-rw-r--r-- 1 gavin gavin 0 Jun 26 10:06 bar
lrwxrwxrwx 1 gavin gavin 3 Jun 26 10:06 baz -> foo
-rw-r--r-- 1 gavin gavin 0 Jun 26 10:06 foo
nox:~/tmp/ln$ ln -sf bar baz
nox:~/tmp/ln$ ll
total 12
-rw-r--r-- 1 gavin gavin 0 Jun 26 10:06 bar
lrwxrwxrwx 1 gavin gavin 3 Jun 26 10:06 baz -> bar
-rw-r--r-- 1 gavin gavin 0 Jun 26 10:06 foo


It does seem to be flaky though. I definitely have had times it hasn't
worked recently.

Cheers,
Gavin

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-26-2008, 09:21 AM
Mikael Fridh
 
Default Changing the symbolic link for /Centos/5

On Thu, Jun 26, 2008 at 10:05:11AM +1000, Gavin Carr wrote:
> On Wed, Jun 25, 2008 at 07:15:00AM -0400, William L. Maltby wrote:
> >
> > On Wed, 2008-06-25 at 03:48 -0500, Johnny Hughes wrote:
> > > Robert Moskowitz wrote:
> > > > I do not know the command line for symbolic links. I created the
> > > > symbolic link of /Centos/5 to /Centos/5.1 in Nautilus which does not
> > > > have a method of changing a symbolic link. Only deleting it and
> > > > creating a new one.
> > > >
> > >
> > > Not that I know of, I always just delete an recreate it using "rm -f"
> > > and "ln -s" at the command line.
> >
> > It used to be that the -f worked. Sometime in the past that disappeared.
> > Bad decision, IMHO.
>
> It's still there:
>
> nox:~/tmp/ln$ touch foo
> nox:~/tmp/ln$ touch bar
> nox:~/tmp/ln$ ln -s foo baz
> nox:~/tmp/ln$ ll
> total 12
> -rw-r--r-- 1 gavin gavin 0 Jun 26 10:06 bar
> lrwxrwxrwx 1 gavin gavin 3 Jun 26 10:06 baz -> foo
> -rw-r--r-- 1 gavin gavin 0 Jun 26 10:06 foo
> nox:~/tmp/ln$ ln -sf bar baz
> nox:~/tmp/ln$ ll
> total 12
> -rw-r--r-- 1 gavin gavin 0 Jun 26 10:06 bar
> lrwxrwxrwx 1 gavin gavin 3 Jun 26 10:06 baz -> bar
> -rw-r--r-- 1 gavin gavin 0 Jun 26 10:06 foo
>
>
> It does seem to be flaky though. I definitely have had times it hasn't
> worked recently.

If there's already a link to a directory, you need -n (usually);

-n, --no-dereference
treat destination that is a symlink to a directory as if
it were a normal file

Otherwise, you'll end up with a rogue link inside the existing directory:

mikaelf@mikaelf:/tmp/ln$ ln -sf foo link
mikaelf@mikaelf:/tmp/ln$ ls -lR
.:
total 8
drwxr-xr-x 2 mikaelf mikaelf 4096 2008-06-26 11:19 bar
drwxr-xr-x 2 mikaelf mikaelf 4096 2008-06-26 11:16 foo
lrwxrwxrwx 1 mikaelf mikaelf 3 2008-06-26 11:19 link -> bar

./bar:
total 0
lrwxrwxrwx 1 mikaelf mikaelf 3 2008-06-26 11:19 foo -> foo

./foo:
total 0

--
Fridh
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 09:04 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org