Regarding Shell scripting
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2023 06:35 PM
How to backup files using shell scripting for every 5 minutes on ubuntu
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2023 07:58 PM
Hi @Shyamala
1.Create one file and add below line of code in that file
sourceFile="give/here/sourceFile path"
targetFolder="give/here/targetFolder pathe"
cp -r $sourceFile/* $targetFolder/
2.Make that file executable
chmod +x fileName.sh
3.Use crontab to schedule the job
crontab -e
Write the below line in cron job
*/5 * * * * /Path/of/fileName.sh
Vishal Birajdar
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2023 08:40 PM
Thanks for your reply!!..
It is not working for me.