Jump to content


Click the link below to see the new game I'm developing!


Photo
- - - - -

test post 2


No replies to this topic

#1 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,652 posts
  • Gender:Male
  • Location:Spain

Posted 16 January 2006 - 06:18 PM

In Unix, use the fuser command...

Here is a example...

tmp=/tmp/"$LOGNAME".usg
user=$LOGNAME
if [ ! "$1" = "" ]; then
user=$1
fi

for file in `ls`
do
fuser -u $file >>$tmp 2>$tmp
# cat $tmp
fi=`grep $user $tmp | wc -l`
fi=`echo $fi`

if [ ! "$fi" = "0" ]; then
echo ok - $file
fi
done
rm $tmp




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Click the link below to see the new game I'm developing!