Skip to content

Instantly share code, notes, and snippets.

@chipitsine
Created December 18, 2015 13:25
Show Gist options
  • Save chipitsine/9bac5ae8d496461423fd to your computer and use it in GitHub Desktop.
Save chipitsine/9bac5ae8d496461423fd to your computer and use it in GitHub Desktop.
перемещаем файлы в архив
#!/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