LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-15-2006, 12:37 AM   #1
madtinkerer
LQ Newbie
 
Registered: Sep 2006
Posts: 22

Rep: Reputation: 15
Changing file attributes automatically on update to a server


Hi,

I'm working using the find command with -mtime to keep track of files added to my server remotely. I will set it to scan for files daily. The problem is that using the -mtime command, if the files were created weeks ago but only uploaded yesterday, they will not be detected by a -mtime 1 command. Is there any way I can automatically change the modification date on incoming files to the current date and time?

Thanks
 
Old 11-15-2006, 06:23 AM   #2
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 417

Rep: Reputation: 31
What method are you using to upload the files?
 
Old 11-15-2006, 11:59 PM   #3
madtinkerer
LQ Newbie
 
Registered: Sep 2006
Posts: 22

Original Poster
Rep: Reputation: 15
I have the users using winscp so they should be uploaded using the scp command or perhaps sftp depending on how I set up the users. I honestly can't remember. I will fnid out and post a reply.
 
Old 11-16-2006, 06:13 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,269

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
You might want to try using -ctime 'updated each time the file's inode changes', which would happen when uploaded (I believe).
 
  


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
Changing .jpg file attributes Rick069 Linux - General 2 10-22-2006 04:33 PM
Checking and changing DOS attributes on a samba mounted share nkendrick Linux - Software 1 08-24-2006 07:47 PM
Changing File Attributes terdbird Slackware 6 04-23-2005 03:39 AM
Changing file permissions and attributes lectraplayer Linux - Newbie 2 06-22-2003 09:10 PM
Changing file attributes from C sourceman Linux - General 3 04-23-2002 07:37 PM


All times are GMT -5. The time now is 07:45 PM.

Main Menu
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