I want to warn everyone, I am not a programmer lol. I'm an IT wanting to get a little insight of programming, and I like to play around so I can learn. Ok, so I'm going to school for IT Security and Forensics. I had a project to write a hack, and I chose to write a shell script to run dd to write random data to sda. It was easy. I'm currently using BackTrack 4 r2 (not that it really matters.) Now, I want to make it better and auto terminate. The entire script acts like it is installing firefox, yet is running dd. the only thing is, dd does not auto term it's self. I want it to term maybe after 10 minutes? My script is below. I promise I am doing this only for my own personal use. I am a Christian, and have my FBI background clearances for school.
Thanks! I tried that, but I dint know where to add that code. Like I said, I'm a noob lol. Also, how did you add the code box? I think I'm just not looking in the right place..
CarloM, I'm actually trying to get a script to run a dd command for about 5 minutes, kill the dd, an then finish the script. Maybe my first post wasn't very clear, sorry!
sounds like you want to set an alarm. check this out and see if it works
for you Script: run-with-timeout.ksh Corona's solution is more
straight forward so I would start with that