Friday, October 4, 2013

Executing a set of commands using while on Linux command prompt

To execute set of commands on command prompt use below command:

root@user-desktop:/home/user# while [ 1 ]; do ls -ltr; ls; done

This will run until we terminate (Using Ctrl+c/Ctrl+z)