Linux 101
Tools/Skills: Linux CLI - ls, pwd, cat, rm, cd, chmod, grep, find, history, ps aux, netstat, curl, kill
SYNOPSIS
Find all of the trolls in the system. Specific instructions were given to find each troll.
In the process of finding the trolls, I performed the following functions:
List files/directories (including hidden ones), open files, remove files, identify location in system, display command history, change directory, search for a word within the files, run a binary, change permissions, copy a file, rename a file, write to a file, make a symbolic link, use find to search by name/user/file size, list running processes, display listening ports, use 'curl' to interact with server, stop a process using 'kill'
I used the following commands in base form: ls, pwd, cat, rm, cd, chmod, grep, find, history, ps aux, netstat, curl, kill
SOLUTION
The following are the commands and results of each step of the linux 101 challenge.
find “troll” /opt/troll_den
*Note: The below code took a few attempts, because I took the instructions more literally than intended. It said to find a specific file size between two amounts that was created by trolls. I eventually decided to try to run the command without specifying the user or creator. It worked.
Once I finished this, I had to re-do it. I had been logged out, so my success hadn't been saved. I took advantage of re-doing it to cement the commands further into my memory. I also did some research when it came to the find command. I remembered last time, the command I used gave me too many results. So I received a hint from the game and asked bard a question about the asterisks that were used. Together, I understood better how to get the best results for that search.
Example Prompts:
How do I find environment variables?
How do I make a symbolic link?
What is a symbolic link?
What's the point of the asterisks? find /opt/troll_den/ -iname "*troll*"
Can you specify who a file is created by when using the find command?
Last updated