[ILUG-BOM] File Deletion

neelam neel_linux@[EMAIL-PROTECTED]
Sat Jan 20 15:15:26 IST 2007

  I want to delete files older than a particular date or older than a particular no of days.
  the command i used for this is on a usual linux machine was-
  find /dir -type f -mtime +7 | xargs rm -f 
  ( also i used a combination of "touch" and "find" which too worked fine)
  now my problem is i have to perform the same task only in C (without using shell script ) as the device for which i m writing this module has its own small linux kernel and hence doesnt support many commnads like "find" , "more" ,"mv" etc ..........
  i am aware of the remove() function in C but how do i get the date a file was last modified 
  and then delete it ???
  Any solution / suggestions will b of great help to me ...........
  thnx ..........

Everyone is raving about the all-new Yahoo! Mail beta.

More information about the Linuxers mailing list