Maintaining Internet Access While Downloading Large Files on a Mac with caffeinate and wget command
When downloading larger files (approximately 9-12 GB) using wget or curl, I use the caffeinate command in a new terminal tab to prevent my Mac from going to sleep. The command I use is caffeinate -dw <wgets pid>.
- The -d option keeps the Macs display turned on.
- The -w option ensures that caffeinate runs as long as the wget command is active.
However, I don't want to keep my display on all night as its inconvenient. When I remove the -d option from the command (caffeinate -w), the display turns off, which is fine. But the problem is, when the display turns off, my Mac can no longer access the internet.
Is there any way to accomplish my task without keeping the display on and ensuring my Mac maintains internet access while downloading large files?