Hey,
is there a way to repeat a command several times ?
with out re-typing the command.
linux repeat command x times
Re: linux repeat command x times
With the up arrow you get the last commands you typed, and press enter to execute it.
If you want to run the same command several times,
you can use for-loop ( in bash)
repeats 3 times
Another option is watch
If you want to repeat a command every x seconds, ideal for monitoring:
repeats every 10 seconds.
quit with CTRL+C
If you want to run the same command several times,
you can use for-loop ( in bash)
Code: Select all
for n in {1..3}; do <COMMAND>; done
Another option is watch
If you want to repeat a command every x seconds, ideal for monitoring:
Code: Select all
watch -n 10 <COMMAND>
quit with CTRL+C