Sign in to follow this  

Updating a directory

This topic is 4597 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a directory that I want to update with newer files from another directory. Is there a simple way of doing this from the command line. I thought that maybe copy would have a flag, but I'm not seeing this. Sorry if this is a real newbie question... L-

Share this post


Link to post
Share on other sites
If you mean that you have two directories, say dir_a and dir_b, and you want to copy the contents of dir_a into dir_b but only overwrite where the file is newer - ie. if the file is older, don't update - then you need the -u or --update option. "copy only when the SOURCE file is newer than the destination file or when the destination file is missing"

Share this post


Link to post
Share on other sites
Sign in to follow this