Ask HN: Why doesn't cp have a flag to replace directories (like Finder)?

2 pointsposted a year ago
by amichail

Item id: 41778534

1 Comments

gregjor

a year ago

The Unix philosophy dictates that tools do one thing in a standard way. You accomplish more complicated tasks by combining tools rather than adding features to a tool, which makes it more complicated.

You can diff two directories to find files in one but not in the other, and from there rm the missing files. Or use rsync.