Skip to content

Instantly share code, notes, and snippets.

@r-plus
Created March 27, 2013 10:00
Show Gist options
  • Select an option

  • Save r-plus/5253125 to your computer and use it in GitHub Desktop.

Select an option

Save r-plus/5253125 to your computer and use it in GitHub Desktop.
カレントディレクトリ以下のgzをxzに圧縮しなおす
#!/bin/sh
FILES=$(find $(pwd) -name "*.gz" -and ! -name "*.tar.gz")
for FILE in $FILES; do
(gunzip -c $FILE | xz > ${FILE%.*}.xz; [ $? -eq 0 ] && rm -f $FILE) &
done
wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment