Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[LN] Too many levels of symbolic links ? (resolu)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
dapsaille
Advocate
Advocate


Joined: 02 Aug 2004
Posts: 2366
Location: Paris

PostPosted: Tue Oct 02, 2007 8:58 am    Post subject: [LN] Too many levels of symbolic links ? (resolu) Reply with quote

Bonjour,


Voila .. j'ai bougé mes /home sur une partition dédié .. j'ai voulu ensuite faire les liens symboliques et la ..

Code:

SERVER datas # ln -s florent/ /home/florent
SERVER datas # ln -s p2p /home/p2p
SERVER datas # cd /home
SERVER home # ls
florent  p2p
SERVER home # cd florent
-bash: cd: florent: Too many levels of symbolic links
SERVER home # ls
florent  p2p
SERVER home # rm florent p2p
SERVER home # ln -s /datas/florent/ /home/florent
SERVER home # cd florent/
SERVER florent # cd ..
SERVER home # ln -s /datas/p2p/ /home/p2p
SERVER home # cd p2p/



Bref ... grosso modo si je ne spécifie pas le chemin complet lors du ln il m'envoie bouler .. sauriez vous le pourquoi du comment ??


Last edited by dapsaille on Tue Oct 02, 2007 9:18 am; edited 1 time in total
Back to top
View user's profile Send private message
geekounet
Bodhisattva
Bodhisattva


Joined: 11 Oct 2004
Posts: 3772
Location: Wellington, Aotearoa

PostPosted: Tue Oct 02, 2007 9:15 am    Post subject: Reply with quote

Avec un ln -s florent/ /home/florent, tu créé un lien symbolique de florent vers florent, donc ça tourne en boucle. En fait, le premier argument est simplement une chaine de caractère indiquant un chemin relatif par rapport au lien de destination, ça n'a pas de rapport avec le répertoire courant d'où tu lances la commande ... hm je sais pas si j'arrive à être clair en fait ... :?
En gros, pour bien faire, en relatif et tout, tu peux faire un ln -s ../datas/florent /home/florent, et qu'importe d'où tu exécutes ça, ça créé le symlink /home/florent pointant sur un chemin relatif par rapport au symlink (ou absolu, ça dépend du premier argument).

EDIT: regardes à coup de ls -l /home les premiers liens que tu as créé, tu comprendras ptêt mieux ;)
Back to top
View user's profile Send private message
dapsaille
Advocate
Advocate


Joined: 02 Aug 2004
Posts: 2366
Location: Paris

PostPosted: Tue Oct 02, 2007 9:18 am    Post subject: Reply with quote

Haaa ok donc si je fait ln -s florent /home/florent

le symlink créé dans /home qui se nomme florent pointeras sur florent qui est lui même du coup situé dans home car relatif ??


En effet pas simple à expliquer mais tu as réussi :p


Je te remercie :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum