LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   creation and modification date problem... (https://www.linuxquestions.org/questions/linux-server-73/creation-and-modification-date-problem-750522/)

satti_bb 08-26-2009 10:36 PM

creation and modification date problem...
 
hi friends,

we are using a ftp server. Based on the creation date past 4 days (means i.e today is 27th including this 26,25,24,23 dates) data will be there and rest of all the files and folder have to delete.For this i am using this

find /path -mtime +4 -exec rm -rf {} \;

its working (folders are not deleting), but the problem is with the modification date. i have shared this with samba.
after executing this all the folders date is changed to todays date (execute date). another issue is when accessing the samba share in win xp pc the creation date is not appears.
finding with the modification date is very difficult . files in folders are deleting but folders are not deleting. empty folders are residing there only. what can i do for young 4 days date is not changed and deleting this folders.

plz guide me with suitable script.

satish.

chrism01 08-27-2009 12:22 AM

You do know Unix doesn't have a 'creation time'
Quote:

Three fields in the inode structure contain the last access, change, and modification times: atime, ctime, and mtime. The atime field is updated each time the pointer to the file's data blocks is followed and the file's data is read. The mtime field is updated each time the file's data changes. The ctime field is updated each time the file's inode changes. The ctime is not creation time; there is no way under standard Unix to find a file's creation time.


All times are GMT -5. The time now is 08:47 PM.