View previous topic :: View next topic |
Author |
Message |
madtinkerer Tux's lil' helper
Joined: 14 Nov 2002 Posts: 122 Location: London Ontario Canada
|
Posted: Thu Nov 16, 2006 3:09 am Post subject: Touching all files uploaded to a server |
|
|
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 |
|
|
sugar Guru
Joined: 07 Aug 2004 Posts: 579 Location: Morrinsville, New Zealand
|
Posted: Thu Nov 16, 2006 3:58 am Post subject: |
|
|
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 |
|
|
madtinkerer Tux's lil' helper
Joined: 14 Nov 2002 Posts: 122 Location: London Ontario Canada
|
Posted: Thu Nov 16, 2006 5:57 am Post subject: |
|
|
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 |
|
|
sugar Guru
Joined: 07 Aug 2004 Posts: 579 Location: Morrinsville, New Zealand
|
|
Back to top |
|
|
madtinkerer Tux's lil' helper
Joined: 14 Nov 2002 Posts: 122 Location: London Ontario Canada
|
Posted: Thu Nov 16, 2006 7:56 am Post subject: |
|
|
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 |
|
|
sugar Guru
Joined: 07 Aug 2004 Posts: 579 Location: Morrinsville, New Zealand
|
Posted: Fri Nov 17, 2006 3:58 am Post subject: |
|
|
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 |
|
|
|