I have a file named file.ext. I create an symbolic link to this file named file_symlink.ext in other folder.

When I modify file.ext directly (without opening the file via the symbolic link), the symbolic link is transformed to an effective file with the old version.

Is that normal?

I would like the symbolic link to always point to the real file, but I can't use alias because LaTeX does not accept working with aliases.

Is there any solution?

It is the last but one file.

colas-3:sources colas$ ls -li
total 48
8592287609 lrwxr-xr-x  1 colas  staff    116 11 aoû 16:15 exercices_relations.tex symlink -> /Users/colas/Dropbox/Maths/Maths_2018_2019/C. Exercices, DM, Interros/7. Relations/exercices/exercices_relations.tex
8592305400 -rw-r--r--@ 1 colas  staff  22016 11 aoû 18:25 exercices_suites.tex symlink
8592287688 lrwxr-xr-x  1 colas  staff    138 11 aoû 16:16 exercices_systemes_lineaires.tex symlink -> /Users/colas/Dropbox/Maths/Maths_2018_2019/C. Exercices, DM, Interros/9. Systèmes linéaires/exercices/exercices_systemes_lineaires.tex
  • 2
    With which application do you edit file.ext? And why can't you run LaTeX directly on the file?
    – nohillside
    Aug 11, 2018 at 16:17
  • 1
    And I have some troubles understanding "the symbolic link is transformed to an effective file with the old version", can you add some output of ls -li demonstrating this?
    – nohillside
    Aug 11, 2018 at 16:18
  • 1
    I edit file.ext with TeXShop. Actually, I include the files with the symlinks.
    – Colas
    Aug 11, 2018 at 16:19
  • 1
    So TeXShop seems to rewrite included files somehow. Not sure you can prevent this from happening, I would probably just run LaTeX directly in the Dropbox folder.
    – nohillside
    Aug 11, 2018 at 16:40
  • 1
    How are you creating the symlink? Try this command: ln -s /Users/colas/Dropbox/Maths/Maths_2018_2019/C. Exercices, DM, Interros/7. Relations/exercices/exercices_relations.tex /some/other/directory/exercises_relations.tex
    – Allan
    Aug 11, 2018 at 16:57


You must log in to answer this question.

Browse other questions tagged .