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, 10: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 10:37 PM.
 
Old 08-27-2009, 12:22 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,342

Rep: Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746
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
Tar: Preserve file creation/modification date Sum1 Linux - Software 4 10-02-2022 12:13 PM
images creation date newer than last modified date fenrisW0lf Linux - Newbie 3 07-28-2009 05:04 PM
php read file creation, modified date problem antony_csf Programming 3 08-18-2004 06:46 AM
New Samba date modification problem mdkelly069 Linux - Networking 14 01-12-2004 11:42 AM
Help with Samba and date modification mdkelly069 Linux - Networking 6 11-28-2003 06:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:43 PM.

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
Open Source Consulting | Domain Registration