Linux Provide , programming homework help

User Generated

uerlrf1213

Programming

Description

Using Linux Provide a one line command that will download all the sample files linked in that webpage.

Details:

This webpage (http://techslides.com/sample-files-for-development) has links to samples of many different types of files. I have found those very handy for doing testing.

Your job is to provide a one line command that will download all the sample files linked in that webpage. At the time of this writing there were 49 sample files linked on that site.

As an example, supposed you are on an empty directory called test, once you run this command, it should have the following contents:

16:07:23 test $ ls
sample.aac sample.au sample.epub sample.jpg sample.mkv sample.ogg sample.ppt sample.tar sample.wav sample.woff
sample.ac3 sample.avi sample.flac sample.json sample.mov sample.otf sample.pptx sample.tiff sample.webm sample.xml
sample.ai sample.dat sample.flv sample.m4a sample.mp3 sample.pdf sample.ra sample.ttf sample.webp sample.xsd
sample.aiff sample.doc sample.gif sample.mid sample.mp4 sample.phps sample.rar sample.txt sample.wma sample.zip
sample.amr sample.docx sample.html sample.mka sample.mpg sample.png sample.swf sample.voc sample.wmv

TIP:

You will need to use the wget (or curl) utility to perform the interactions with the website, grep to be able to filter content, and the xargs utility. We have not covered wget or xargs in class, so you will need to research how they work. You will also need to use grep in a way that is a little bit more advanced than what we have seen in class.

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

The command I came up with uses wget. Make a new directory and then cd to that directory.wget -A sample.* -np -nd -k -m -E -e robots=off http://techslides.com/sample-files-for-developmentCopy the entire line s...


Anonymous
I use Studypool every time I need help studying, and it never disappoints.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags