voguendi
voguendi

Reputation: 3

Run a bash linux command for a specified time

Is there a way in linux please to execute a command just a certain duration of time like 10 minutes ?

I wanna make a capture with: airodump-ng -w $CAPT_DEST $mon But i just want it to last 10 minutes and then the command stops automatically.

Upvotes: 0

Views: 171

Answers (1)

pfnuesel
pfnuesel

Reputation: 15360

The command you are looking for is timeout:

timeout 600 airodump-ng -w "$CAPT_DEST" "$mon"

See man timeout for more information.

Upvotes: 1

Related Questions