0

Is there a way to list all files that have been downloaded in the past 12 hours (or 10 days, or 2 months) without knowing the exact location?

For example, let's say that the system downloaded automatically 1200 files, which are likely in 1 or 2 folders (same hard drive, SDA1), however in this folder there are already 5000 files.

Is there a way from the command line to find out which files where downloaded eg. today and put their names in a txt file? Note that while the files were being downloaded i was working on other files in the same directory, so I am not interested to find out which file(s) was last modified, but more specifically which files where downloaded today.

1 Answers1

1

I'm not sure if there is a specific code that can be used to view just all the downloaded files, but I hope this helps.

if there is common filename for it, for example, you just downloaded a bunch of .zip

you can always use the grep command

find . -type f -newermt 2018-05-07 | grep '.zip' > filename.txt

or if it is a bunch of .zip and .odt

find . -type f -newermt 2018-05-07 | grep '.zip\|.odt' > filename.txt

EXPLANATION

find . -type f -newermt YYYY-MM-DD = finds all files that is modified that day

grep = used to search text or searches the given file for lines containing a match to the given strings or words.

> filename.txt = lets you save all of the output on a text file

-just make sure you are inside of that directory before using this