Do autozip schedul
In a /home subfolder there are some files shared with samba. I want to do a zip of these files and copy the new zip file in other /home folder location, same machine.
I'm sure this is easy job for scripts, but I dont know how to do it. Plz help me. |
Yes. It's an easy task for a cron job, but you have to give more details. For example, do you want to zip (or gzip) all the files in that directory or do you need to select some of them based on some criteria (file name, last modification time and so on)? What have you tried so far?
When you have written the script, make it executable and edit the crontab to schedule the job at some specific time of the day or at some day of the month or at some day of the week. Look at Code:
man 5 crontab |
LinuxCommand.org provides an excellent beginner-level introduction to shell scripting. A few hours with it should give you the basic techniques you need to create a script like this. Give it a try and we'll help you through the rough spots. :)
After you get the script working, we can worry about setting up the cronjob, as colucix mentioned. |
All files on /home/luis/ must be zipped into a zipfile.
I want to do in Linux something like this example for PkZip for DOS pkzip25 -add /home/backup/auto.zip *.* And then save the commando like a job cron. Must be zip format because another user called "backup" will load the zip file across samba shares with Windows. |
Now is working fine
zip -r /home/backup/auto.zip /home/luis/* Usign Kalarm to programing task. |
All times are GMT -5. The time now is 09:34 PM. |