Welcome to WebmasterWorld Guest from 54.196.147.57

Forum Moderators: bakedjake

Message Too Old, No Replies

Command to touch all files in home directory

     

bresso

7:51 am on Mar 6, 2007 (gmt 0)

10+ Year Member



Hello,

I'm trying to update the creation date of all files within a directory, and set the command in a cronjob.

I tried:
touch /public_html/* but it's not working.

Can you guys please help me and let me know what exactly I need to use for this command to work, and so when set in a cronjob.

Which one would I need to use to only update the creation date of .shtml files?

I hope this makes sense... I feel bad being stuck with such a simple thing. Thank you!

phranque

11:38 am on Mar 6, 2007 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



that looks like correct syntax and should work.

most likely you have a file owner/permission problem.
the cron job probably does not have write access to the /public_html directory.

bresso

6:47 pm on Mar 6, 2007 (gmt 0)

10+ Year Member



Would there be another way to do it?

phranque

2:18 am on Mar 7, 2007 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I tried:
touch /public_html/* but it's not working.

what does it do?
did you record the error message?
what is the user and group of the cron process vs the group and owner of the directory and files?
what are the permissions on the directory and files?

you can't do it without owning a piece of it or getting permission...

 

Featured Threads

Hot Threads This Week

Hot Threads This Month