Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Touching all files uploaded to a server
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
madtinkerer
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2002
Posts: 122
Location: London Ontario Canada

PostPosted: Thu Nov 16, 2006 3:09 am    Post subject: Touching all files uploaded to a server Reply with quote

Is there anyway to automatically touch files when they are uploaded to my server. It would help me immensly if all files I uploaded were listed as last modified at the time they were uploaded to the server.

Thanks
Back to top
View user's profile Send private message
sugar
Guru
Guru


Joined: 07 Aug 2004
Posts: 579
Location: Morrinsville, New Zealand

PostPosted: Thu Nov 16, 2006 3:58 am    Post subject: Reply with quote

touch /path/to/server/dir/*

I don't know about recursive touch though.

btw I'm glad a good search of 'man touch' had the man page for the touch command as the first hit. *phew*
_________________
He who calls for full employment calls for war!
Back to top
View user's profile Send private message
madtinkerer
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2002
Posts: 122
Location: London Ontario Canada

PostPosted: Thu Nov 16, 2006 5:57 am    Post subject: Reply with quote

I know how to use touch and if you bothered to read the post you would know that I was asking how to do this automatically. I'm hoping to be able to touch files that are uploaded to the server automatically, as there are many users on the server. Thanks for the help, but leave the attitude behind and buy some glasses.
Back to top
View user's profile Send private message
sugar
Guru
Guru


Joined: 07 Aug 2004
Posts: 579
Location: Morrinsville, New Zealand

PostPosted: Thu Nov 16, 2006 6:57 am    Post subject: Reply with quote

Alright alright. Calm down!

Could you not just touch the dirs in question using a cron job? If its urgent?
_________________
He who calls for full employment calls for war!
Back to top
View user's profile Send private message
madtinkerer
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2002
Posts: 122
Location: London Ontario Canada

PostPosted: Thu Nov 16, 2006 7:56 am    Post subject: Reply with quote

I'm very sorry for getting angry at you. I just had a long day and I shouldn't have let it get to me. Again, I'm sorry.

I can't really do that because files get added to the same directory every day. I want to use the find command to create links to files less than a week old. If I touch the directory every day then the files will always appear only one day old all the time. I guess I would write a script to move the old files to a new directory before running the cron job but that would be a little combersome. I'm using SFTP and SCP to transfer the files if that helps. Perhaps I should look at the client side apps for a solution.
Back to top
View user's profile Send private message
sugar
Guru
Guru


Joined: 07 Aug 2004
Posts: 579
Location: Morrinsville, New Zealand

PostPosted: Fri Nov 17, 2006 3:58 am    Post subject: Reply with quote

madtinkerer wrote:
I'm very sorry for getting angry at you. I just had a long day and I shouldn't have let it get to me. Again, I'm sorry.

I can't really do that because files get added to the same directory every day. I want to use the find command to create links to files less than a week old. If I touch the directory every day then the files will always appear only one day old all the time. I guess I would write a script to move the old files to a new directory before running the cron job but that would be a little combersome. I'm using SFTP and SCP to transfer the files if that helps. Perhaps I should look at the client side apps for a solution.


I was thinking about that before. You could make a cron job that would copy to another dir and timestamp them. Its its an ugly solution.

You could always write a script or something.

edit: Apology accepted. I'm sorry for not reading the OP more carefully!
_________________
He who calls for full employment calls for war!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum