12
votes
2answers
3k views

Can I watch the progress of a `sync` operation?

I've copied a large file to a USB disk mounted on a Linux system with async. This returns to a command prompt relatively quickly, but when I type sync, of course, it all has to go to disk, and that ...
2
votes
1answer
152 views

Set a callback for when a certain process is spawned

The script I'm writing launches process A, which after an uncertain amount of time, launches a child process B. I need the script to execute a command C which depends on process B. But B might not be ...