Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fuser recursively
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
d4mo
Guru
Guru


Joined: 27 Jun 2005
Posts: 430

PostPosted: Sun Mar 14, 2010 12:22 am    Post subject: Fuser recursively Reply with quote

Is there anyway to get an fuser(finding what has a file open) recursively?
Back to top
View user's profile Send private message
Raniz
l33t
l33t


Joined: 13 Sep 2003
Posts: 965
Location: Lund, Sweden

PostPosted: Mon Mar 15, 2010 8:19 am    Post subject: Reply with quote

What do you mean by recursively?
_________________
#312470 @ http://counter.li.org/
Back to top
View user's profile Send private message
Dr. Frankenbox
Apprentice
Apprentice


Joined: 16 Jul 2005
Posts: 157
Location: Nebraska, USA

PostPosted: Wed Feb 29, 2012 1:36 am    Post subject: Reply with quote

My guess would be to have it check all files under a given directory recursively, to get the full list of processes using anything under that directory. I have the same question myself; I'm trying to clear out /var on a system so I can set it up as its own partition, and that would make it a lot easier to find out what I need to kill before I move the old files.

Edit: This script, modified from linuxquestions.org, seems to do what I'm looking for:

Code:
find /var -exec fuser {} +
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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