Skip to content

Instantly share code, notes, and snippets.

@junquera
Created May 14, 2016 16:38
Show Gist options
  • Select an option

  • Save junquera/4977cd7e0242285f054f7f8b12350452 to your computer and use it in GitHub Desktop.

Select an option

Save junquera/4977cd7e0242285f054f7f8b12350452 to your computer and use it in GitHub Desktop.
inotifywait -m -e modify -e create --format '%w%f' . | while read file; do (cp "$file" ./tmp/"$file$(date +%T)$counter.bk") done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment