How to find a list of recently modified files on the Ubuntu server 18.04? Specifically, I need a list of recently downloaded files using wget
.
1 Answer
If you have used wget
command to download files, you can check history
command to list out all the previously used commands and use grep "wget"
to list out whenever wget command was used.
history | grep "wget" | grep -E "(\-[PO])|(\-\-output-document|\-\-directory-prefix)"
here: "(\-[PO])|(\-\-output-document|\-\-directory-prefix)"
means grep
any of the following below
-P
or--directory-prefix
inwget
refers to directory path where file has to be downloaded-O
or--output-document
refers to save to directory with specific file name
If the wget
command was used in some bash script you can cat
the script and follow the same method
cat script.sh | grep "wget" | grep -E "(\-[PO])|(\-\-output-document|\-\-directory-prefix)"
from the output of that you can figure out where all the files downloaded using wget
must have been stored.
-
1Use
grep pattern file
instead ofcat file | grep pattern
, and save typing Commented Nov 25, 2020 at 7:26