Skip to content

Instantly share code, notes, and snippets.

@gvd
Created January 5, 2018 21:09
Show Gist options
  • Select an option

  • Save gvd/4eda53bfd86117162e9be0e943d44e8e to your computer and use it in GitHub Desktop.

Select an option

Save gvd/4eda53bfd86117162e9be0e943d44e8e to your computer and use it in GitHub Desktop.
Move a file to another directory once it is closed
inotifywait -e close_write input_dir/ --format %w%f | xargs -I {} mv {} output_dir/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment