LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 02-22-2004, 02:54 AM   #1
e1000
Member
 
Registered: Oct 2003
Location: California
Distribution: Ubuntu
Posts: 582

Rep: Reputation: 30
moving a symlink in a directory


Lets say that I have a directory "/test/" and in that I have a file "/test/mydoc.txt" and I made symlink called "/test/yourdoc.txt" that points to "mydoc.txt"

How could I more or copy that directory to another location in such a way that it didnt break the symlink (so that its still linked to the same file that is now in a new directory).

and no I dont want to relink it manually cause where I need to do it, theres like 20 links.

Last edited by e1000; 02-22-2004 at 02:56 AM.
 
Old 02-22-2004, 04:01 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
you should create the symlink correctly in the first place, usnig a relative path, rather than an absolute one. if the link points to "./mydoc.txt" and not "/test/mydoc.txt" then you won't have a problem
 
Old 02-23-2004, 06:09 PM   #3
e1000
Member
 
Registered: Oct 2003
Location: California
Distribution: Ubuntu
Posts: 582

Original Poster
Rep: Reputation: 30
heres the thing, when i tried to install this program, it wont install normally, it just gives me a directory with /lib/ and /usr/lib/ and the new contents are in those directorys.

i need to copy the files from /directory/lib/ into /lib/ and i need to copy the stuf from /directory/usr/lib/ into /usr/lib/. heres where the problem is. all the stuf in the /directory/lib/ is linked relatively. but some of the stuf in /directory/usr/lib/ is linked to /directory/lib .

so does anyone know how to do this without manually relinking all the files?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving /home Directory? NovaBurst DamnSmallLinux 1 04-18-2005 11:59 PM
how to remove a symlink without deleting the destination directory Snerkel Linux - Software 3 01-20-2005 12:47 PM
symlink multiple files to new directory with new extension jmanjohn61 Linux - General 1 01-06-2005 01:55 PM
problem moving directory sanjith11 Linux - Software 4 06-02-2004 08:06 AM
Moving A Directory. reesee Linux - Newbie 6 02-04-2004 03:16 AM


All times are GMT -5. The time now is 04:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration