Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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've run out of space on my gentoo installed partition which specifically holds /var
I intend to move the folder into the maind drive under /
I have already created a folder in the main drive called /my/var into which ive copied all the files.
I was wondering if there is a was of mount /my/var as /var (as far as the computer can tell) so that it may give me time to delete the old partition on which /var originally resides so that i can create a new large partition onto which i will copy the /var back.
I have tried to use mount --bind /var /myvar
but doing an ls /var still points to the contents of the old folder.
Whenever I do fiddly stuff like that, I like to boot up a LiveCD. I'm not enough of a Linux expert to know when messing with /var or /tmp will break the OS out from under me. With a LiveCD, I'd just be messing with some non-OS files.
My latest experimentation has been with diskless net-booting. It's almost creepy, being able to shut down the client computer entirely and still have access to its OS files on the server.
Remember that you need to unmount /var before moving it around. Really, trying to do this stuff on a "live" system seems a bit foolhardy to me. I'd personally boot up a LiveCD like Knoppix to do this stuff.
But assuming you can mess with /var in a live system without breaking it, here are the steps you'll need to do:
Note that the existing /var folder should be empty (you use an empty directory to mark a mountpoint for another partition). Using "mv" to rename it rather than deleting it outright is merely an overly paranoid precaution.
The "ln -s" statement creates the symlink the correct way. The statement shown above has it the wrong way around. The example I give creates a new link in the position "/var", pointed at "/my/var".