Skip to content

Instantly share code, notes, and snippets.

@johnniehard
Last active April 5, 2023 07:20
Show Gist options
  • Save johnniehard/e6343b2319ab125170f677914bc1145e to your computer and use it in GitHub Desktop.
Save johnniehard/e6343b2319ab125170f677914bc1145e to your computer and use it in GitHub Desktop.
Create a text file with the absolute path to all files of type in a directory.
#!/bin/bash
find $1 -name "*.$2" -print0 | xargs -0 ls >> files.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment