Skip to content

Instantly share code, notes, and snippets.

@freyes
Created August 17, 2015 14:12
Show Gist options
  • Select an option

  • Save freyes/e6c40c294cb472197910 to your computer and use it in GitHub Desktop.

Select an option

Save freyes/e6c40c294cb472197910 to your computer and use it in GitHub Desktop.
Find extracted sosreport and remove them
#!/bin/bash -e
#
# Find extracted sosreport and remove them
#
for i in $(find . -name 'sosreport-*' -type d); do
test -f "${i}.tar.xz" && echo -n "Removing ${i}..." && sudo rm -rf "${i}" && echo "done"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment