HowTos


Run Remote Commands with SSH 1

By adding commands at the end of the ssh command they will be issued at the remote machine and you will get back stdout and stderr results on the local machine.

ssh useraccount@boxname 'someCommand | someOtherCommand'


Oracle VirtualBox: Enable eth0 on backtrack4 / enable default ethernet card on backtrack

ifup eth0

*INFO: The default Ethernet device is disabled on boot but it can easily be enabled by just issuing the above command. (You still need to configure it depending on your system’s structure). In order to activate the Ethernet card you need to call the above command from the Terminal.


One line for loop

for i in $(seq $START $STEP $END); do echo "Iteration $i"; someCommand; someOtherCommand ; done

*INFO: $START: The starting value for the for loop, can be replaced by an integer.
$STEP: The step that the for loop is performing at the end of each iteration, can be replaced by an integer.
$END: The ending value for the for loop, can be replaced by an integer.

*NOTE: All kinds of bash for loops can be coded as above and made into one liners.