GNU.WIKI: The GNU/Linux Knowledge Base

  [HOME] [PHP Manual] [HowTo] [ABS] [MAN1] [MAN2] [MAN3] [MAN4] [MAN5] [MAN6] [MAN7] [MAN8] [MAN9]

  [0-9] [Aa] [Bb] [Cc] [Dd] [Ee] [Ff] [Gg] [Hh] [Ii] [Jj] [Kk] [Ll] [Mm] [Nn] [Oo] [Pp] [Qq] [Rr] [Ss] [Tt] [Uu] [Vv] [Ww] [Xx] [Yy] [Zz]


     entr — run arbitrary commands when files change


     entr [-r] [-c] utility [argument ...] [/_]
     entr +fifo


     entr has two modes of operation; the first use reads a list of files
     provided on STDIN and executes the supplied utility if any of them
     change.  entr waits for the child process to finish before responding to
     subsequent file system events. A TTY is opened before entering the watch
     loop in order to support the invocation of interactive utilities.

     -r modifies the exec mode by launching the utility at startup and
     reloading it if one of the source files change. This features requires
     the application to exit if it receives SIGTERM.  entr always waits for
     the utility to exit to ensure that resources such as sockets have been

     The second mode also reads a list of filenames provided on STDIN and is
     enabled by specifying '+' and the name of a fifo. In this mode entr
     enables more sophisticated scripting by writing filenames to a named pipe
     when they are modified.


     A limited number of features are provided simply to save keystrokes.

     -c clears the screen before running the utility.

     The first occurrence of /_ on the command line will be replaced with the
     absolute path of the first file under watch. This is most useful for
     running or processing a single file.


     If PAGER is undefined, entr will assign /bin/cat to prevent interactive
     utilities from waiting for keyboard input if output does not fit on the


     The entr utility does not normally return, but it will exit with a value
     of 0 if the signal SIGINT or SIGTERM was received. An exit status of 1
     indicates that no regular files were provided as input.


     Rebuild project when source files change

           $ find src | entr make

     Clear the screen and run tests

           $ ls *.py | entr -c ./

     Launch and auto-reload a node.js server

           $ ls *.js | entr -r node index.js

     Run an SQL query

           $ echo my.sql | entr psql -f /_

     Convert individual Markdown files to HTML if they're modified

           $ ls *.md | entr +notify &
           $ while read F; do
           > markdown2html $F
           > done < notify


     Only regular files are monitored, directories and special files are

  All copyrights belong to their respective owners. Other content (c) 2014-2018, GNU.WIKI. Please report site errors to
Page load time: 0.116 seconds. Last modified: November 04 2018 12:49:43.