We help IT Professionals succeed at work.
Get Started

help pulling data string using Awk

atorex asked
Last Modified: 2016-09-13
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.
Watch Question
Most Valuable Expert 2013
Top Expert 2013
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE