LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 08-26-2009, 11:36 PM   #1
satti_bb
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.

satish.

Last edited by satti_bb; 08-26-2009 at 11:37 PM.
 
Old 08-27-2009, 01:22 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

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


Reply


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


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

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