Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Skrypt bash do wyłączania dysku
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW
View previous topic :: View next topic  
Author Message
4rturr
n00b
n00b


Joined: 07 May 2007
Posts: 31
Location: Kielce/PL

PostPosted: Sun May 03, 2009 6:53 pm    Post subject: Skrypt bash do wyłączania dysku Reply with quote

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
View user's profile Send private message
SlashBeast
Moderator
Moderator


Joined: 23 May 2006
Posts: 2540
Location: Zduńska Wola, Poland.

PostPosted: Sun May 03, 2009 7:21 pm    Post subject: Reply with quote

lsofem mozna sprawdzac. lsof /path/foo/bar do mountpointa np.
_________________
github
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW All times are GMT
Page 1 of 1

 
Jump to:  
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