8 ms·
> I didn't find an easy "move and overwrite recursively" command in Linux. You don't need recursiveness into commands, just use find (maybe with xargs) to gene
by 4ad 12y ago
> I didn't find an easy "move and overwrite recursively" command in Linux.
You don't need recursiveness into commands, just use find (maybe with xargs) to generate the list of files to overwrite (or commands to execute).
- AceJohnny2 12y agoThat's what I did in my first iteration, except find is hell. No wait, I mean find is a really powerful and sophisticated tool, but it takes time and effort to get it to do precisely what you want. It turned out rsync did what I wanted more easily.
- 4ad 12y agoFind has an atrocious syntax. Nowadays, I seldom use any other feature of find rather than just enumerating files. Rather, I enumerate files, create commands on them (with things like xargs and sed), and pipe the output into sh. Generating code is a very flexible technique, and it's actually easier (and safer) that trying to muck with find options.