Cybersecurity Ops with bash
Cybersecurity Ops with bash - Chapter 1 Solutions
Updated: Mar 24, 2019
Below are selected solutions for the Chapter 1 workshop questions from Cybersecurity Ops with bash.
Write a command that executes ifconfig and redirects standard output to a file named ipaddress.txt.
To redirect stdout use the > character.
Write a command that copies all of the files in the directory /etc/a to the directory /etc/b and redirects standard error to the file copyerror.log.
To copy a file use the cp command. Standard error can be redirected using file descriptor 2.
Write a command that executes the script mytask and sends it to the background.
Commands and scripts can be sent to the background using the ampersand (&) character.
Given the following job list, write the command that brings the Amazon ping task to the foreground.
 Running ping www.google.com > /dev/null &
- Running ping www.amazon.com > /dev/null &
+ Running ping www.oreilly.com > /dev/null &
Background tasks can be brought to the foreground using the fg command and the corresponding task number.