Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Move to New Timestamp Folder

$
0
0
Hi All,

I have a cron job that has worked wonders:

Code:

zip /home/myHostedFolder/public_html/images/_backups/front/$(date +\%Y\%m\%d).zip /home/myHostedFolder/public_html/images/front/* && rm /home/myHostedFolder/public_html/images/front/*
But now work, needs me to modify it. Should be easy but it's been a while. :)

Instead of zipping everything in a timestamped zip file in a backup folder (_backups)...

Now I need to move all images in:
/home/myHostedFolder/public_html/images/front/*

into a newly created time stamped folder within the same directory:
/home/myHostedFolder/public_html/images/front/newTimeStampedFolder

The idea is to move everything into dated folder for easy viewing over the web.

Thanks

Viewing all articles
Browse latest Browse all 16232

Trending Articles