Results 1 to 6 of 6
hi all,
hw to delete old files in a diretory (ex: log dir)which is growing, based on their access times...can anyone help me with guidelines to write a C program ...
- 04-03-2007 #1Just Joined!
- Join Date
- Jan 2007
- Posts
- 23
removing old files from a directory based on their access times...
hi all,
hw to delete old files in a diretory (ex: log dir)which is growing, based on their access times...can anyone help me with guidelines to write a C program for this..
Thanks in advance..
- 04-03-2007 #2
I think a shell script would be better suited for this...
- 04-04-2007 #3
You can uses stat() system call and unlink() system call and easily do this in C.
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 04-04-2007 #4Just Joined!
- Join Date
- Jan 2007
- Posts
- 23
deleting old files based on their access time
hi lakshmipati garu,
thanx for ur suggestions.. i had applied the stat() system call and unlink system calls...
-elitecore
- 04-04-2007 #5Just Joined!
- Join Date
- Jan 2007
- Posts
- 23
deleting old files based on their access time
hi likwid,
yeah....u r right, shell script is the best solution...but i have to implement it using C.....thanx for ur reply.....
--elitecore
- 04-04-2007 #6


Reply With Quote