Created
December 18, 2015 13:25
-
-
Save chipitsine/9bac5ae8d496461423fd to your computer and use it in GitHub Desktop.
перемещаем файлы в архив
This file contains 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
#!/bin/bash | |
if [ ! -f "$1" ]; then | |
echo "Usage $0 file.txt" | |
exit 1; | |
fi | |
now=$(date +"%m_%d_%Y") | |
find /var/spool/asterisk/monitor -type f -print | grep -f $1 | tar cfz ${now}.tgz --remove-files -T - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment