find: remove directories from output

Categories: BSD, Linux

To remove the full path to your find results add: -exec basename {} \; to your search: bash-4.1$ find . -type f -name “*.pdf” -exec basename {} \; FreeBSD_Portability_With_VMware_BSD_04_2011.pdf Network_Security_Hakin9_02_2011.pdf

Find and exec

Categories: Linux

An example: find . -name “*.zip” -type f -exec unzip {} \;