Skip to content

Instantly share code, notes, and snippets.

@kickbutts
Created March 8, 2015 10:05
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 kickbutts/980a8ebf79d40df94f90 to your computer and use it in GitHub Desktop.
Save kickbutts/980a8ebf79d40df94f90 to your computer and use it in GitHub Desktop.
Verzeichnis auf USB Stick kopieren
#!/bin/bash
# Die Skript übernimmt als Paratmeter einen Quellpfad und einen Zielpfad (USB-Stick). Der Inhalt des USB-Sticks wird
# gelöscht, die Dateien von der Quelle auf den USB-Stick kopiert und der USB-Stick wird ausgeworfen.
rm -R $2
# rsync -r -v -P -n $1 $2 # Testlauf ohne kopieren
rsync -r -v -P $1 $2
echo "Alle Dateien kopiert!"
diff_output= diff -s $1 $2
echo $diff_output
umount $2
echo "Stick ausgeworfen"
play -n synth 0.1 sin 1000 vol -12 db 2> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment