Recent files in Linux.
Hello.
Has Linux any recent files? I like to know when I'm not at the desk then which files viewed by others. Thank you. |
If you are not at your machine, no-one should be able to access anything.
What did you web search return ?. |
at first you can lock your computer, so noone can use it without your password.
Next, nowadays the PCs connected to the network, so one can reach your PC without sitting at your desk. finally the system (running programs) may write files anywhere (like logs or anything else) without a keypress, without logged in users (human beings). |
You can find recently accessed files with, what a surprise, find command. For example:
Code:
find . -user username -type f -amin -60 |
Yup, you can do this easily with the find command. There are a few flavours for the access times and modified times:
Code:
find $HOME -type f TIME_ARG |
The atime works in Unix only.
In Linux since kernel 2.6.30 the default mount option is relatime, so find -amin and ls -lu are not reliable. The atime is updated if it were off by more than 1 day, so frequent access can still be seen with -atime -1. If you want to use reliable atime in Linux you need to explicitly mount with option strictatime. |
I opened a file but "find $HOME -type f -amin 1" not show it !!!
Code:
$ find $HOME -type f -amin 1 |
Quote:
|
|
Quote:
Code:
$ sed -nr 's/.*href="([^"]*)".*/\1/p' ~/.local/share/recently-used.xbel |
All times are GMT -5. The time now is 12:53 PM. |