Reputation: 519
I'm trying to tar up a folder with several thousand files in it via ssh, however it keeps freezing every 30 seconds or so until I send a random keystroke to the ssh window then it resumes again, how can I run the tar command so that it runs properly without freezing like this?
Upvotes: 3
Views: 13738
Reputation: 1613
why not just put the command results into a log file...
tar -zcvf filename.tar.gz path/to/tar >> /var/log/large-folder-op.log
seems we are all going for solutions which seem to me greatly beyond need with no added value, (happy to be wrong, please comment if you feel this way), but what I am proposing gives you the output tar is giving you, but in a file you can check to see that everything went smoothly etc
If you want to overwrite the old file, just change >> to >
This seems to me to be the way a lot of linux scripts run, they simply output to a log file. Also consider making a shell script containing arguments to save you typing each time
Upvotes: 3
Reputation: 2980
put @ in front of the command and background it. Issue might be your ssh session, or you can try using screen and detaching from it
Upvotes: 1