macOS difference of file alias vs unix link
Hello,
I'm currently working on a small backup process using rsync but I have incorrect results on aliases when using the option rsync -a or -l for aliases created via finder: the destination aliases cannot be read or are showing incorrect data
After digging, I realise that the finder does not set the type "link" when I create an alias through the finder
For example: I Create a plain text file:
>$ echo "base file" > BaseFile.dat
>$ ls -l
total 8
-rw-r--r--@ 1 <user> staff 10 Nov 18 11:52 BaseFile.dat
>$
1) Create a link via terminal shows a link to the original file
>$ ln -s BaseFile.dat LinkFile.dat
>$ ls -l
total 8
-rw-r--r--@ 1 <user> staff 10 Nov 18 11:52 BaseFile.dat
lrwxr-xr-x 1 <user> staff 12 Nov 18 11:57 LinkFile.dat -> BaseFile.dat
>$
2) Creating an alias via Finder does not anymore show the link in Terminal (But it does in the finder or CMD-I )
>$ ls -l
total 16
-rw-r--r--@ 1 <user> staff 10 Nov 18 11:52 BaseFile.dat
-rw-r--r--@ 1 <user> staff 936 Nov 18 11:59 BaseFile.dat alias
lrwxr-xr-x 1 <user> staff 12 Nov 18 11:57 LinkFile.dat -> BaseFile.dat
>$
Both alias or link are showing "Alias" in the finder kind of file… but the size are not the same.
This induces incorrect results in rsync since the destination file generated for the aliases originated via Finder cannot be handled.
What is the difference between an alias and a link?
Jean
MacBook Pro (15-inch, 2016)
Model Identifier: MacBookPro13
Processor Name:Quad-Core Intel Core i7
Memory: 16 GB
System Version: macOS 10.15.1 (19B88)