Search code examples
linuxsshfs

SSHFS - how does it work when I want to access files


lets say I have remote directory mounted on the local machine and I would like to grep all files in that mounted directory. How does it work? Does SSHFS make local copy of that files and grep them locally or does it run grep on the remote machine?

Kind regards.


Solution

  • SSHFS copies the file when you try to access it (by using grep in your case) and runs grep locally. All operations are performed locally. And if you change the file, it will be sent to the remote system.

    Since SSHFS runs over SFTP, no operations are performed on the remote computer.