Score:0

Watch pattern with PathModified/PathChanged but ignore several files and folders

ke flag

I would like my service to watch changes inside a folder /path/to/projectname except for changes happening to a virtualenv located at /path/to/projectname/venv.

The architecture of files inside /path/to/projectname is the following:

.
├── README.md
├── scripts
├── setup.py
├── src
└── venv

I have the following systemd.path file:

[Path]
PathModified=/path/to/projectname

[Install]
WantedBy=multi-user.target

I noticed the existence of PathExistsGlob in the systemd.path docs. But I did not notice anything about ignoring a globbing pattern for PathModified or PathChanged.

I could also write this:

[Path]
PathModified=/path/to/projectname/scripts
PathModified=/path/to/projectname/src
PathModified=/path/to/projectname/setup.py

[Install]
WantedBy=multi-user.target

but I feel like there could be a better way.

Is there a way to watch a folder except for one (or more) particular children of this folder?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.