Last active
June 4, 2017 04:28
-
-
Save jniemann66/35b7492b974e97e3fd30c968215e7c21 to your computer and use it in GitHub Desktop.
random snippets of solutions to weird things I needed to do using 'find'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # remove all image files with dimensions in filename (eg ./Williamstown-012v-300x150.jpg) | |
| # (needed when cleaning media collection from wordpress, because it auto-generates multiple image sizes for every uploaded image) | |
| find . -regex .+[0-9]x[0-9].+ -delete | |
| # run spectrogram tool in parallel on batch of sound files. Concurrency set by numThreads | |
| spectrogram_tool="spectrogram" | |
| numThreads=4 | |
| find ./outputs -type f ! -name '*.png' ! -name '*.txt' ! -name '*.sd2' ! -name '*.raw' -print0 | xargs -i --null -n 1 -P $numThreads $spectrogram_tool --dyn-range=190 {} 1200 960 {}.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment