View previous topic :: View next topic |
Author |
Message |
Ravicini n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 03 Dec 2003 Posts: 4 Location: Switzerland
|
Posted: Mon May 10, 2004 4:21 pm Post subject: check mounted smb file systems |
|
|
I mounted an smb share with
Code: | mount -t smbfs -o "rw,username=userS,password=pwdS,uid=userL,gid=groupL" //server/share /mnt/fha |
How can i now check with a shell command if the mounted filesystem is present or not.
It is possible that the network connection breaks and if I copy something through a cron job or a script in the filesystem that it don't work. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
zsoltika l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/150318895542cb9cf0ab8c2.png)
Joined: 13 Nov 2003 Posts: 634 Location: Budapest, Hungary
|
Posted: Mon May 10, 2004 4:58 pm Post subject: |
|
|
Just try this one:
Code: | ls /mnt/fha/directory/that/exists 1&>2 > /dev/null && myscript.sh |
Of course, there are lot more ways to do this, but I prefer this one.
Sorry about my english, cheers:
Zsoltika
Edit: I swapped the 2&>1 thing. Now it's correct... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ravicini n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 03 Dec 2003 Posts: 4 Location: Switzerland
|
Posted: Mon May 10, 2004 6:16 pm Post subject: thank you |
|
|
can you please tell me your other ones?
I haver ther problem, that i don't want to know any directory
that is in there (you wrote = directory/that/exists/)
thank you _________________ Gentoo on PIV 2k Laptop
Kernel: 2.6.4
fluxbox
REBOOT life is a physical loopback anyway
How many people can read hex if only you
and dead people can read hex? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
zsoltika l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/150318895542cb9cf0ab8c2.png)
Joined: 13 Nov 2003 Posts: 634 Location: Budapest, Hungary
|
Posted: Tue May 11, 2004 7:39 am Post subject: |
|
|
I would use this one in your case:
Code: | ls /mnt/fha/directory/* 1&>2 > /dev/null && myscript.sh |
But I'm looking for other solutions, ASAP.
Cheers,
Zsoltik@ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|