Question:
DOS subst command for Linux?
?
2011-02-25 18:20:02 UTC
It's probably going to be a SymLink, but here's what I want to accomplish:

I make a large redundant /home volume when I build a server, AND /home is from where I want to back things up as well. But Ubuntu's Apache wants to use /var/www to put everything and so does PHP, MySQL and Drupal. /VAR is in a MUCH smaller /(root) volume that is usually also some form of FauxRAID, but definitely inadequate to be DocRoot for a bunch of websites.
Now I've already configured Apache to use /home/public_html for Document Root on all Virtual Servers that it spawns, but I've got a whole bunch of stuff in /var/www (about 2300 files and subdirectories) that if I move I'll also have to edit all the references in a couple of dozen configuration files in a half a dozen daemons. Back in my beloved DOS days I'd just put "subst p: c:\var\www" in autoexec.bat and let the file system take care of the corpses.

I want to do the same (well, similar) thing here with Ubuntu Server 10.4 LTS. Anything the server looks for in or tries to write to /var/www it will magically be in /home/public_html.

Smiley
Three answers:
Joe B
2011-02-25 18:26:43 UTC
A symlink is a good way to go.



ln -s /var/www /home/public_html
† Oh yeah
2011-02-26 01:51:51 UTC
You want to copy all the existing data in www to home/public_html, then rename www (in case something goes wrong) and create a symbolic link with the name www in /var



cd /var/www



cp -R * /home/public_html



cd /var



mv www www_backup



ln -s /home/public_html www
?
2016-12-02 05:39:25 UTC
you need to in simple terms pass a returned thank you to p.c.. stuff up 4 ur spouse. i'm specific that there is a returned way i mean each subject has a returned way. this is cool. good success! oh and if there is not any returned way then in simple terms forget approximately them each subject would be very nicely, they are going to at last supply up and recognize which you're actually not likely to p.c.. any subject else up yet what you're picking up for ur spouse. dont you subject. (each subject has a fashion) as i mentioned formerly good success!!!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...