My question is in a title: Is there a way to download all .txt files from the page via curl or wget command? Thanks
1 Answer
You can use wget with -A
to specify a type of file and -r
to be recursive:
wget -r -A '*.txt' http://url-to-webpage-with-txts/
-
-
I've tested on Linux Debian using bash. Is it possible that the txt files are behind an user/password authentication on the website?– jcbermuFeb 13, 2015 at 13:05
-
No, it is possible to wget each file separately,here is link: introcs.cs.princeton.edu/java/21function Feb 13, 2015 at 14:09
-
I tried and only downloaded robots.txt. Are you sure that there are .txt files on that server?– jcbermuFeb 13, 2015 at 14:29
-