You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

underlap's avatar
underlap
Explorer | Level 4
2 years ago

cat prints old version of file

I am using Dropbox v169.4.5684 on macOS 12.6.3. In a terminal session with current directory in a Dropbox directory, I copied a file from a sibling directory using the cp command. I edited and saved the file (using vscode). The edited version of the file is visible to vscode and at least two other programs. The edited file has also been uploaded to the Dropbox server. The Dropbox icon shows that syncing is complete.

 

However, if I print the contents of the file using the cat utility (in /bin/cat - built in to macOS), it shows the version of the file before I edited it. I have tried rebooting the computer and the behaviour persists. I wonder if there is a problem with the Dropbox filesystem. It seems very unlikely that there is a bug in cat.

  • Hannah's avatar
    Hannah
    2 years ago

    Hey underlap, if you create a copy of one of those files somewhere outside the Dropbox folder, are you still seeing the same behavior?

  • Walter's avatar
    Walter
    Icon for Dropbox Staff rankDropbox Staff

    Hey underlap, thanks for joining our Community and sorry to hear you're having issues with this.

     

    Could you please let us know if this happens to files that available offline to your computer or ones that are online only?

     

    Also, do you see the updated version on our website? 

     

    Any additional information or screenshots you can share are more than welcome!

    • underlap's avatar
      underlap
      Explorer | Level 4

      Thanks for responding @Walter.

       

      I'm not sure whether the file in question is available offline or online only. Right clicking on the file or any of its containing directories (inside the Dropbox folder) offers two (ungreyed) options "Make available offline" and "Make online-only", so that doesn't give me a clue. I can't see anything in the settings relating to this choice. (I'm sure I remember that option somewhere in an earlier version of Dropbox.)

       

      Make available offline and Make online options are both available

       

      The updated version is indeed present on the website, so syncing is working fine.

       

      Since you asked for screenshots, here are two taken in quick succession. The first shows the output from `cat names.hs`:

       

      Output of cat showing the old version of the file

       

      and the second shows the output of running `vi names.hs`:

       

      Output of vi showing the new version of the file

       

      Other editors such as vscode and emacs show the new version of the file, so there is something different about the way `cat` is accessing the file.

       

      I checked `which cat` and it's the system provided utility at `/bin/cat`

      • underlap's avatar
        underlap
        Explorer | Level 4

        I did an experiment. I tried setting another file which exhibits the same problem first of all to "Make available offline" and then to "Make online-only". I tried `cat` again in both of these states and the old version of the file was still displayed.

About Apps and Installations

Have a question about a Dropbox app or installation? Reach out to the Dropbox Community and get solutions, help, and advice from members.

Need more support

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!