Hi
I'm trying to touch a number of files. I thought that it would be time-saving to put all the touch commands into a script and execute the script from the command line.
This is what I did (as a test) --
- I created a small list of commands and put the commands into a text file
- I set the chmod for the files that I want to touch to 777 and the chmod for the bash script to 755
I know that each individual command in the script is OK because if I copy and paste them directly into the command line they run fine and the timestamps of the files are changes.
However, when I run the script, it seems to run OK (ie there are no error messages) but the files remain unchanged.
Here's the content of my test script:
touch -c -t 200402032227.47 "./var/www/vhosts/mydomain.com/mydir/testFolder/test.txt"
touch -c -t 200302032227.47 "./var/www/vhosts/mydomain.com/mydir/testFolder/test2.txt"
If anyone can see / point the way to where I'm going wrong that would be really great.
Thanks for your attention.
Viola