Skip to content

Instantly share code, notes, and snippets.

@avkosme
Last active January 30, 2023 18:16
Show Gist options
  • Select an option

  • Save avkosme/5f4a3cad33746dc79d3c70f2f0da4a11 to your computer and use it in GitHub Desktop.

Select an option

Save avkosme/5f4a3cad33746dc79d3c70f2f0da4a11 to your computer and use it in GitHub Desktop.

Revisions

  1. avkosme revised this gist Jan 30, 2023. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion search_count
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,7 @@
    find . -type f -name '*.log' -printf x | wc -c

    # Non-recursive search
    find . -maxdepth 1 -type f -name '*.log' -printf x | wc -c
    find . -maxdepth 1 -type f -name '*.log' -printf x | wc -c

    # Delete by .ext
    find /path/ -maxdepth 3 -type f -name "*.xlsx" -delete
  2. avkosme created this gist Jan 13, 2023.
    5 changes: 5 additions & 0 deletions search_count
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # Recursive search
    find . -type f -name '*.log' -printf x | wc -c

    # Non-recursive search
    find . -maxdepth 1 -type f -name '*.log' -printf x | wc -c