Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 08-26-2009, 11:36 PM   #1
LQ Newbie
Registered: Sep 2007
Posts: 1

Rep: Reputation: 0
Question 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.


Last edited by satti_bb; 08-26-2009 at 11:37 PM.
Old 08-27-2009, 01:22 AM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,685

Rep: Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492
You do know Unix doesn't have a 'creation time'
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
images creation date newer than last modified date fenrisW0lf Linux - Newbie 3 07-28-2009 06:04 PM
Tar: Preserve file creation/modification date Sum1 Linux - Software 2 05-15-2009 04:50 PM
php read file creation, modified date problem antony_csf Programming 3 08-18-2004 07:46 AM
New Samba date modification problem mdkelly069 Linux - Networking 14 01-12-2004 12:42 PM
Help with Samba and date modification mdkelly069 Linux - Networking 6 11-28-2003 07:26 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:19 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration