GNU Core Utilities - Bugs: bug #26580, Feature request - cp - when using...
You are not allowed to post comments on this tracker with your current authentication level.
bug #26580: Feature request - cp - when using update also check size
Submitter: | Harm van Tilborg <zeroxcool> | ||
Submitted: | Thu 14 May 2009 07:30:03 PM UTC | ||
Category: | None | Severity: | 1 - Wish |
Item Group: | None | Status: | None |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open |
Thu 14 May 2009 09:16:20 PM UTC, comment #1: |
Bob Proulx <rwp>![]() |
Thu 14 May 2009 07:30:03 PM UTC, original submission:
Hello dear developers,
I'm using `cp -u' to copy one directory to the other, but only updated files (according to the mtime, as specified). That works fine, however, since I'm copying from one partition (say A) to another (say B), I found out that when B was 100% full, `cp' would only make empty files, but set the right file name. (Remark that I am also using the ` --preserve=mode,timestamps' options, so timestamps were successfully set).
Now I know `cp' is not a true backup tool, but would is not be handy to also check for the file size, so that when a file size from A is different from B, a copy is done either way?
This makes it - after freeing some space on B - easy to `restore' all files with a regular `cp -u' run.
Maybe there are counter arguments against this method of checking inconsistencies, let me know.
Kind regards,
|
Harm van Tilborg <zeroxcool> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
The functionality that you ask for is already available in rsync. The rsync tool seems to be the perfect fit for the task that you are requesting. Please give rsync a try.
Try:
rsync -av path1/from path2/