Shell Script to delete files

Akash Jain akash.delhite at
Sat Apr 20 08:42:56 UTC 2013

My aim is to delete more than 5 days old files which are no longer used 
by any process. As a starter I have written following script, but it 
does not work, says line 10 command not found.


cd $HOME

for  fin  `find . -type f`;  do
   if  [`lsof -n $f`];  then

        echo $f


Thanks !

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ubuntu-users mailing list