| View previous topic :: View next topic |
| Author |
Message |
4rturr n00b


Joined: 07 May 2007 Posts: 31 Location: Kielce/PL
|
Posted: Sun May 03, 2009 6:53 pm Post subject: Skrypt bash do wyłączania dysku |
|
|
Witam,
Mam dysk usb podłączony do routera asus. Trochę martwi mnie, że gdy odejde od kompa dysk cały czas wiruję. I teraz chciałbym napisać skrypt który wrzucę do crona, który sprawdzi czy z dysku korzystają jakieś programy. Jeśli nie to dysk zostanie wyłączony komendą sdparm --command=stop. Nie mam pomysłu jak napisać instrukcję warunkową sprawdzającą czy coś korzysta z dysku. |
|
| Back to top |
|
 |
SlashBeast Moderator


Joined: 23 May 2006 Posts: 2540 Location: Zduńska Wola, Poland.
|
Posted: Sun May 03, 2009 7:21 pm Post subject: |
|
|
lsofem mozna sprawdzac. lsof /path/foo/bar do mountpointa np. _________________ github |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|