Skip to content

Instantly share code, notes, and snippets.

@zeszyt
Created November 10, 2011 07:32
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 zeszyt/1354354 to your computer and use it in GitHub Desktop.
Save zeszyt/1354354 to your computer and use it in GitHub Desktop.
Archiwizacja podkatalogów
#!/bin/ksh
for i in $(ls -A)
do
if [ -d "$i" ];
then
echo "Przetwarzam: $i"
tar -czf "$i.tgz" "$i"
echo " Usuwam: $i"
rm -rf "$i"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment