rsync files-from unable to handle filename with subfolder?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I need to sync remotes files to local with the following command:



rsync -schavzP --stats --files-from=./filelist.txt -e "ssh -p 22" remoteuser@1.2.3.4:/home/somewhere/ .


While filelist.txt contains several subfolder filenames:



subfolder/746fbd52ec4441b88f62ead5beb8e57e
subfolder/test


The command gives the following error:



rsync: link_stat "/home/somewhere/subfolder/746fbd52ec4441b88f62ead5beb8e57e" failed: No such file or directory


If I issue rsync without files-from, and give the remote filename directly in command line, it works.



Appreciate if someone could lend me a hand. Thank you.










share|improve this question



















  • 2




    You did verify that the file does exist?
    – RalfFriedl
    Aug 28 at 16:40










  • Yes definitely. I can rsync the file by command line
    – Kenny Tse
    Aug 29 at 1:47










  • Show the output from ls -l /home/somewhere/subfolder/746fbd52ec4441b88f62ead5beb8e57e, copy the path exactly from the error message rsync gives. Run `strace -f -e file rsync ..." and show the line that refers to this file. Append the information to the question, not as a comment.
    – RalfFriedl
    Aug 29 at 5:22










  • @RalfFriedl It lists the file is there. Nothing special. Thank you for your input. I found the real cause finally.
    – Kenny Tse
    Aug 29 at 7:21














up vote
0
down vote

favorite












I need to sync remotes files to local with the following command:



rsync -schavzP --stats --files-from=./filelist.txt -e "ssh -p 22" remoteuser@1.2.3.4:/home/somewhere/ .


While filelist.txt contains several subfolder filenames:



subfolder/746fbd52ec4441b88f62ead5beb8e57e
subfolder/test


The command gives the following error:



rsync: link_stat "/home/somewhere/subfolder/746fbd52ec4441b88f62ead5beb8e57e" failed: No such file or directory


If I issue rsync without files-from, and give the remote filename directly in command line, it works.



Appreciate if someone could lend me a hand. Thank you.










share|improve this question



















  • 2




    You did verify that the file does exist?
    – RalfFriedl
    Aug 28 at 16:40










  • Yes definitely. I can rsync the file by command line
    – Kenny Tse
    Aug 29 at 1:47










  • Show the output from ls -l /home/somewhere/subfolder/746fbd52ec4441b88f62ead5beb8e57e, copy the path exactly from the error message rsync gives. Run `strace -f -e file rsync ..." and show the line that refers to this file. Append the information to the question, not as a comment.
    – RalfFriedl
    Aug 29 at 5:22










  • @RalfFriedl It lists the file is there. Nothing special. Thank you for your input. I found the real cause finally.
    – Kenny Tse
    Aug 29 at 7:21












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I need to sync remotes files to local with the following command:



rsync -schavzP --stats --files-from=./filelist.txt -e "ssh -p 22" remoteuser@1.2.3.4:/home/somewhere/ .


While filelist.txt contains several subfolder filenames:



subfolder/746fbd52ec4441b88f62ead5beb8e57e
subfolder/test


The command gives the following error:



rsync: link_stat "/home/somewhere/subfolder/746fbd52ec4441b88f62ead5beb8e57e" failed: No such file or directory


If I issue rsync without files-from, and give the remote filename directly in command line, it works.



Appreciate if someone could lend me a hand. Thank you.










share|improve this question















I need to sync remotes files to local with the following command:



rsync -schavzP --stats --files-from=./filelist.txt -e "ssh -p 22" remoteuser@1.2.3.4:/home/somewhere/ .


While filelist.txt contains several subfolder filenames:



subfolder/746fbd52ec4441b88f62ead5beb8e57e
subfolder/test


The command gives the following error:



rsync: link_stat "/home/somewhere/subfolder/746fbd52ec4441b88f62ead5beb8e57e" failed: No such file or directory


If I issue rsync without files-from, and give the remote filename directly in command line, it works.



Appreciate if someone could lend me a hand. Thank you.







rsync






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 28 at 16:42

























asked Aug 28 at 15:22









Kenny Tse

112




112







  • 2




    You did verify that the file does exist?
    – RalfFriedl
    Aug 28 at 16:40










  • Yes definitely. I can rsync the file by command line
    – Kenny Tse
    Aug 29 at 1:47










  • Show the output from ls -l /home/somewhere/subfolder/746fbd52ec4441b88f62ead5beb8e57e, copy the path exactly from the error message rsync gives. Run `strace -f -e file rsync ..." and show the line that refers to this file. Append the information to the question, not as a comment.
    – RalfFriedl
    Aug 29 at 5:22










  • @RalfFriedl It lists the file is there. Nothing special. Thank you for your input. I found the real cause finally.
    – Kenny Tse
    Aug 29 at 7:21












  • 2




    You did verify that the file does exist?
    – RalfFriedl
    Aug 28 at 16:40










  • Yes definitely. I can rsync the file by command line
    – Kenny Tse
    Aug 29 at 1:47










  • Show the output from ls -l /home/somewhere/subfolder/746fbd52ec4441b88f62ead5beb8e57e, copy the path exactly from the error message rsync gives. Run `strace -f -e file rsync ..." and show the line that refers to this file. Append the information to the question, not as a comment.
    – RalfFriedl
    Aug 29 at 5:22










  • @RalfFriedl It lists the file is there. Nothing special. Thank you for your input. I found the real cause finally.
    – Kenny Tse
    Aug 29 at 7:21







2




2




You did verify that the file does exist?
– RalfFriedl
Aug 28 at 16:40




You did verify that the file does exist?
– RalfFriedl
Aug 28 at 16:40












Yes definitely. I can rsync the file by command line
– Kenny Tse
Aug 29 at 1:47




Yes definitely. I can rsync the file by command line
– Kenny Tse
Aug 29 at 1:47












Show the output from ls -l /home/somewhere/subfolder/746fbd52ec4441b88f62ead5beb8e57e, copy the path exactly from the error message rsync gives. Run `strace -f -e file rsync ..." and show the line that refers to this file. Append the information to the question, not as a comment.
– RalfFriedl
Aug 29 at 5:22




Show the output from ls -l /home/somewhere/subfolder/746fbd52ec4441b88f62ead5beb8e57e, copy the path exactly from the error message rsync gives. Run `strace -f -e file rsync ..." and show the line that refers to this file. Append the information to the question, not as a comment.
– RalfFriedl
Aug 29 at 5:22












@RalfFriedl It lists the file is there. Nothing special. Thank you for your input. I found the real cause finally.
– Kenny Tse
Aug 29 at 7:21




@RalfFriedl It lists the file is there. Nothing special. Thank you for your input. I found the real cause finally.
– Kenny Tse
Aug 29 at 7:21










1 Answer
1






active

oldest

votes

















up vote
1
down vote













As usual it turns out the real cause is not what I think it was.



The "filelist.txt" was an UTF8 textfile which has BOM codes at the beginning of the file as hidden codes. Even "vi", "vim", "nano" are not able to show them.



Removed all those hidden codes and the above rsync codes inside bash script should work.



Sorry for the chaos.






share|improve this answer




















  • Would you please add into your answer how did you delete that BOM characters bytes ?
    – Î±Ò“sнιη
    Aug 29 at 10:32











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f465329%2frsync-files-from-unable-to-handle-filename-with-subfolder%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













As usual it turns out the real cause is not what I think it was.



The "filelist.txt" was an UTF8 textfile which has BOM codes at the beginning of the file as hidden codes. Even "vi", "vim", "nano" are not able to show them.



Removed all those hidden codes and the above rsync codes inside bash script should work.



Sorry for the chaos.






share|improve this answer




















  • Would you please add into your answer how did you delete that BOM characters bytes ?
    – Î±Ò“sнιη
    Aug 29 at 10:32















up vote
1
down vote













As usual it turns out the real cause is not what I think it was.



The "filelist.txt" was an UTF8 textfile which has BOM codes at the beginning of the file as hidden codes. Even "vi", "vim", "nano" are not able to show them.



Removed all those hidden codes and the above rsync codes inside bash script should work.



Sorry for the chaos.






share|improve this answer




















  • Would you please add into your answer how did you delete that BOM characters bytes ?
    – Î±Ò“sнιη
    Aug 29 at 10:32













up vote
1
down vote










up vote
1
down vote









As usual it turns out the real cause is not what I think it was.



The "filelist.txt" was an UTF8 textfile which has BOM codes at the beginning of the file as hidden codes. Even "vi", "vim", "nano" are not able to show them.



Removed all those hidden codes and the above rsync codes inside bash script should work.



Sorry for the chaos.






share|improve this answer












As usual it turns out the real cause is not what I think it was.



The "filelist.txt" was an UTF8 textfile which has BOM codes at the beginning of the file as hidden codes. Even "vi", "vim", "nano" are not able to show them.



Removed all those hidden codes and the above rsync codes inside bash script should work.



Sorry for the chaos.







share|improve this answer












share|improve this answer



share|improve this answer










answered Aug 29 at 7:24









Kenny Tse

112




112











  • Would you please add into your answer how did you delete that BOM characters bytes ?
    – Î±Ò“sнιη
    Aug 29 at 10:32

















  • Would you please add into your answer how did you delete that BOM characters bytes ?
    – Î±Ò“sнιη
    Aug 29 at 10:32
















Would you please add into your answer how did you delete that BOM characters bytes ?
– Î±Ò“sнιη
Aug 29 at 10:32





Would you please add into your answer how did you delete that BOM characters bytes ?
– Î±Ò“sнιη
Aug 29 at 10:32


















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f465329%2frsync-files-from-unable-to-handle-filename-with-subfolder%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)