2

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 2

1

Files:

find -type f -mtime -31

Folders:

find -type d -mtime -31 

It will search from the directory where you typed it.

3
  • 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
    – Requist
    Feb 21, 2014 at 15:24
  • @Requist wow I soooo mis-read the question :X
    – Rinzwind
    Feb 21, 2014 at 15:31
  • 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.
    – user250730
    Feb 25, 2014 at 14:05
-1

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.

1
  • That was not the question, it was about files and folders.
    – Requist
    Feb 21, 2014 at 15:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .