0

I have a folder /home/ros/codes. Inside it, I have datewise folders where I have a CMakeLists.txt file and a build folder inside which I run cmake.. and make command.

Recently, I observed if I edit any CMakelists.txt file from any of this group of folders, the edits get automatically overwritten in all others files. Even if I have renamed the other file to -say- CMakelists(copy).txt , still the changes are being reflected. I can see these are locked files.So I am using sudo gedit to edit them.

Why is this happening and how can I avoid it further?

talonmies
  • 70,661
  • 34
  • 192
  • 269
Anuj Patil
  • 21
  • 7
  • Are all the CMakeLists.txt files then identical? Could they be symlinks? Can you do `ls -la` of some of the files to see? – borizzzzz Oct 12 '19 at 12:08
  • Yes, identical. I didn't know what a symlink is and after doing ls -la, all the files output "lrwxrwxrwx 1 nvidian nvidian 50 Oct -> /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake" So, they could be symlinks right? – Anuj Patil Oct 14 '19 at 06:00
  • All right, the `-> /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake` tells you that they are indeed symlinks. This means you actually only have one file, toplevel.cmake, and all the rest are just shortcuts to that file. – borizzzzz Oct 14 '19 at 14:05

0 Answers0