LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 03:06 PM by the dsc (linux-related notes)
Updated 08-30-2011 at 09: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 818 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 04:06 AM.

Main Menu
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