LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   redirect from directory to another (https://www.linuxquestions.org/questions/linux-newbie-8/redirect-from-directory-to-another-589453/)

drudge 10-04-2007 01:59 PM

redirect from directory to another
 
Hi, I like to have 2 installations of the same distro, 1 working
and one for 'messing/breaking'. Each time I re-install the 'messing'
version I copy the contents of apt cache archive from working.

Now it's up to 1.5gb is there any way (I'm sure there must be)
to point the new empty cache to the old full cache on a
different partition? So that synaptic would use the existing debs.

ie When synaptic looks in /var/cache/apt/archives
at actually sees the contents of /mnt/hdb5/var/cache/apt/archives

Any info, even phrases I should be googling for would be appreciated.
Thanks

winsnomore 10-04-2007 02:12 PM

simple thing like:

ln -s this_old_dir to_this_new_dir

should do it.

osor 10-04-2007 02:36 PM

One word: symlink

drudge 10-04-2007 03:39 PM

Quote:

Originally Posted by winsnomore (Post 2913344)
simple thing like:

ln -s this_old_dir to_this_new_dir

should do it.

Thanks, # ln -s /mnt/hdb2/var/cache/apt/archives to /var/cache/apt
worked great.

Synaptic does use the old archive, which is good, but it also
shows this error, even though everything seemed to work ok.

E: Unable to stat to. - stat (40 Too many levels of symbolic links)

I'll go googling...

osor 10-04-2007 04:32 PM

Quote:

Originally Posted by drudge (Post 2913434)
E: Unable to stat to. - stat (40 Too many levels of symbolic links)

This most likely means there is at least one file inside the target directory (e.g., “/mnt/hdb2/var/cache/apt/archives”) which has a symbolic link outside and into the source (e.g., “/var/cache/apt”). As such, when the computer tries to stat this file, it goes crazy in an infinite loop. But there are safeguards to protect against such infinite looping (normally implemented as symlink-level count). Thus it throws the error. As long as this error is non-fatal, and as long as everything else seems to work fine, I wouldn’t worry about it.

drudge 10-04-2007 05:39 PM

Quote:

Originally Posted by osor (Post 2913496)
As long as this error is non-fatal, and as long as everything else seems to work fine, I wouldn’t worry about it.

That's good to know, thanks


All times are GMT -5. The time now is 01:30 AM.