Signal9Signal9 — home
online
back to labs

Dojo: Total Lines Across Files

EasyOne-Liner Dojo8 min
The brief

The logs in /root/docs are split across several .log files. In ONE line, count the TOTAL number of lines across all of them and write just that number to /root/answer.txt.

Don't cat the files into a counter — that's a wasted process. awk already walks every input line and keeps a running record count; ask it for that count at the end.

What you'll do
  • Write the total line count across /root/docs/*.log to /root/answer.txt, in one line

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.