LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-22-2004, 09:46 AM   #1
paulvl
LQ Newbie
 
Registered: Aug 2003
Location: The Netherlands, Zoetermeer (15Km East from The Hague)
Distribution: Red Hat Linux release 9 (Shrike) (Kernel 2.4.20-8 on an i686)
Posts: 27

Rep: Reputation: 15
Question de mogelijkheden van het mount --bind commando


Ik heb nog een heleboel onduidelijkheden met betrekking tot het mount commando. Ik hoop dat iemand me op de volgende 5 punten wat meer duidelijkheid zou kunnen verschaffen.

1. Kan mount 2 directory's samengevoegd mounten (--bind) in 1 directory? Bijvoorbeeld:
Code:
$ ls audio/lyrics
art1-tit1.lyric
art2-tit2.lyric
$ ls audio/music
art1-tit1.mp3
art2-tit2.mp3
$ ls audio/allfiles
art1-tit1.lyric
art1-tit1.mp3
art2-tit2.lyric
art2-tit2.mp3
2. Is het mogelijk om te mounten (--bind) m.b.v. een filter? Bijvoorbeeld:
Code:
$ ls audio/allfiles
file1.mp3
file2.mp3
file3.ogg
file4.ogg
$ ls audio/mp3s
file1.mp3
file2.mp3
$ ls audio/oggs
file3.ogg
file4.ogg
3. Ik doe mount --bind olddir newdir. Als ik een bestand aanmaak in de olddir is deze netjes beschikbaar in de newdir. Als ik een bestand aanmaak in de newdir, dan is deze niet beschikbaar in de olddir. Dit kan handig zijn, maar is er ook zoiets als een 'totale bind' die de directory identiek maakt (en houdt)?

4. Ik doe mount --bind dirX dirA en mount --bind dirX dirB. Is het mogelijk om de rechten voor de bestanden in dirA read-only te laten zijn terwijl dirB writable is?

5. In de manual pages van mount word gesproken over een --rbind. Het is me echter niet duidelijk wat de eigenschappen hiervan zijn (en waarin deze verschilt van de --bind)

Een hele hoop vragen. Ik hoop dat iemand ze zou willen beantwoorden.

In iedergeval alvast bedankt.

MvG,
Paul van Leeuwen
 
Old 03-22-2004, 10:02 AM   #2
lone_nut
Member
 
Registered: Dec 2003
Location: Denmark
Distribution: Mandrake
Posts: 179

Rep: Reputation: 30
you will get some answers if you write in english.
 
Old 03-22-2004, 10:21 AM   #3
paulvl
LQ Newbie
 
Registered: Aug 2003
Location: The Netherlands, Zoetermeer (15Km East from The Hague)
Distribution: Red Hat Linux release 9 (Shrike) (Kernel 2.4.20-8 on an i686)
Posts: 27

Original Poster
Rep: Reputation: 15
Question

Sorry, I posted it before on a dutch forum, but didn't got response. I just copy pasted it without thinking

Anyway, here in english:

Right now, the ln command looks like what I need, but there are still some question I can't find the answers to...

1. Is it possible to have 1 directory linking to 2 other directory's? For example:
Code:
$ ls audio/lyrics        (original)
art1-tit1.lyric
art2-tit2.lyric

$ ls audio/music         (original)
art1-tit1.mp3
art2-tit2.mp3

$ ls audio/allfiles
art1-tit1.lyric
art1-tit1.mp3
art2-tit2.lyric
art2-tit2.mp3
2. Is it possible to link using some sort of filter? Like:
Code:
$ ls audio/allfiles       (original)
file1.mp3
file2.mp3
file3.ogg
file4.ogg
file5.something

$ ls audio/mp3s          (all mp3's found in the allfiles directory)
file1.mp3
file2.mp3

$ ls audio/oggs          (all ogg's found in the allfiles directory)
file3.ogg
file4.ogg
4. Is there some contruction to apply multiple rights to a file? For example:
Code:
$ ln -s /somewhere/only/accesible/by/root /home/phil    (read-only)
$ ln -s /somewhere/only/accesible/by/root /home/rob     (writable)
5. What is the difference between hard-links and soft-links? The only thing they where able to explain me was that hard-links don't work on directory's.

6. Last but not least: is it possible to let a script run on specific events? (like someone changing something in the directory content?

A lot a questions, I know. I hope they're not all dump questions

Anyway, thanks a lot for reading, even more when answering,

Ciao,
Paul van Leeuwen
 
Old 03-22-2004, 11:41 AM   #4
lone_nut
Member
 
Registered: Dec 2003
Location: Denmark
Distribution: Mandrake
Posts: 179

Rep: Reputation: 30
Okay i prommised you some answers:
1:you can make a link from a file to a file, or many files. But if you make a new file, you will have to make a new link
5: i you make a hard link to a file and delete the original, the copy still is present, and still works. Basicly the reference to the file is deleted, but the content is not. If all references to a file is removed the contens will be erased, leving the space free. (note if you override the content, instead of deleting the file it is lost)
A soft link is basicly a request to the OS to open some other file.
To be able to create a hard link, both the "files" must be on the same partion/disk. Otherwise only a soft link would work.

6:
Crontab is usefull for this purpose. For more info type:
man crontab
 
Old 03-26-2004, 11:31 AM   #5
paulvl
LQ Newbie
 
Registered: Aug 2003
Location: The Netherlands, Zoetermeer (15Km East from The Hague)
Distribution: Red Hat Linux release 9 (Shrike) (Kernel 2.4.20-8 on an i686)
Posts: 27

Original Poster
Rep: Reputation: 15
Smile Many thanks

Thanks for your help. I'm doing quite funny things with linking; quite usefull too.
The crond is still not doing what it is supposed to, but that is a settings problem I can fix on my own.

So, thanks a lot

PvL
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mount --bind (fstab problem) renski Linux - General 2 11-17-2005 03:50 PM
How to make mount --bind persistant linuxnube Linux - Software 1 06-10-2004 08:06 PM
mount --bind, vfat and permissions jobano Linux - General 0 05-24-2004 09:53 AM
persistent mount --bind linuxnube Linux - Software 0 05-12-2004 08:24 PM
mount --bind on boot tp6400 Linux - Newbie 1 01-25-2004 09:41 PM


All times are GMT -5. The time now is 05:03 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration