I’d like to share some functions for file operations in the background.
Smart move file and dirs:
- use git mv in a git repo, works well with git (and git-annex)
- use rsync for non git controlled files
- does not break relative symlinks
Smart copy file and dirs:
- use hardlink for files on the same file system
- use rsync for files on different file systems
- does not break relative symlinks
Here is the link: