|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am new into linux administration, I have a php script in cron directory that generates 5 textfiles, after the files are generated, I want to create a script that will move the 5 text fiels to anoher folder name "web".
Can someone kindly help me on this? Thanks |
|
#2
|
|||
|
|||
|
write a simple shell script that moves the files and have CRON execute the shell script
a shell script can be as simple as a single command or you can string commands together... for instance you could use the following to move the files shell script: Code:
#!/bin/sh mv /home/user/files /web where "/home/user/files" is where the files are and "/web" is where you want them to go edit and save the script above...make sure its owner is the same as the CRON user and be sure that it is executable...then create a crontab to run the script whenever you want |
|
#3
|
||||
|
||||
|
Is there a particular reason your PHP script doesn't create the files in the desired location in the first place?
__________________
~ishnid; Have you tried: [ search.cpan.org | perldoc | Java API | mysql.com | google ] Apostrophes are NOT used for possessive pronouns or for noun plurals, including acronyms. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > How can I move files to another directory using a cron job? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|