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?

Posted on May 21, 2024 10:21 PM

Reply
2 replies

May 21, 2024 10:38 PM in response to pritam99

pritam99 Said:

"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.[...]Is there any way to accomplish my task without keeping the display on and ensuring my Mac maintains internet access while downloading large files?"

-------


Keeping a Mac form Sleep When Closing the Lid:

Seems you need a third-party app. The app will sleep whenever it closes. So, here is the app to use: amphetamine - App Store

May 22, 2024 5:44 AM in response to pritam99

Hi,

Following tip could help your question.


How to Keep Your MacBook On When Closed

  1. Click the Apple icon in the upper left corner.
  2. Click System Preferences.
  3. Click Battery.
  4. Click Power Adapter.
  5. Click the slider and move it to Never.
  6. Click the Prevent computer from sleeping automatically when the display is off check box.
  7. Plug your MacBook into power.


Maintaining Internet Access While Downloading Large Files on a Mac with caffeinate and wget command

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.