Skip to content

Instantly share code, notes, and snippets.

@gnawux
Created January 28, 2020 09:45
Show Gist options
  • Save gnawux/1ed8b644cf93a291575ae1a18759f3d2 to your computer and use it in GitHub Desktop.
Save gnawux/1ed8b644cf93a291575ae1a18759f3d2 to your computer and use it in GitHub Desktop.
command line for sync mtime across hosts
find backup/ -type f |while read fname; do echo touch -c -t $(date --date=@$(stat -c %Y "${fname}") +%Y%m%d%H%M.%S) \"/volume2/share/${fname}\" ; done |ssh 192.168.7.127 bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment