Skip to content

Instantly share code, notes, and snippets.

@sankars
Created April 11, 2014 15:50
Show Gist options
  • Select an option

  • Save sankars/10479415 to your computer and use it in GitHub Desktop.

Select an option

Save sankars/10479415 to your computer and use it in GitHub Desktop.
## only print filename instead of full path
find /dir1 -type f -printf "%f\n"
find /dir1 -type f -exec basename {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment