[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A *huge* advantage of using relative paths when creating web content is it
makes the content portable within a tree. Using relative links, you could
take the entire root folder and copy it to dir/dir/dir and it would still
work and allow you to make a new file in /var/www/dir called index.html
in as much
ln -s /var/log/apache /etc/apache/logs
is an absolute symbolic link
ln -s ../../var/log/apache logs
is a relative link
The advantage here is that a relative link works better if you should ever
want to work on a chroot-ed env without being ch-rooted in it. If a
chrooted env uses absolute sym links and is in /usr/export/chroot1 then
the link in /usr/export/chroot1/etc/apache/logs that points with an
absolute path to "/var/log/apache" will point to the "real /" not the
chrooted "/" (/usr/export/chroot1) while a relative symlink path of
"../../var/log/apache from /usr/export/chroot/etc/logs will work when
chrooted in the chroot1 dir or in the "real /".
cool tools in debian land for this:
symlinks (convert all absolute links into relative ones)
link (delete dangling symlinks - use with care and at risk!)
(I seem to recall warning people about using symlinks like this, and only
use it as a temporary "patch" but do the "right thing" and get a different
partition for it. not an "I told you so", more of, "another reason to
use separate real mounted partition")
> I decided I'd simply move the files in /var back to the root partition. I
> tried to start this process by creating a temporary directory in / with the
> # mkdir /var2
> ...to which I got this error:
> could not create directory /var2. Input output error.
Strange error. Did you make sure your filesystems were mounted with rw
access? You made sure there was no /var2 folder/file too right? If you
were doing this work from a rescue disk, they often mount filesystems ro
(read only) but can be mounted with "rw" access as root by
# mount -t fstype -o remount,rw /path/to/mount/point
# mount -t ext2 -o remount,rw /
> ...and that just seems terrifying to me.
But there must be a good reason. Follow your nose. See where it leads.
> I'm running a Red Hat 7.2 system, not quite brave enough to do a full
> reinstall of Linux (though I might just do that, after copying all of my
> documents to a CD).
> I hope I've provided enough information. What else could I be doing?
There are many things to examine. Try going through the above and answer
some of the Q's posed. Others will undoubtedly have other ideas.
When you copy stuff to the newly mounted volume/space make sure to use:
# cp -aR /src /dst
if there are any device special files. (I often use this to be safe)
if you are not sure if there are any device special files (fifo, char,
block etc) then you can use the:
# cp -ar /src /dst
Hope this helps, but if it does not, let's keep going.
-----BEGIN GEEK CODE BLOCK-----
GCS/CM$/IT$/LS$/S/O$ !d--(++) !s !a+++(-----) C++$(++++) U++++$(+$) P+$>+++
L+++$(++) E W+++$(+) N+ o K w+$>++>+++ O-@ M+$ V-$>- !PS !PE Y+ !PGP
t@-(++) 5+@ X@ R- tv- b++ DI+++ D+ G--@ e+>++>++++ h(++)>+ r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html
vox-tech mailing list