Skip to content

Instantly share code, notes, and snippets.

@4sskick
Last active August 18, 2025 06:28
Show Gist options
  • Save 4sskick/800eb85644017497c51ac341973c3c95 to your computer and use it in GitHub Desktop.
Save 4sskick/800eb85644017497c51ac341973c3c95 to your computer and use it in GitHub Desktop.
listing `unwanted` file with suffix name on path then delete

I just download the project folder from website, but it the filename being duplicate which like main.ts and main.ts.Identifier. So instead of delete one-by-one, I just listing all the file then delete directly.

  • save in sh extension

#!/bin/bash dir=${1:-.} find "dir" -type f -name "*.Identifier" -exec rm -f {} ;

  • done finish, run with command sh <filename>.sh /path/of/project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment