A Mini Capture-the-Flag on Git, SSH, and Linux
In this challenge, you must find a command that gives the response to the exercise questions below. All exercises have been designed so that a single command from your local machine can give the correct response. You will need to connect to the remote server to access the files in it and can use the interactive terminal to explore, but try to write your responses as a single command.
You should submit your solutions by making a pull request of this repository, adding a file "solutions/$number.md". The solution must show first the result and the command used to obtain this result.
If a solution has already been accepted, you can propose a different command to get the same solution by creating a pull request which modifies the existing solution file.
Points will be awarded for the first solution and for alternative commands given afterwards. The points ranking will be announced on Slack by Monday, or sooner if all exercises are completed.
Good luck!
- What is the hostname of our server?
- What is the operating system of our server?
- How many files (excluding directories) are there in ~/?
- How many lines are in the file american-english-large?
- How many words in the file american-english-small start with the letter "d"?
- How many four-letter words are in the file american-english-small?
- What is the last word in the file american-english-small?
- How many directories are there in the ~/MLclass/ directory?
- How many total files (including directories) are there in the ~/MLclass repository and all subdirectories?
- How many python files are in the ~/MLclass repository and subdirectories?
- What is the git remote "origin" url of the ~/MLclass repository?
- What is the short version of the commit ID of the most recent commit of the ~/MLclass repository?
- How many submodules are in the ~/MLclass repository?
- How many submodules are in the ~/Griddly repository?
- How many branches are in the ~/Griddly repository?
- What does the python script.py output when run?