Prev: Saving files of one folder in another partition, but without changing the path?
Next: automatically removing commercials from recorded movies
From: Camaleón on 4 Jul 2010 08:00 On Sat, 03 Jul 2010 23:33:04 +0200, Merciadri Luca wrote: > Hi, > > Put simply, I have a program which saves data in a subdirectory of > /var/lib/. The problem is double: > > 1. I can't modify the path where data are saved; 2. I'm lacking free > space in /var/lib/the_concerned_subfolder/ because it is on an isolated > partition (say hda2). > > However, I have free space in /home/merciadriluca/, but this is on > another partition (say hda1). How could I manage to save > /var/lib/the_concerned_subfolder/* data at > /home/merciadriluca/another_folder/ so that the program notices nothing? > Symlink? I'd say yes. Something like: *** mkdir /home/merciadriluca/destination_folder ln -s /var/lib/linked_folder /home/merciadriluca/destination_folder *** Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/pan.2010.07.04.11.57.00(a)gmail.com
From: Merciadri Luca on 4 Jul 2010 20:40
Thanks. That's what I was thinking about. Axel Freyn wrote: > Hi, > On Sat, Jul 03, 2010 at 11:33:04PM +0200, Merciadri Luca wrote: > >> Put simply, I have a program which saves data in a subdirectory of >> /var/lib/. The problem is double: >> >> 1. I can't modify the path where data are saved; >> 2. I'm lacking free space in /var/lib/the_concerned_subfolder/ because >> it is on an isolated partition (say hda2). >> >> However, I have free space in /home/merciadriluca/, but this is on >> another partition (say hda1). How could I manage to save >> /var/lib/the_concerned_subfolder/* data at >> /home/merciadriluca/another_folder/ so that the program notices >> nothing? >> Symlink? >> > > Symlink is one possibility: > ln -s /home/merciadriluca/another_folder > /var/lib/the_concerned_subfolder/ > will create a link "/var/lib/the_concerned_subfolder/" which points to > /home/merciadriluca/another_folder" (before, you have to remove > /var/lib/the_concerned_subfolder/) > > Another possibility would be to bind-mount the directories: > (both directories have to exist, /var/lib/the_concerned_subfolder/should > be empty) > mount -o bind /home/merciadriluca/another_folder > /var/lib/the_concerned_subfolder/ > Then, you can access the same data in both directories -- they are > stored on the device of /home/merciadriluca/another_folder > -- Merciadri Luca See http://www.student.montefiore.ulg.ac.be/~merciadri/ I use PGP. If there is an incompatibility problem with your mail client, please contact me. Life is like a box of chocolate, you never know what you're gonna get. |