troubleshooting Question

help pulling data string using Awk

Avatar of atorex
atorex asked on
Scripting LanguagesUnix OSLinux
9 Comments1 Solution243 ViewsLast Modified:
I'm working on a script to locate newly changed files and send out an email, I need help pulling just the file name from the resulting find command.

my find command is-
find /mnt/ABC_POOL/ABC_BUILD/ -type f -name .zip -prune -o -mmin -5 -type f -print
the result from the above would be something like this

I would like to use just the zip file name as my final result by using awk or sed to remove the path and leave just the file name, keeping in mind that the full path is not always the same.
I'm hoping there is a way to remove everything from start of string leaving the last part after the last / that would be the file name.

Any idea what would be the best way, I attempted awk -F"\t" but did not work.
Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros