Shell Script to delete files

Nils Kassube kassube at gmx.net
Sat Apr 20 11:06:08 UTC 2013


Joe Nyland wrote:
> On 20 Apr 2013, at 10:31, Nils Kassube <kassube at gmx.net> wrote:
> > Akash Jain wrote:
> >> 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.
> >> 
> >> HOME=~/var
> >> 
> >> cd $HOME
> >> 
> >> for  f in  `find . -type f`;  do

That's strange - when I quoted that line, it was "fin" not "f in". Did 
you manually insert that extra space? After all it wasn't present in the 
text version of the original mail.


Nils





More information about the ubuntu-users mailing list