Want to compare delta files recursively using rsync when I have file list in left in text file and Folder at...
I have a list of files mentioned at left hand side in a text file and I have a separate folder where I have list of physical files. I have to compare the left hand's FileList.txt with Right hand's Directory files(Recursively) and copy delta part using rsync. I am using the below command but not getting any files to copy.
Below is the dry run attempt .
rsync -rvnc --include-from=/cygdrive/c/Users/SG066221/Desktop/scripts/diff_Lib_WITH_EMPLTY.txt /cygdrive/c/Users/SG066221/Desktop/scripts/FROM_LIST_2_ANOTHER/ 1>C:UsersSG066221Desktopscriptsdiff_FINAL.txt
Output is :
sending incremental file list
drwx------ 0 2018/11/12 14:26:18 .
sent 38 bytes received 64 bytes 204.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
file compare rsync
add a comment |
I have a list of files mentioned at left hand side in a text file and I have a separate folder where I have list of physical files. I have to compare the left hand's FileList.txt with Right hand's Directory files(Recursively) and copy delta part using rsync. I am using the below command but not getting any files to copy.
Below is the dry run attempt .
rsync -rvnc --include-from=/cygdrive/c/Users/SG066221/Desktop/scripts/diff_Lib_WITH_EMPLTY.txt /cygdrive/c/Users/SG066221/Desktop/scripts/FROM_LIST_2_ANOTHER/ 1>C:UsersSG066221Desktopscriptsdiff_FINAL.txt
Output is :
sending incremental file list
drwx------ 0 2018/11/12 14:26:18 .
sent 38 bytes received 64 bytes 204.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
file compare rsync
add a comment |
I have a list of files mentioned at left hand side in a text file and I have a separate folder where I have list of physical files. I have to compare the left hand's FileList.txt with Right hand's Directory files(Recursively) and copy delta part using rsync. I am using the below command but not getting any files to copy.
Below is the dry run attempt .
rsync -rvnc --include-from=/cygdrive/c/Users/SG066221/Desktop/scripts/diff_Lib_WITH_EMPLTY.txt /cygdrive/c/Users/SG066221/Desktop/scripts/FROM_LIST_2_ANOTHER/ 1>C:UsersSG066221Desktopscriptsdiff_FINAL.txt
Output is :
sending incremental file list
drwx------ 0 2018/11/12 14:26:18 .
sent 38 bytes received 64 bytes 204.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
file compare rsync
I have a list of files mentioned at left hand side in a text file and I have a separate folder where I have list of physical files. I have to compare the left hand's FileList.txt with Right hand's Directory files(Recursively) and copy delta part using rsync. I am using the below command but not getting any files to copy.
Below is the dry run attempt .
rsync -rvnc --include-from=/cygdrive/c/Users/SG066221/Desktop/scripts/diff_Lib_WITH_EMPLTY.txt /cygdrive/c/Users/SG066221/Desktop/scripts/FROM_LIST_2_ANOTHER/ 1>C:UsersSG066221Desktopscriptsdiff_FINAL.txt
Output is :
sending incremental file list
drwx------ 0 2018/11/12 14:26:18 .
sent 38 bytes received 64 bytes 204.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
file compare rsync
file compare rsync
asked Nov 12 at 11:47
Santanu Guha
42
42
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The correct syntax for rsync is:
rsync <options> <include> <exclude> src/ dest/
Your problems:
- If you only list one directory, nothing will happen.
- If you have includes without excludes then it'll include everything.
- (You have dry-run set, but you probably knew that.)
Try this:
rsync -rvc --include-from=file.txt --exclude='*' src/ dest/
Make sure that file.txt
contains only the filenames within src/
(i.e. with "src/" stripped off). Make sure that any sub-directories you want files copied from are listed too, on their own line (alternatively, add --include='*/'
before the exclude).
What it says is, copy from src
to dest
, including files in file.txt
, and excluding everything else.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53261509%2fwant-to-compare-delta-files-recursively-using-rsync-when-i-have-file-list-in-lef%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The correct syntax for rsync is:
rsync <options> <include> <exclude> src/ dest/
Your problems:
- If you only list one directory, nothing will happen.
- If you have includes without excludes then it'll include everything.
- (You have dry-run set, but you probably knew that.)
Try this:
rsync -rvc --include-from=file.txt --exclude='*' src/ dest/
Make sure that file.txt
contains only the filenames within src/
(i.e. with "src/" stripped off). Make sure that any sub-directories you want files copied from are listed too, on their own line (alternatively, add --include='*/'
before the exclude).
What it says is, copy from src
to dest
, including files in file.txt
, and excluding everything else.
add a comment |
The correct syntax for rsync is:
rsync <options> <include> <exclude> src/ dest/
Your problems:
- If you only list one directory, nothing will happen.
- If you have includes without excludes then it'll include everything.
- (You have dry-run set, but you probably knew that.)
Try this:
rsync -rvc --include-from=file.txt --exclude='*' src/ dest/
Make sure that file.txt
contains only the filenames within src/
(i.e. with "src/" stripped off). Make sure that any sub-directories you want files copied from are listed too, on their own line (alternatively, add --include='*/'
before the exclude).
What it says is, copy from src
to dest
, including files in file.txt
, and excluding everything else.
add a comment |
The correct syntax for rsync is:
rsync <options> <include> <exclude> src/ dest/
Your problems:
- If you only list one directory, nothing will happen.
- If you have includes without excludes then it'll include everything.
- (You have dry-run set, but you probably knew that.)
Try this:
rsync -rvc --include-from=file.txt --exclude='*' src/ dest/
Make sure that file.txt
contains only the filenames within src/
(i.e. with "src/" stripped off). Make sure that any sub-directories you want files copied from are listed too, on their own line (alternatively, add --include='*/'
before the exclude).
What it says is, copy from src
to dest
, including files in file.txt
, and excluding everything else.
The correct syntax for rsync is:
rsync <options> <include> <exclude> src/ dest/
Your problems:
- If you only list one directory, nothing will happen.
- If you have includes without excludes then it'll include everything.
- (You have dry-run set, but you probably knew that.)
Try this:
rsync -rvc --include-from=file.txt --exclude='*' src/ dest/
Make sure that file.txt
contains only the filenames within src/
(i.e. with "src/" stripped off). Make sure that any sub-directories you want files copied from are listed too, on their own line (alternatively, add --include='*/'
before the exclude).
What it says is, copy from src
to dest
, including files in file.txt
, and excluding everything else.
answered Nov 15 at 14:36
ams
18.7k23560
18.7k23560
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53261509%2fwant-to-compare-delta-files-recursively-using-rsync-when-i-have-file-list-in-lef%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown