How can you lock computer while using curl to download files?

0

1

I’m using a Python script in the Terminal in Mac OS X 10.10.2 to download many files from a webpage using curl. However sometimes I might want to lock my computer and walk away but this terminates my connection. Is it possible to keep the download going in the background while locking the computer?

user2522073

Posted 2015-02-28T21:47:43.170

Reputation: 33

Answers

0

You can use nohup in conjunction with & like this:

nohup [your Python script or any command] &

The magic of nohup is that it allows a process to run even if your connection to the machine is gone. Meaning you logged out or are even disconnected. The & at the end means the process should run as a background process.

So when you enter that command the combo of nohup and & assures you that after you logout the process will still be running on the server.

JakeGould

Posted 2015-02-28T21:47:43.170

Reputation: 38 217