Skip to content

Instantly share code, notes, and snippets.

@kanedo
Created July 18, 2012 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kanedo/3136444 to your computer and use it in GitHub Desktop.
Save kanedo/3136444 to your computer and use it in GitHub Desktop.
Fileextension finder
#!/bin/bash
# For each file with the given extension in the current directory...
echo "Pfad;Datei;Groesse (in Byte)";
if [[ "x$1" == "x" ]]
then
echo "no path given - exiting" >&2
exit 1;
fi
find $1 -not -path */dev/* -type f -execdir bash -c 'echo -en "$PWD;$(basename {});$(stat -f %z {})\n"' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment