Skip to content

Instantly share code, notes, and snippets.

@afbio
Last active March 2, 2018 21:27
Show Gist options
  • Save afbio/d43125ff86a4e0283941d191a6ade809 to your computer and use it in GitHub Desktop.
Save afbio/d43125ff86a4e0283941d191a6ade809 to your computer and use it in GitHub Desktop.
Listing and filtering files in a directory using find command
#listar arquivos:
find . -type f
#listar diferentes do padrão:
find . -type f -not -name "*cteproc.xml"
#Contar colocando na frente um:
find . -type f | wc -l
find . -type f -not -name "*cteproc.xml" | wc -l
#excluir os diferentes do padrão:
find . -type f -not -name "*cteproc.xml" -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment