rsync is failing with confusing error messages
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
In a bash script (Arch Linux) I have the following rsync command:
rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from="/etc/$path1/exclude-list-$configName.txt" "$new_snap/" "$BACKUPDIR"
The rsync command fails with the following error:
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
Of course, that message is misleading as "a" implies "r".
If I remove the option "--delete-delay" from the rsync command, I get this different error:
rsync: link_stat "/some/path/âÂÂaAHX" failed: No such file or directory (2)
The value shown at "/some/path" is the current working directory. If I change the current directory, that value in the error message changes as well. However, why the options "-aAHX" would be appended to any part of the path is confusing.
The computer is a fully updated Arch Linux system. I just rebooted it as well.
4.13.11-1-ARCH #1 SMP PREEMPT Thu Nov 2 10:25:56 CET 2017 x86_64 GNU/Linux
rsync program location:
# which rsync
/usr/bin/rsync
Here is the test script:
#!/bin/bash
path1=xyz
configName=root
new_snap=/.snapshots/1/snapshot
BACKUPDIR=/backup/$configName
echo "showing exclude file contents:"
cat "/etc/$path1/exclude-list-$configName.txt"
echo
echo rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from="/etc/$path1/exclude-list-$configName.txt" "$new_snap/" "$BACKUPDIR"
rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from="/etc/$path1/exclude-list-$configName.txt" "$new_snap/" "$BACKUPDIR"
Here are the contents of the file "/etc/$path/exclude-list-$configName.txt":
"dev/*"
"proc/*"
"sys/*"
"tmp/*"
"run/*"
"mnt/*"
"media/*"
"lost+found"
".trash*/*"
".Trash*/*"
Here is some testing without any script at all. I find it baffling.
# mkdir adir
# mkdir bdir
# touch adir/afile1
# touch adir/afile2
# ls -la adir/
total 0
drwxr-x--x 1 root root 24 Nov 12 02:21 .
drwxr-xr-x 1 user user 2080 Nov 12 02:28 ..
-rw-r----- 1 root root 0 Nov 12 02:21 afile1
-rw-r----- 1 root root 0 Nov 12 02:21 afile2
# ls -la bdir/
total 0
drwxr-x--x 1 root root 0 Nov 12 02:21 .
drwxr-xr-x 1 user user 2080 Nov 12 02:28 ..
# rsync -nva adir/ bdir
sending incremental file list
./
afile1
afile2
sent 93 bytes received 25 bytes 236.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
# rsync -nva /home/user/adir/ /home/user/bdir
sending incremental file list
./
afile1
afile2
sent 93 bytes received 25 bytes 236.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
# rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from=/root/exclude-list-root.txt /home/user/adir/ /home/user/bdir/
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
rsync error: syntax or usage error (code 1) at main.c(1567) [client=3.1.2]
# rsync âÂÂnvaAHX --inplace --delete-delay /home/user/adir/ /home/user/bdir/
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
rsync error: syntax or usage error (code 1) at main.c(1567) [client=3.1.2]
# rsync âÂÂnvaAHX --inplace /home/user/adir/ /home/user/bdir/
rsync: link_stat "/home/user/âÂÂnvaAHX" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
# rsync âÂÂnvaAHX /home/user/adir/ /home/user/bdir/
rsync: link_stat "/home/user/âÂÂnvaAHX" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
# rsync âÂÂnva /home/user/adir/ /home/user/bdir/
rsync: link_stat "/home/user/âÂÂnva" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
rsync
add a comment |Â
up vote
1
down vote
favorite
In a bash script (Arch Linux) I have the following rsync command:
rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from="/etc/$path1/exclude-list-$configName.txt" "$new_snap/" "$BACKUPDIR"
The rsync command fails with the following error:
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
Of course, that message is misleading as "a" implies "r".
If I remove the option "--delete-delay" from the rsync command, I get this different error:
rsync: link_stat "/some/path/âÂÂaAHX" failed: No such file or directory (2)
The value shown at "/some/path" is the current working directory. If I change the current directory, that value in the error message changes as well. However, why the options "-aAHX" would be appended to any part of the path is confusing.
The computer is a fully updated Arch Linux system. I just rebooted it as well.
4.13.11-1-ARCH #1 SMP PREEMPT Thu Nov 2 10:25:56 CET 2017 x86_64 GNU/Linux
rsync program location:
# which rsync
/usr/bin/rsync
Here is the test script:
#!/bin/bash
path1=xyz
configName=root
new_snap=/.snapshots/1/snapshot
BACKUPDIR=/backup/$configName
echo "showing exclude file contents:"
cat "/etc/$path1/exclude-list-$configName.txt"
echo
echo rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from="/etc/$path1/exclude-list-$configName.txt" "$new_snap/" "$BACKUPDIR"
rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from="/etc/$path1/exclude-list-$configName.txt" "$new_snap/" "$BACKUPDIR"
Here are the contents of the file "/etc/$path/exclude-list-$configName.txt":
"dev/*"
"proc/*"
"sys/*"
"tmp/*"
"run/*"
"mnt/*"
"media/*"
"lost+found"
".trash*/*"
".Trash*/*"
Here is some testing without any script at all. I find it baffling.
# mkdir adir
# mkdir bdir
# touch adir/afile1
# touch adir/afile2
# ls -la adir/
total 0
drwxr-x--x 1 root root 24 Nov 12 02:21 .
drwxr-xr-x 1 user user 2080 Nov 12 02:28 ..
-rw-r----- 1 root root 0 Nov 12 02:21 afile1
-rw-r----- 1 root root 0 Nov 12 02:21 afile2
# ls -la bdir/
total 0
drwxr-x--x 1 root root 0 Nov 12 02:21 .
drwxr-xr-x 1 user user 2080 Nov 12 02:28 ..
# rsync -nva adir/ bdir
sending incremental file list
./
afile1
afile2
sent 93 bytes received 25 bytes 236.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
# rsync -nva /home/user/adir/ /home/user/bdir
sending incremental file list
./
afile1
afile2
sent 93 bytes received 25 bytes 236.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
# rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from=/root/exclude-list-root.txt /home/user/adir/ /home/user/bdir/
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
rsync error: syntax or usage error (code 1) at main.c(1567) [client=3.1.2]
# rsync âÂÂnvaAHX --inplace --delete-delay /home/user/adir/ /home/user/bdir/
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
rsync error: syntax or usage error (code 1) at main.c(1567) [client=3.1.2]
# rsync âÂÂnvaAHX --inplace /home/user/adir/ /home/user/bdir/
rsync: link_stat "/home/user/âÂÂnvaAHX" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
# rsync âÂÂnvaAHX /home/user/adir/ /home/user/bdir/
rsync: link_stat "/home/user/âÂÂnvaAHX" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
# rsync âÂÂnva /home/user/adir/ /home/user/bdir/
rsync: link_stat "/home/user/âÂÂnva" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
rsync
Why would you choose$path
as a variable name? And how is it set?
â jasonwryan
Nov 12 '17 at 6:34
@jasonwryan Looks like it's just a typo...all other references are to$path1
.
â B Layer
Nov 12 '17 at 7:25
Do you happen to haversync
as an alias or shell function in your working environment, or is it the name of a script that you have written?
â Kusalananda
Nov 12 '17 at 7:27
UPDATED the question. Fixed the typo. I do not have rsync or anything close to that as an alias. I have not written any scripts with this name either.
â MountainX
Nov 12 '17 at 7:53
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
In a bash script (Arch Linux) I have the following rsync command:
rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from="/etc/$path1/exclude-list-$configName.txt" "$new_snap/" "$BACKUPDIR"
The rsync command fails with the following error:
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
Of course, that message is misleading as "a" implies "r".
If I remove the option "--delete-delay" from the rsync command, I get this different error:
rsync: link_stat "/some/path/âÂÂaAHX" failed: No such file or directory (2)
The value shown at "/some/path" is the current working directory. If I change the current directory, that value in the error message changes as well. However, why the options "-aAHX" would be appended to any part of the path is confusing.
The computer is a fully updated Arch Linux system. I just rebooted it as well.
4.13.11-1-ARCH #1 SMP PREEMPT Thu Nov 2 10:25:56 CET 2017 x86_64 GNU/Linux
rsync program location:
# which rsync
/usr/bin/rsync
Here is the test script:
#!/bin/bash
path1=xyz
configName=root
new_snap=/.snapshots/1/snapshot
BACKUPDIR=/backup/$configName
echo "showing exclude file contents:"
cat "/etc/$path1/exclude-list-$configName.txt"
echo
echo rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from="/etc/$path1/exclude-list-$configName.txt" "$new_snap/" "$BACKUPDIR"
rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from="/etc/$path1/exclude-list-$configName.txt" "$new_snap/" "$BACKUPDIR"
Here are the contents of the file "/etc/$path/exclude-list-$configName.txt":
"dev/*"
"proc/*"
"sys/*"
"tmp/*"
"run/*"
"mnt/*"
"media/*"
"lost+found"
".trash*/*"
".Trash*/*"
Here is some testing without any script at all. I find it baffling.
# mkdir adir
# mkdir bdir
# touch adir/afile1
# touch adir/afile2
# ls -la adir/
total 0
drwxr-x--x 1 root root 24 Nov 12 02:21 .
drwxr-xr-x 1 user user 2080 Nov 12 02:28 ..
-rw-r----- 1 root root 0 Nov 12 02:21 afile1
-rw-r----- 1 root root 0 Nov 12 02:21 afile2
# ls -la bdir/
total 0
drwxr-x--x 1 root root 0 Nov 12 02:21 .
drwxr-xr-x 1 user user 2080 Nov 12 02:28 ..
# rsync -nva adir/ bdir
sending incremental file list
./
afile1
afile2
sent 93 bytes received 25 bytes 236.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
# rsync -nva /home/user/adir/ /home/user/bdir
sending incremental file list
./
afile1
afile2
sent 93 bytes received 25 bytes 236.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
# rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from=/root/exclude-list-root.txt /home/user/adir/ /home/user/bdir/
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
rsync error: syntax or usage error (code 1) at main.c(1567) [client=3.1.2]
# rsync âÂÂnvaAHX --inplace --delete-delay /home/user/adir/ /home/user/bdir/
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
rsync error: syntax or usage error (code 1) at main.c(1567) [client=3.1.2]
# rsync âÂÂnvaAHX --inplace /home/user/adir/ /home/user/bdir/
rsync: link_stat "/home/user/âÂÂnvaAHX" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
# rsync âÂÂnvaAHX /home/user/adir/ /home/user/bdir/
rsync: link_stat "/home/user/âÂÂnvaAHX" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
# rsync âÂÂnva /home/user/adir/ /home/user/bdir/
rsync: link_stat "/home/user/âÂÂnva" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
rsync
In a bash script (Arch Linux) I have the following rsync command:
rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from="/etc/$path1/exclude-list-$configName.txt" "$new_snap/" "$BACKUPDIR"
The rsync command fails with the following error:
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
Of course, that message is misleading as "a" implies "r".
If I remove the option "--delete-delay" from the rsync command, I get this different error:
rsync: link_stat "/some/path/âÂÂaAHX" failed: No such file or directory (2)
The value shown at "/some/path" is the current working directory. If I change the current directory, that value in the error message changes as well. However, why the options "-aAHX" would be appended to any part of the path is confusing.
The computer is a fully updated Arch Linux system. I just rebooted it as well.
4.13.11-1-ARCH #1 SMP PREEMPT Thu Nov 2 10:25:56 CET 2017 x86_64 GNU/Linux
rsync program location:
# which rsync
/usr/bin/rsync
Here is the test script:
#!/bin/bash
path1=xyz
configName=root
new_snap=/.snapshots/1/snapshot
BACKUPDIR=/backup/$configName
echo "showing exclude file contents:"
cat "/etc/$path1/exclude-list-$configName.txt"
echo
echo rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from="/etc/$path1/exclude-list-$configName.txt" "$new_snap/" "$BACKUPDIR"
rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from="/etc/$path1/exclude-list-$configName.txt" "$new_snap/" "$BACKUPDIR"
Here are the contents of the file "/etc/$path/exclude-list-$configName.txt":
"dev/*"
"proc/*"
"sys/*"
"tmp/*"
"run/*"
"mnt/*"
"media/*"
"lost+found"
".trash*/*"
".Trash*/*"
Here is some testing without any script at all. I find it baffling.
# mkdir adir
# mkdir bdir
# touch adir/afile1
# touch adir/afile2
# ls -la adir/
total 0
drwxr-x--x 1 root root 24 Nov 12 02:21 .
drwxr-xr-x 1 user user 2080 Nov 12 02:28 ..
-rw-r----- 1 root root 0 Nov 12 02:21 afile1
-rw-r----- 1 root root 0 Nov 12 02:21 afile2
# ls -la bdir/
total 0
drwxr-x--x 1 root root 0 Nov 12 02:21 .
drwxr-xr-x 1 user user 2080 Nov 12 02:28 ..
# rsync -nva adir/ bdir
sending incremental file list
./
afile1
afile2
sent 93 bytes received 25 bytes 236.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
# rsync -nva /home/user/adir/ /home/user/bdir
sending incremental file list
./
afile1
afile2
sent 93 bytes received 25 bytes 236.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
# rsync âÂÂnvaAHX --inplace --delete-delay --exclude-from=/root/exclude-list-root.txt /home/user/adir/ /home/user/bdir/
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
rsync error: syntax or usage error (code 1) at main.c(1567) [client=3.1.2]
# rsync âÂÂnvaAHX --inplace --delete-delay /home/user/adir/ /home/user/bdir/
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
rsync error: syntax or usage error (code 1) at main.c(1567) [client=3.1.2]
# rsync âÂÂnvaAHX --inplace /home/user/adir/ /home/user/bdir/
rsync: link_stat "/home/user/âÂÂnvaAHX" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
# rsync âÂÂnvaAHX /home/user/adir/ /home/user/bdir/
rsync: link_stat "/home/user/âÂÂnvaAHX" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
# rsync âÂÂnva /home/user/adir/ /home/user/bdir/
rsync: link_stat "/home/user/âÂÂnva" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
rsync
edited Nov 12 '17 at 15:07
Jeff Schaller
32k849109
32k849109
asked Nov 12 '17 at 4:39
MountainX
4,4862367117
4,4862367117
Why would you choose$path
as a variable name? And how is it set?
â jasonwryan
Nov 12 '17 at 6:34
@jasonwryan Looks like it's just a typo...all other references are to$path1
.
â B Layer
Nov 12 '17 at 7:25
Do you happen to haversync
as an alias or shell function in your working environment, or is it the name of a script that you have written?
â Kusalananda
Nov 12 '17 at 7:27
UPDATED the question. Fixed the typo. I do not have rsync or anything close to that as an alias. I have not written any scripts with this name either.
â MountainX
Nov 12 '17 at 7:53
add a comment |Â
Why would you choose$path
as a variable name? And how is it set?
â jasonwryan
Nov 12 '17 at 6:34
@jasonwryan Looks like it's just a typo...all other references are to$path1
.
â B Layer
Nov 12 '17 at 7:25
Do you happen to haversync
as an alias or shell function in your working environment, or is it the name of a script that you have written?
â Kusalananda
Nov 12 '17 at 7:27
UPDATED the question. Fixed the typo. I do not have rsync or anything close to that as an alias. I have not written any scripts with this name either.
â MountainX
Nov 12 '17 at 7:53
Why would you choose
$path
as a variable name? And how is it set?â jasonwryan
Nov 12 '17 at 6:34
Why would you choose
$path
as a variable name? And how is it set?â jasonwryan
Nov 12 '17 at 6:34
@jasonwryan Looks like it's just a typo...all other references are to
$path1
.â B Layer
Nov 12 '17 at 7:25
@jasonwryan Looks like it's just a typo...all other references are to
$path1
.â B Layer
Nov 12 '17 at 7:25
Do you happen to have
rsync
as an alias or shell function in your working environment, or is it the name of a script that you have written?â Kusalananda
Nov 12 '17 at 7:27
Do you happen to have
rsync
as an alias or shell function in your working environment, or is it the name of a script that you have written?â Kusalananda
Nov 12 '17 at 7:27
UPDATED the question. Fixed the typo. I do not have rsync or anything close to that as an alias. I have not written any scripts with this name either.
â MountainX
Nov 12 '17 at 7:53
UPDATED the question. Fixed the typo. I do not have rsync or anything close to that as an alias. I have not written any scripts with this name either.
â MountainX
Nov 12 '17 at 7:53
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
That dash in front of n
in âÂÂnvaHAX
is not an ordinary dash but a slightly longer em-dash (or hyphen).
This may have happened if you're copy and pasting from a "smart" editor or word processor that replaces certain characters with the corresponding typographical character.
On my system, copying and pasting the first part of your command results in:
$ rsync âÂÂnva adir/ bdir/
rsync: link_stat "/tmp_mfs/shell-ksh.D1Mq1Xht/#342#200#223nva" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
As you can see, my terminal displays the error message slightly differently from yours and shows that the dash is in fact a Unicode character (or something similar, I don't know much about character encodings).
Thank you. Looks like I was posting an answer at the same time as you. I accepted your answer.
â MountainX
Nov 12 '17 at 8:15
Nice catch! Eagle-vision!!!
â maulinglawns
Nov 12 '17 at 8:43
add a comment |Â
up vote
1
down vote
The whole strange problem was caused by the character in front of the rsync options. The problematic character is this one (and I don't know how it got there):
âÂÂ
# printf â | od -An -vtu1
226 128 147
The proper character is this character, a standard dash (minus sign):
-
# printf - | od -An -vtu1
45
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
That dash in front of n
in âÂÂnvaHAX
is not an ordinary dash but a slightly longer em-dash (or hyphen).
This may have happened if you're copy and pasting from a "smart" editor or word processor that replaces certain characters with the corresponding typographical character.
On my system, copying and pasting the first part of your command results in:
$ rsync âÂÂnva adir/ bdir/
rsync: link_stat "/tmp_mfs/shell-ksh.D1Mq1Xht/#342#200#223nva" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
As you can see, my terminal displays the error message slightly differently from yours and shows that the dash is in fact a Unicode character (or something similar, I don't know much about character encodings).
Thank you. Looks like I was posting an answer at the same time as you. I accepted your answer.
â MountainX
Nov 12 '17 at 8:15
Nice catch! Eagle-vision!!!
â maulinglawns
Nov 12 '17 at 8:43
add a comment |Â
up vote
5
down vote
accepted
That dash in front of n
in âÂÂnvaHAX
is not an ordinary dash but a slightly longer em-dash (or hyphen).
This may have happened if you're copy and pasting from a "smart" editor or word processor that replaces certain characters with the corresponding typographical character.
On my system, copying and pasting the first part of your command results in:
$ rsync âÂÂnva adir/ bdir/
rsync: link_stat "/tmp_mfs/shell-ksh.D1Mq1Xht/#342#200#223nva" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
As you can see, my terminal displays the error message slightly differently from yours and shows that the dash is in fact a Unicode character (or something similar, I don't know much about character encodings).
Thank you. Looks like I was posting an answer at the same time as you. I accepted your answer.
â MountainX
Nov 12 '17 at 8:15
Nice catch! Eagle-vision!!!
â maulinglawns
Nov 12 '17 at 8:43
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
That dash in front of n
in âÂÂnvaHAX
is not an ordinary dash but a slightly longer em-dash (or hyphen).
This may have happened if you're copy and pasting from a "smart" editor or word processor that replaces certain characters with the corresponding typographical character.
On my system, copying and pasting the first part of your command results in:
$ rsync âÂÂnva adir/ bdir/
rsync: link_stat "/tmp_mfs/shell-ksh.D1Mq1Xht/#342#200#223nva" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
As you can see, my terminal displays the error message slightly differently from yours and shows that the dash is in fact a Unicode character (or something similar, I don't know much about character encodings).
That dash in front of n
in âÂÂnvaHAX
is not an ordinary dash but a slightly longer em-dash (or hyphen).
This may have happened if you're copy and pasting from a "smart" editor or word processor that replaces certain characters with the corresponding typographical character.
On my system, copying and pasting the first part of your command results in:
$ rsync âÂÂnva adir/ bdir/
rsync: link_stat "/tmp_mfs/shell-ksh.D1Mq1Xht/#342#200#223nva" failed: No such file or directory (2)
skipping directory .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
As you can see, my terminal displays the error message slightly differently from yours and shows that the dash is in fact a Unicode character (or something similar, I don't know much about character encodings).
answered Nov 12 '17 at 8:03
Kusalananda
105k14207325
105k14207325
Thank you. Looks like I was posting an answer at the same time as you. I accepted your answer.
â MountainX
Nov 12 '17 at 8:15
Nice catch! Eagle-vision!!!
â maulinglawns
Nov 12 '17 at 8:43
add a comment |Â
Thank you. Looks like I was posting an answer at the same time as you. I accepted your answer.
â MountainX
Nov 12 '17 at 8:15
Nice catch! Eagle-vision!!!
â maulinglawns
Nov 12 '17 at 8:43
Thank you. Looks like I was posting an answer at the same time as you. I accepted your answer.
â MountainX
Nov 12 '17 at 8:15
Thank you. Looks like I was posting an answer at the same time as you. I accepted your answer.
â MountainX
Nov 12 '17 at 8:15
Nice catch! Eagle-vision!!!
â maulinglawns
Nov 12 '17 at 8:43
Nice catch! Eagle-vision!!!
â maulinglawns
Nov 12 '17 at 8:43
add a comment |Â
up vote
1
down vote
The whole strange problem was caused by the character in front of the rsync options. The problematic character is this one (and I don't know how it got there):
âÂÂ
# printf â | od -An -vtu1
226 128 147
The proper character is this character, a standard dash (minus sign):
-
# printf - | od -An -vtu1
45
add a comment |Â
up vote
1
down vote
The whole strange problem was caused by the character in front of the rsync options. The problematic character is this one (and I don't know how it got there):
âÂÂ
# printf â | od -An -vtu1
226 128 147
The proper character is this character, a standard dash (minus sign):
-
# printf - | od -An -vtu1
45
add a comment |Â
up vote
1
down vote
up vote
1
down vote
The whole strange problem was caused by the character in front of the rsync options. The problematic character is this one (and I don't know how it got there):
âÂÂ
# printf â | od -An -vtu1
226 128 147
The proper character is this character, a standard dash (minus sign):
-
# printf - | od -An -vtu1
45
The whole strange problem was caused by the character in front of the rsync options. The problematic character is this one (and I don't know how it got there):
âÂÂ
# printf â | od -An -vtu1
226 128 147
The proper character is this character, a standard dash (minus sign):
-
# printf - | od -An -vtu1
45
answered Nov 12 '17 at 8:13
MountainX
4,4862367117
4,4862367117
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f403983%2frsync-is-failing-with-confusing-error-messages%23new-answer', 'question_page');
);
Post as a guest
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
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
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
Why would you choose
$path
as a variable name? And how is it set?â jasonwryan
Nov 12 '17 at 6:34
@jasonwryan Looks like it's just a typo...all other references are to
$path1
.â B Layer
Nov 12 '17 at 7:25
Do you happen to have
rsync
as an alias or shell function in your working environment, or is it the name of a script that you have written?â Kusalananda
Nov 12 '17 at 7:27
UPDATED the question. Fixed the typo. I do not have rsync or anything close to that as an alias. I have not written any scripts with this name either.
â MountainX
Nov 12 '17 at 7:53