Prev: Saving files of one folder in another partition, but without changing the path?
Next: Saving files of one folder in another partition, but without changing the path?
From: Axel Freyn on 4 Jul 2010 08:00 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 HTH, Axel -- 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/20100704115605.GG20892(a)axel |