Tag Info

New answers tagged

2

You can possibly do this by registering a custom user signal handler in ~/.bashrc: trap '[ "$PWD" = "/my/sshfs/mount" ] && cd ~' SIGUSR1 Then this handler will get invoked whenever you send a SIGUSR1 signal to bash processes: killall -u "$USER" -USR1 bash This comes with a few caveats: The signal handler must be registered for all ...


2

SSHFS doesn't implement the inotify API. Making that work would require a fundamental redesign for two reasons: SSHFS uses SFTP to communicate with the server. The SFTP protocol has no facility to be notified of file changes on the server side. The server might not even have a file change notification mechanism — this could be made an optional feature of ...


1

It is impossible to distinguish from the server side an SFTP session that the client accesses via SSHFS from an SFTP session that the client accesses via some other client software. But you can definitely obtain more information about the SFTP session. Each SFTP session has an associated sftp-server process. On Linux, you can list the process IDs running ...



Top 50 recent answers are included