Use the %w
modifier:
inotifywait -m -r --format '%w%f' .......
To pass the output of inotifywait as an argument to a php script, which will read it for the argv
variable you could do this:
inotifywait -m -r --format '%w%f' ....... | while read -r line
do
php script.php "$line"
done
Otherwise, if you want the php script to read the output of inotifywait from the standard input, then you can just pipe to your script:
inotifywait -m -r --format '%w%f' ....... | php script.php