My shell script find all files 90 days older
find /var/www/html/zip/data/*/*/*/*/* -type f -mtime +90
that returns the output like
/var/www/html/zip/data/2011/jan/11/333333/Photos/a.jpeg
/var/www/html/zip/data/2011/jan/11/333333/Photos/b.jpeg
/var/www/html/zip/data/2011/jan/11/333333/Photos/c.jpeg
/var/www/html/zip/data/2011/feb/11/333333/Photos/a.jpeg
/var/www/html/zip/data/2011/feb/11/333333/Photos/b.jpeg
What would i need to do to just fetch unique folder path from the above output using the same Find command so the output should be
/var/www/html/zip/data/2011/jan/11/333333/Photos
/var/www/html/zip/data/2011/feb/11/333333/Photos
So i believe there would need to append something in the above Find command but don’t know what
Note: I would like to save the unique path in a variable
Try