Q: 13
DRAG DROP As a Systems Administrator, to reduce disk space, you were tasked to create a shell script that does the following: Add relevant content to /tmp/script.sh, so that it finds and compresses rotated files in /var/log without recursion. INSTRUCTIONS Fill the blanks to build a script that performs the actual compression of rotated log files. If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.
Drag & Drop
Discussion
find /var/log -type f -maxdepth 1 | grep, > /tmp/tempfile, filename, $(cat, do, gzip, $filename
Had something like this in a mock. 'gzip' is the right compression tool for rotated logs on most Linux distros. Pretty sure this fits the spirit of the XK0-005 objectives.
Had something like this in a mock. 'gzip' is the right compression tool for rotated logs on most Linux distros. Pretty sure this fits the spirit of the XK0-005 objectives.
find /var/log -type f -maxdepth 1 | grep, > /tmp/tempfile, filename, $(cat, do, zip, $filename. I think "zip" is used for compression here instead of "gzip" since that's a common confusion trap. Let me know if you see it different.
Yeah, I think it's zip instead of gzip. So the mapping would use zip in the do step.
find /var/log -type f -maxdepth 1 | grep, > /tmp/tempfile, filename, $(cat, do, $filename
Be respectful. No spam.
