Linux - GeneralThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm sorry if this is a duplicate, but most of the posts I could find on this subject pertains to removing a symbolic link.
I have 2 symbolic links
current -> /home 1.3
previous -> /oldhome 1.2
I have a bash script that copies the current to the previous. Before I do that though I want to remove the previous. I don't want to just remove the link. I also want to remove the target of the link. The problem is that I don't know where the previous link is pointing to because it's a versioned directory and I won't know what the version is within the script.
If deleting the links target isn't possible, I can solve this problem if anyone can tell me how to print out what the link is pointing to.
I've just discovered readlink which returns the directory it's pointing to. With that I can solve my issue, but I'd still like to know if deleting a symbolic link's target through the link is possible.
For example (I know this doesn't work)
returns: /oldhome 1.2
Thank you for any help.
Last edited by bilyboy65; 06-08-2012 at 03:59 PM.
Reason: partial solution