Is there a command to give me the last user that accessed a specific folder in Ubuntu?
It is like auditing the folder for security reasons .
You can use auditd. To install it, run the following command from terminal:
sudo apt-get install auditd
sudo auditctl -w /path/to/folder -p rwx -k password-file
The above command monitoring /path/to/folder
for anyone that may perform a write, read or execute operation on that folder.
Use ausearch
command as follows:
sudo ausearch -f /path/to/folder -i | less
More about: Linux audit files to see who made changes to a file.