Linux Jedi Challenge



1docker run --rm -it

Level 1

I created 22 bad files in your home directory (/root/). Delete them.
(The files are in the container, not in your real computer, don’t worry.)

Do NOT delete these files: a, b, c, db-backup, .ssh_config.


1find /root/ -type f -regextype posix-extended \
2  -not -regex '^[^/]*/(\.profile|\.bashrc|\.ssh_config|[abc]|db-backup)$' -delete

Level 2

I created 22 bad files in /level2/.
Some contain the word “virus” in their data, and the others contain “spam”.
Move the “virus” files to /level2/virus/, but don’t rename them.
Leave the “spam” files alone.


1grep -FZls 'virus' /level2/* | xargs -0 mv -t /level2/virus/