Please login or register.

Login with username, password and session length
Advanced search  


Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: Theoretical question: soft linking config files  (Read 1776 times)


  • Vectorite
  • ***
  • Posts: 165
Theoretical question: soft linking config files
« on: May 23, 2008, 02:53:22 am »


I'm in the process of configuring a remote machine. But my experience tells me that it's hard to keep track of all the changes that I made to the machine.

So I decided to write a script that stores all my original *.conf files in a separate directory rather than my previous practice of making a .bak file in the current directory.

Now I'm wondering... what are the pros and cons for softlinking the config files to actual config files in a separate directory?

For example, /etc/fstab is a soft link to /etc/custom/fstab
The original fstab is stored as /etc/custom/original/fstab
And any changes that I make are in the /etc/custom/fstab
Recent copies of custom config files are stored in /ets.custom/backup

The script is gonna be quite elaborate, but once done I think it's gonna safe me a lot of trouble. But as you might imagine, I am not completely sure of the implications of soft linking any custom configs.

EDIT: This script will work equally well for working with different versions of scripts and plain text files. Maybe the /etc/ directory isn't the most sane place to store backups and originals then... but that is just one variable to adjust.
« Last Edit: May 23, 2008, 03:33:19 am by Freston »


  • Administrator
  • Vectorian
  • *****
  • Posts: 1897
Re: Theoretical question: soft linking config files
« Reply #1 on: May 23, 2008, 04:15:37 am »

Since a symlink is seen the same as the actual file, you
shouldn't have any problems.

Create another directory and then just create the symlinks to
the intended location. Then backups and reinstall is relatively easy.

There is also another way which would be time stamps or
search for .bak files.

Just my 0.02



  • Vectorite
  • ***
  • Posts: 165
Re: Theoretical question: soft linking config files
« Reply #2 on: May 23, 2008, 04:52:33 am »


The script is turning out to becoming quite a handy tool. It's now in the phase where I keep thinking about more functionality to add, although the core functionality is working quite nice already.