If I run a command in bash, is there any way to determine which files and directories were modified as a result of running that command?
For example, if i run:
export $MYDIR="/home/users/myuser/"
touch $MY_DIR/*
I would like to be able to list the files that were modified:
/home/users/myuser/file1
/home/users/myuser/file2
/home/users/myuser/file3
But not specifically for touch. I would like the solution to be general for any command.
Is this possible?