Install Fswatch On A Debian, Ubuntu, Kali And MacOS

Install Fswatch On A Debian, Ubuntu, Kali And MacOS

fswatch

A cross-platform file change monitor.

Maintainer: Alf Gaida



Section: misc

Install fswatch

  • Debian apt-get install fswatch Click to copy
  • Ubuntu apt-get install fswatch Click to copy
  • Kali Linux apt-get install fswatch Click to copy
  • macOS brew install fswatch Click to copy

A cross-platform file change monitor.

How to use fswatch?

Below are few example commands for fswatch that you can use in the terminal.

Run a bash command on file creation, update or deletion:
fswatch path/to/file | xargs -n 1 bash_commandClick to copy
Watch one or more files and/or directories:
fswatch path/to/file path/to/directory path/to/another_directory/**/*.js | xargs -n 1 bash_commandClick to copy
Print the absolute paths of the changed files:
fswatch path/to/directory | xargs -n 1 -I {} echo {}Click to copy
Filter by event type, eg. Updated, Deleted or Created:
fswatch --event Updated path/to/directory | xargs -n 1 bash_commandClick to copy
Installation of latest fswatch command is available for Debian, Ubuntu, Kali and macOS. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.