I'm trying to set up a workflow to copy my iCloud script projects to my user library. Sadly apple decided to add quite a few unfriendly characters in the file path.
rsync -aE –delete ~/Library/Mobile\ Documents/com\~apple\~ScriptEditor2/Documents/Script\ Libraries/ ~/Library/Script\ Libraries/
I keep getting. The following error:
rsync: link_stat "/Users/{{my_username}}/\#342\#200\#223delete" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54/rsync/main.c(996) [sender=2.6.9]
The file is truncated so I feel it's a parse error, but I can't get it to work. I've tried a few different ways of writing the path, but they all are saying the path does not exist.
TL;DR: Your delete option is wrong. It should be --delete with 2 ASCII "minus" characters.
I suspect you may have a character encoding problem. Rich text editors and word processors often combine -- to an "emdash" character. The error message shows it is trying to access a file with some non-ASCII characters followed by "delete". This shows that rsync is treating the delete part as a file path instead of a command flag.
Related
I could not find a usable solution to this seemingly simple problem, despite my best efforts.
I'm using MacOS High Sierra 10.13.6
I have a folder I want to copy with the following location:
/Users/ep9k/Desktop/Key-LogEcovaluator/whereami
I want to copy it to this directory using the terminal:
/Users/ep9k/Library/Application/Support/QGIS/QGIS3/profiles/default/python/plugins
I tried the following commands in the terminal. Notice I am in the 'whereami' folder when doing this:
whereami ep9k$ cp -r /Users/ep9k/Desktop/Key-LogEcovaluator/whereami /Users/ep9k/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
whereami ep9k$ cp -a /Users/ep9k/Desktop/Key-LogEcovaluator/whereami /Users/ep9k/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
I'm met with the following message indicating I am not using it correctly:
However, I created a "tester" folder on my desktop and can copy to this folder with no problems, using exactly the same command (except with the pathname changed to my tester folder).
I can also copy and paste things to this directory using the GUI "finder". What am I missing?
Your destination path contains at least one whitespace character ("Application Support"), which causes the "cp" command to think it's being given three arguments instead of two. Enclose the destination path in single or double quotes and you should be all right.
I have a directory called mdamb231(data_and_results) on the server and I want to transfer some files from this directory to another one, but since the name is weird it gives this error:
"-bash: syntax error near unexpected token `('".
I tried to change the name using mv command but got the same error.
do you guys know how to transfer my files from this directory?
You need to put backslashes before the brackets to escape them, i.e.
mv mdamb231\(data_and_results\) newfilename
or put the file path in single quotes
mv 'mdamb231(data_and_results)' newfilename
I want to run a Terminal command from within FileMaker. I use the Perform AppleScript script step with a native AppleScript:
do shell script "rsync -r Documents/Monturen/ fakeuser#fakeserverhosting.be:www/"
I installed a SSH Key on the remote server. The goal is to automate the sync of images.
I do get a 23 error. Any advice on what I'm doing wrong?
This is rsinc error 23 - some files could not be transferred. Try to transfer one file with explicitly defined full file path.
I think there is a problem with the source filepath as well. Shouldn't this be
~/Documents/Monturen
or
~/Documents/Monturen/*
If you have any spaces in your file names or folder names they have to be escaped with \\. The same applies to any apostrophes.
On: svn import project_path server_path -m 'import first'
I got the following error:
svn: E160005: Invalid control character '0x10' in path
Finally solved this error.
SVN gives the which file contains the error.
In my case the file name looks like TestViewController.h in Xcode and Finder but while you see in terminal it shows TestViewController?.h
see how it looks in terminal
so i rename the file with command mv TestViewController?.h to TestViewController.h and my error solved.
Verify names of all files and directories in your project.
There is a character in the path that is must never be in Subversion repository, therefore the client displays the error. Moreover, normally such character should not be used in file and directory names ever. The same is true for newline character (0x0A) and some others.
I have the following rsync script which I created to do incremental backups:
rsync -arv --exclude-from '/usr/bin/exclude-list.txt' --delete /Volumes/DOCS/ /Volumes/BKUP1/DOCS/
&& rsync -arv --delete /Volumes/Webserver/ /Volumes/BKUP1/Webserver/
My exclude list is
/Volumes/Webserver/.Spotlight-V100
/Volumes/Webserver/.Trashes
/Volumes/Webserver/.fseventsd
Everytime I run this backup. It seems to go through and copy all the files everytime, despite the fact that rsync is supposed to be an incremental backup solution.
E.G. First run:
....
sites/website/sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/style/js/.svn/prop-base/
sites/website/sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/style/js/.svn/props/
sites/website/sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/style/js/.svn/text-base/
....
Second run:
....
sites/website/sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/style/js/.svn/prop-base/
sites/website/sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/style/js/.svn/props/
sites/website/sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/style/js/.svn/text-base/
....
etc...
The same files are copied across again. Also I am constantly encountering the following permission denied errors, despite the fact they are ignored in my excude-from argument:
building file list ... rsync: opendir "/Volumes/Webserver/.Spotlight-V100" failed: Permission denied (13)
rsync: opendir "/Volumes/Webserver/.Trashes" failed: Permission denied (13)
rsync: opendir "/Volumes/Webserver/.fseventsd" failed: Permission denied (13)
Any ideas? I am hoping I can tweak this script so it will only copy across modified / new files and show me what files these are in the verbose output.
Many thanks in advanced.
I ran in to this myself. The best I could come up with, as silly as this sounds, is that the files' timestamps aren't being preserved. Then when you do it again it thinks "Hey! These timestamps don't match - better sync 'em!" If you use the -t option, It will send the timestamps along, then the files will be seen as the same
Or you can use the "size only" option, which does what it sounds, if you're sure there are no files you've modified but are the same size.
Are you copying to a FAT32 drive from a differently formatted drive? My understanding is that FAT32 keeps a 16-bit time-stamp which only permits a resolution of about two seconds, which is far less precise than other drive formats. By default, rsync requires timestamps to match exactly, so virtually every file will fail this test and be recopied.
To fix this, you need to have rsync to pass files that are time-stamped +/-1 second (2 second total range) from the source. You do this by adding
--modify-window=1
to the rsync command.