homepage Welcome to WebmasterWorld Guest from 54.197.183.230
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Command to touch all files in home directory
bresso

10+ Year Member



 
Msg#: 3272302 posted 7:51 am on Mar 6, 2007 (gmt 0)

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

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



 
Msg#: 3272302 posted 11:38 am on Mar 6, 2007 (gmt 0)

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

10+ Year Member



 
Msg#: 3272302 posted 6:47 pm on Mar 6, 2007 (gmt 0)

Would there be another way to do it?

phranque

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



 
Msg#: 3272302 posted 2:18 am on Mar 7, 2007 (gmt 0)

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...

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved