This is example path of my application
/var/www/html/folder1/folder2/folder3/
I need to fetch all 90 days older files of “folder3” and save them as a zip file named “folder2” using a shell script. I tried writing some piece of code in shell script:-
filaname = awk -F/ '{print $(NF-1)}' <<< "/var/www/html/folder1/folder2/folder3/"
#above command retuns folder2
zip filaname find /var/www/html/folder1/folder2/folder3/* -ctime -90
i was trying to send output of find command to zip command but it did not work.
Can someone please suggest how can i achieve this.
Or try this: