LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-20-2004, 04:30 PM   #1
t3___
Member
 
Registered: Sep 2003
Posts: 240

Rep: Reputation: 30
VSFTPD and file timestamps


here is my dilemma...

I would like to have VSFTPD changed the timestamp on files that are uploaded to our FTP server so that I can script the files to automatically be deleted after 48 hours (FTP server will be for quick get/put operations, not long term storage). Unfortunately, when files are uploaded, they are maintaining their original creation/modified date. Any way to do this with a switch in VSFTPD, or a script on the FTP folder?

any help would be greatly appreciated - my searches have been fruitless..

Tom
 
Old 01-20-2004, 08:12 PM   #2
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
I don't know about using vsftpd directly but I guess you could uses touch to modify the timestamp of each file, keeping a note of the current directories contents and periodically "touching" new files as they come in and every two days using find to pick out files that have been modified in the directory >= 2 days ago. Just a thought.
 
Old 01-21-2004, 02:22 AM   #3
t3___
Member
 
Registered: Sep 2003
Posts: 240

Original Poster
Rep: Reputation: 30
Thanks much for the reply.

seems good enuf... the solution doesnt have to be absolutely perfect or fancy...

any other ideas anyone?
 
Old 01-21-2004, 01:58 PM   #4
t3___
Member
 
Registered: Sep 2003
Posts: 240

Original Poster
Rep: Reputation: 30
with regard to using the TOUCH utility...

***how would I instruct TOUCH to only modify files that it had not "touched" previously?*** I think it may be the switch "-c", but the man pages indicated that this will skip files that TOUCH previously created... not modified...

here is the plan I came up with (using cron):

-every day at 11:58 pm, cron TOUCH to datestamp any files it has not previously modified with the current date and time.

-every day at 11:59 pm, cron the command "find <startdir> -ctime 48 -exec rm -f {} \" to delete files older than 48 hours.

any help would be greatly appreciated!

Tom

Last edited by t3___; 01-21-2004 at 01:59 PM.
 
Old 01-21-2004, 03:26 PM   #5
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
I guess you could have a file containg a directory listing taken at time A and compare it against a file containing the current directory listing taken at time B and use directly/send the output to another file which should contain the differences. If and buts start coming in though to complicate matters such as can the users delete the file themselves inbetween runs? The principle is there though to work around though and maybe some one will jump in with a one line does it all answer

comm -3 timeA timeB > differencesInListings
 
  


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
archives, file timestamps and touch digitalgravy Linux - General 6 02-08-2006 08:47 PM
vsftpd log timestamps issue ilikejam Linux - Software 2 05-29-2005 12:53 PM
no file access timestamps being updated! takahaya Linux - General 4 04-03-2005 07:48 PM
converting log file timestamps mrtwice Linux - Software 3 09-22-2003 10:45 AM
modify file access & modify timestamps i2itstud Linux - General 1 05-20-2003 04:34 AM


All times are GMT -5. The time now is 06:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration