Scan /var/log directory 6 hours and list out all files in their respective name category like messages, secure, maillog, cron, spooler etc. for example: cron cron.20220707 cron.20220706

scan /var/log directory 6 hours and list out all files in their respective name category like messages, secure, maillog, cron, spooler etc. for example:
cron
cron.20220707
cron.20220706

please help me to solve this i didnt understood the problem statement

So is this coursework?

You didn't understand what problem statement?

as per @hicksd8 , ... can you show the actual assignment question/text please, I think we might derive what is being requested , but if you have the assignment in detail then posting that helps eliminate misinterpretation and clarifies understanding.

thanks

I think you should cut off after and including the extension separator (like . or -), then print the unique leftovers.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.