How can I get a list of all folders and files I opened in the last month? Preferably in the command line, with the date included. I am newbie on linux by the way. Thanks
2 Answers
Files:
find -type f -mtime -31
Folders:
find -type d -mtime -31
It will search from the directory where you typed it.
-
Now you forget about the folders :) if it's necessary folders can be added by a second find: find -type f -mtime -31 ; find -type d -mtime -31– RequistFeb 21, 2014 at 15:24
-
-
I don't want to see "modified" files, I want to see "opened" (or "accessed" using linux terminology) files. So, I guess the best is to use "atime" option. The commands work fine for files, but for folders there are some odd results. For example, typing "find -type d -amin -60" gives me the files opened in the last hour. But if I type "find -type d -amin -60", there are no results, despite I obviously accessed the folders where the files were. Feb 25, 2014 at 14:05
If you're using command line, you have used a command to open the file (like vi). So you can get all the commands you used using the command:
$history
This command show all the commands that the user used.