Advanced Shell Scripting Tutorial | Delete More Than X Days Directories | Tech ArkIT
Advanced Shell Scripting Tutorial - Scenario: Everyday from Monday to Friday one directory will be created under /fullbackup/dailybackup/YYYY-MM-DD and it will move backup to its parent directory everyday midnight /fullbackup/archive/, However Saturday, Sunday and Monday directories will move to /fullbackup/archive path every Monday evening.
Directory Names Example: 2018-12-24 2018-12-25 2018-12-26 2018-12-27 2018-12-28
Question: I would like to delete directories older than two days from /fullbackup/archive path. How do you do it using any scripting methods.
Problem Statement: I was trying to use
find /path/ -type d -mtime +2 -print0 | xargs -r0 rm -- .
This command does not work as expected due to directory modified date for SAT, SUN and MON are Mondays date.
How Do you solve it.?? Write Shell Script or Any other script to accomplish this task.Should run through Crontab and clear directories older than two days.
https://www.modicare.com/becomeConsultant.aspx?kk07jit=c54083f23d7b6cd449024ab4dbcd9e34
Scripts: https://github.com/techarkit/shell-scripting-tutorial
http://bit.ly/AIMLEdgree Artificial intelligent 90% Discount
http://bit.ly/MLAIEdgree Machine Learning 85% Discount
http://bit.ly/FullStackEDgree 95% Discount Using this Link
http://bit.ly/devopsedgree 80% Discount using this Link
http://bit.ly/DataScienceEDgree 90% Discount using this Link
RHEL5AND6: https://ark-library.blogspot.com/p/index.html
Follow Us on Social Media
WhatsApp Group: https://github.com/techarkit/TechArkit-YouTube/blob/master/whatsapp_group.md
Join Telegram Group: http://t.me/linuxarkit 3000 Members Joined
Github: https://github.com/techarkit/
Facebook: https://www.facebook.com/linuxarkit
Twitter: https://twitter.com/aravikumar48
Instagram: https://www.instagram.com/arkit.co.in/
Website: https://arkit.co.in
Reddit: https://www.reddit.com/r/techtutorial/
Email: aravikumar48[at]gmail.com
Post your topic, we will make videos for you
https://forms.gle/M4ysoMNh1zsPXiw89
#Techarkit #shell #scripting
Видео Advanced Shell Scripting Tutorial | Delete More Than X Days Directories | Tech ArkIT канала Tech Arkit
Directory Names Example: 2018-12-24 2018-12-25 2018-12-26 2018-12-27 2018-12-28
Question: I would like to delete directories older than two days from /fullbackup/archive path. How do you do it using any scripting methods.
Problem Statement: I was trying to use
find /path/ -type d -mtime +2 -print0 | xargs -r0 rm -- .
This command does not work as expected due to directory modified date for SAT, SUN and MON are Mondays date.
How Do you solve it.?? Write Shell Script or Any other script to accomplish this task.Should run through Crontab and clear directories older than two days.
https://www.modicare.com/becomeConsultant.aspx?kk07jit=c54083f23d7b6cd449024ab4dbcd9e34
Scripts: https://github.com/techarkit/shell-scripting-tutorial
http://bit.ly/AIMLEdgree Artificial intelligent 90% Discount
http://bit.ly/MLAIEdgree Machine Learning 85% Discount
http://bit.ly/FullStackEDgree 95% Discount Using this Link
http://bit.ly/devopsedgree 80% Discount using this Link
http://bit.ly/DataScienceEDgree 90% Discount using this Link
RHEL5AND6: https://ark-library.blogspot.com/p/index.html
Follow Us on Social Media
WhatsApp Group: https://github.com/techarkit/TechArkit-YouTube/blob/master/whatsapp_group.md
Join Telegram Group: http://t.me/linuxarkit 3000 Members Joined
Github: https://github.com/techarkit/
Facebook: https://www.facebook.com/linuxarkit
Twitter: https://twitter.com/aravikumar48
Instagram: https://www.instagram.com/arkit.co.in/
Website: https://arkit.co.in
Reddit: https://www.reddit.com/r/techtutorial/
Email: aravikumar48[at]gmail.com
Post your topic, we will make videos for you
https://forms.gle/M4ysoMNh1zsPXiw89
#Techarkit #shell #scripting
Видео Advanced Shell Scripting Tutorial | Delete More Than X Days Directories | Tech ArkIT канала Tech Arkit
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
CPU, Memory, Disk Utilization Report from Multiple Servers Shell Script - Tech ArkitTop 10 Scenario-Based Linux Interview Questions and Answers with Practical - Real TimeUnix Shell Scripting for beginners | Delete files older than a monthLinux SHELL Scripting Tutorial | Linux Shell Hindi | Linux Shell in One Video | 2022Shell Scripting Crash Course - Beginner LevelShell Scripting Tutorial | Shell Scripting Crash Course | Linux Certification Training | EdurekaWrite Your Own Bash Scripts for Automation [Tutorial]Making Real Time CPU Utilization Monitoring Script - Tech Arkit17 Linux Interview Questions and Answers | Tech ArkitGitHub Actions Tutorial | From Zero to Hero in 90 minutes (Environments, Secrets, Runners, etc)how to automatically delete/remove files older than x days in linux - crontab/cronjob-easy tutorialShell Scripting Interview Questions & Answers | Linux Admin Certification Training | EdurekaDockerfile Tutorial with Example | Creating your First Dockerfile | Docker Traininglinux cleanup files older than x daysJava collections framework interview questions | [MOST ASKED COLLECTIONS INTERVIEW QUESTION]TAR | How to Compress Files in Linux | RHCSA Certification #23 | Tech Arkit | EX200Complete Shell Scripting Tutorials | Shell Script to Send Email Alert When Memory Gets LowSOC Analyst (Cybersecurity) Interview Questions and Answers - Computer NetworkingTop 11 Linux interview Questions and Answers | Tech Arkit