LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices



Old

"Wait until a process ends, a download ends, or a file conversion ends, then do X"

Posted 08-30-2011 at 04:06 PM by the dsc (linux-related notes)
Updated 08-30-2011 at 10:41 PM by the dsc (a small improvement)

Sometimes you want the computer to shut down after you've finished downloading something or converting some large file into some other format, but you want to go out or go to sleep instead of waiting and checking for it yourself.

For these situations I've come up with two tiny scripts. The first one waits until a file hasn't changed its size on three consecutive intervals of twenty seconds:

Code:
a=0 ; file="$1" ; if [ -f "$file.part" ] ; then file="$file.part"
...
Member
Posted in Uncategorized
Views 834 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement

Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration