Skip to content

Instantly share code, notes, and snippets.

@thorsteneckel
Last active August 29, 2015 14:10
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 thorsteneckel/eb7be02d8515c0411c28 to your computer and use it in GitHub Desktop.
Save thorsteneckel/eb7be02d8515c0411c28 to your computer and use it in GitHub Desktop.
Find statement to get list of files for OTRS SOPM Filelist
# Explanation:
#
# find
# -name .git -prune -o = skip everything with .git in the name
# -type d -o = skip folders
# -name .DS_Store -prune -o = skip Mac OS X .DS_Store files
# -name "*.sopm" -prune -o = skip SOPM file itself
# -print
#
# sed
# -e "s/^\.\///" = remove the ./ prefix so we can easy work with it
find . -name .git -prune -o -type d -o -name .DS_Store -prune -o -name "*.sopm" -prune -o -print | sed -e "s/^\.\///"
# The result list can be manipulated with e.g. SublimeText multi line edit:
# Prefix = <File Location="
# Suffix = Permission="***"/> (use correct permissions, e.g. 644 for perl modules or 755 for executables)
@martini
Copy link

martini commented Dec 9, 2014

++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment