Article 4T637 Script for moving&creating folders by month

Script for moving&creating folders by month

by
hatfani
from LinuxQuestions.org on (#4T637)
I have 2 servers (centos 7). server 6 and server 1. In server 1 I have new directories created every month by the name of the month:

Name_sep2019
NameT_sep2019
Name_oct2019
NameT_oct2019

I want to move from server 1 ,every 2 months, the folders that were created 2 month before.
For example: when November comes, I'd like September folders to be moved to server 6.
I'd like also to create every 2 month a directory in server 6 arranged by month, so that the above folders will move inside.

For example: create by the beginning of November a "September" directory so that 'Name_sep2019' & 'NameT_sep2019' will move inside.

I do know that I need to use rsync command for the moving itself, but as for the other conditions - I don't know nothing.

Any help will be very much appreciated, Thank you!latest?d=yIl2AUoC8zA latest?i=40J_nYMXcOc:_4rsn0b-d6M:F7zBnMy latest?i=40J_nYMXcOc:_4rsn0b-d6M:V_sGLiP latest?d=qj6IDK7rITs latest?i=40J_nYMXcOc:_4rsn0b-d6M:gIN9vFw40J_nYMXcOc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments