LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can I "mount <some_directory> <another_directory>"? (https://www.linuxquestions.org/questions/linux-software-2/can-i-mount-some_directory-another_directory-445412/)

manishsingh4u 05-16-2006 01:23 PM

Can I "mount <some_directory> <another_directory>"?
 
Hello Friends,
I have directory named /media/hda7/Songs which I wish to mount to my /var/www/songs directory. I know how to mount a filesystem to a directory with
Code:

mount /dev/hda7 -t ext2 /media/hda7
But, now I wish to mount only a directory instead of a device. Is it possible?

labratmatt 05-16-2006 01:27 PM

Wouldn't a sym link do the same thing?

haertig 05-16-2006 01:38 PM

For simple things, a symlink - like labratmatt said. For more complex things, like overlaying multiple directories into a single mountpoint, ... unionfs

kencaz 05-16-2006 01:41 PM

You could mount /media/hda7 in multiple locations but you can't mount the directory. But like was said above a symlink will do the same thing.

ln -s /media/hda7 /var/www/songs_directory

KC

manishsingh4u 05-16-2006 02:27 PM

Quote:

Originally Posted by labratmatt
Wouldn't a sym link do the same thing?

Quote:

Originally Posted by haertig
For simple things, a symlink

Quote:

Originally Posted by kencaz
ln -s /media/hda7 /var/www/songs_directory

Thanks a lot friends.
Code:

ln -s /media/hda7/Songs /var/www/songs
The symlink did work fine. Thanks again.


All times are GMT -5. The time now is 09:30 AM.