2 # SPDX-License-Identifier: GPL-2.0+
4 # Periodically scan a directory tree to prevent files from being reaped
5 # by systemd and friends on long runs.
7 # Usage: kvm-remote-noreap.sh pathname
9 # Copyright (C) 2021 Facebook, Inc.
11 # Authors: Paul E. McKenney <paulmck@kernel.org>
14 if test "$pathname" = ""
16 echo Usage
: kvm-remote-noreap.sh pathname
19 if ! test -d "$pathname"
21 echo Usage
: kvm-remote-noreap.sh pathname
22 echo " pathname must be a directory."
26 while test -d "$pathname"
28 find "$pathname" -type f
-exec touch -c {} \
; > /dev
/null
2>&1