<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.learnliberally.org/w/index.php?action=history&amp;feed=atom&amp;title=User%3ARobbie%2FScratch</id>
	<title>User:Robbie/Scratch - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.learnliberally.org/w/index.php?action=history&amp;feed=atom&amp;title=User%3ARobbie%2FScratch"/>
	<link rel="alternate" type="text/html" href="https://www.learnliberally.org/w/index.php?title=User:Robbie/Scratch&amp;action=history"/>
	<updated>2026-05-08T02:47:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://www.learnliberally.org/w/index.php?title=User:Robbie/Scratch&amp;diff=633&amp;oldid=prev</id>
		<title>Robbie: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://www.learnliberally.org/w/index.php?title=User:Robbie/Scratch&amp;diff=633&amp;oldid=prev"/>
		<updated>2024-11-03T20:33:45Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:33, 3 November 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Robbie</name></author>
	</entry>
	<entry>
		<id>https://www.learnliberally.org/w/index.php?title=User:Robbie/Scratch&amp;diff=632&amp;oldid=prev</id>
		<title>robbiemcclintoc.org&gt;Robbie at 03:02, 1 November 2024</title>
		<link rel="alternate" type="text/html" href="https://www.learnliberally.org/w/index.php?title=User:Robbie/Scratch&amp;diff=632&amp;oldid=prev"/>
		<updated>2024-11-01T03:02:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I have a list of 50+ directories that I want to download from a larger collection. How do I write a linux command line to do that using wget?&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
Sider Fusion&lt;br /&gt;
&lt;br /&gt;
You can use `wget` to download multiple directories by specifying the URLs in a text file and using the `-i` option. Here&amp;#039;s how you can do it:&lt;br /&gt;
&lt;br /&gt;
1. Create a text file (e.g., `urls.txt`) and list all the directories you want to download, one per line.&lt;br /&gt;
&lt;br /&gt;
2. Use the following `wget` command to download the directories:&lt;br /&gt;
&lt;br /&gt;
```bash&lt;br /&gt;
wget -r -np -nH --cut-dirs=1 -i urls.txt&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
### Explanation of the options:&lt;br /&gt;
- `-r`: Recursive download.&lt;br /&gt;
- `-np`: No parent, which prevents `wget` from downloading files from parent directories.&lt;br /&gt;
- `-nH`: No host directories, which prevents `wget` from creating a directory for the host.&lt;br /&gt;
- `--cut-dirs=1`: This option removes the specified number of directory components from the path. Adjust the number based on your directory structure.&lt;br /&gt;
- `-i urls.txt`: This tells `wget` to read the list of URLs from the specified file.&lt;br /&gt;
&lt;br /&gt;
Make sure to replace `urls.txt` with the actual path to your file containing the URLs.&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
GPT-4o&lt;br /&gt;
&lt;br /&gt;
To download multiple directories using `wget`, you can create a text file containing the URLs of the directories you want to download and then use `wget` with the `-i` option to read from that file. Here&amp;#039;s a step-by-step guide:&lt;br /&gt;
&lt;br /&gt;
1. **Create a Text File with URLs:**&lt;br /&gt;
   - Create a text file (e.g., `urls.txt`) and list all the URLs of the directories you want to download, one per line.&lt;br /&gt;
&lt;br /&gt;
   Example `urls.txt`:&lt;br /&gt;
   ```&lt;br /&gt;
   http://example.com/directory1/&lt;br /&gt;
   http://example.com/directory2/&lt;br /&gt;
   http://example.com/directory3/&lt;br /&gt;
   ...&lt;br /&gt;
   ```&lt;br /&gt;
&lt;br /&gt;
2. **Use wget with the -i Option:**&lt;br /&gt;
   - Use the following command to download all the directories listed in your `urls.txt` file:&lt;br /&gt;
&lt;br /&gt;
   ```bash&lt;br /&gt;
   wget -r -np -nH --cut-dirs=1 -i urls.txt&lt;br /&gt;
   ```&lt;br /&gt;
&lt;br /&gt;
   Explanation of the options:&lt;br /&gt;
   - `-r`: Recursively download the directories.&lt;br /&gt;
   - `-np`: No parent. This prevents `wget` from downloading parent directories.&lt;br /&gt;
   - `-nH`: No host directories. This prevents `wget` from creating a directory named after the host.&lt;br /&gt;
   - `--cut-dirs=1`: This option removes the specified number of directory components from the path. Adjust the number according to your directory structure.&lt;br /&gt;
   - `-i urls.txt`: Specifies the input file containing the list of URLs.&lt;br /&gt;
&lt;br /&gt;
3. **Adjust Options as Needed:**&lt;br /&gt;
   - Depending on your server setup and directory structure, you might need to adjust the `--cut-dirs` option or add authentication options if required.&lt;br /&gt;
&lt;br /&gt;
This approach allows you to efficiently download multiple directories using `wget` by leveraging a list of URLs.&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
Claude 3.5 Sonnet&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ll help you create a command to download multiple directories using wget. There are a few approaches depending on how your list is structured.&lt;br /&gt;
&lt;br /&gt;
1. If you have a text file containing the directory URLs (one per line), you can use:&lt;br /&gt;
```bash&lt;br /&gt;
wget -i list.txt --recursive --no-parent --no-host-directories&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
2. If you want to download from a list of directory names from the same base URL:&lt;br /&gt;
```bash&lt;br /&gt;
while read dir; do&lt;br /&gt;
    wget -r -np -nH --cut-dirs=1 &amp;quot;http://base-url.com/$dir&amp;quot;&lt;br /&gt;
done &amp;lt; list.txt&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
Key wget options explained:&lt;br /&gt;
- `-r` or `--recursive`: Download recursively&lt;br /&gt;
- `-np` or `--no-parent`: Don&amp;#039;t ascend to parent directory&lt;br /&gt;
- `-nH` or `--no-host-directories`: Don&amp;#039;t create host directories&lt;br /&gt;
- `--cut-dirs=n`: Skip n directory components when saving&lt;br /&gt;
- `-i`: Read URLs from a file&lt;br /&gt;
&lt;br /&gt;
Could you share:&lt;br /&gt;
1. How your directory list is formatted?&lt;br /&gt;
2. Are all directories under the same base URL?&lt;br /&gt;
&lt;br /&gt;
This will help me provide the most appropriate command for your specific case.&lt;/div&gt;</summary>
		<author><name>robbiemcclintoc.org&gt;Robbie</name></author>
	</entry>
</feed>