Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to modify the Symbolic link file.

 
jing hu
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I have many Symbolic link files.
for example there are two dirs named A and B. Dir A has many config file,
And Dir B has the sysmbolic link files to the config files in A.

Now I want to rename dir A to C. So the link file in B will be not valid.
In dir B, use command "ls -al", the output will be :


I want to modify all link files in B to link the config files in dir C, and the output will be:



How can I implement this easily?
Thanks very much.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rename A to C, but also create a link A -> C !
 
jing hu
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah, This is a very smart method. But I need to delete the dir A.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic