Required
ex00. z
Create a file containing the letter “Z”
echo "Z" > z
ex01. testShell00
Create a file called testShell00, then make it 40 bytes long. The easiest way to do that to fill it with 40 ASCII characters like digits or letters.
424242424242424242424242424242424242424
Now we also need to match the permissions using the chmod command, which works as follows:
chmod 445 testShell00
Refer to https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/how-permissions-chmod-with-numbers-command-explained-777-rwx-unix to know how to set the number, each digit is essentially calculated.
To match the timestamp, we can use:
touch -d "1 Jun 2026 23:42" testShell00
Then create a tar using
tar -cf testShell00.tar testShell00
and remove the original testShell00, leave only testShell00.tar
ex02. Oh yeah, mooore…
Similar process to ex01 with the permissions and timestamps, the only exception is that test0 and test2 are directories, test5 is a hard link to test3, and test6 is a symbolic link pointing to test0.
Think of a symbolic link as a shortcut, what is put into test6 goes into test0 and vise versa. A hard link is similar, but differs in how it is stored.
DON'T FORGET TO MAKE THE FILES THE RIGHT SIZE! If you want a 1 byte file you need to do:
printf "a" > file.name
Replace file.name with your file's name.
To give symlinks a new timestamp you need to add the -h attribute to the touch command
To create the symlink:
ln -s test0 test6
and to create the hardlink:
ln test5 test3
Please make sure to do it in this order to avoid messing it up:
- Create files, folders, links
- Change timestamps
- Change permissions
For reference, I also made this shell script that you can use:
#!/bin/bash
# This script creates the notoriously tedious exo2.tar file for Shell00
# because running these commands by hand is hell
# STEP 0: Create sandbox so we don't suck in unintended files
mkdir exo2
cd exo2
# STEP 1: Create all files, dirs and links
mkdir test0
mkdir test2
printf "XXXX" > test1
printf "X" > test3
printf "XX" > test4
ln -s test0 test6
ln test3 test5
# STEP 2: Set timestamps
touch -d "1 Jun 2026 20:47" test0
touch -d "1 Jun 2026 21:46" test1
touch -d "1 Jun 2026 22:45" test2
touch -d "1 Jun 2026 23:44" test3
touch -d "1 Jun 2026 23:43" test4
touch -d "1 Jun 2026 23:44" test5
touch -h -d "1 Jun 2026 22:20" test6
# STEP 3: Set all permissions
chmod 404 test3
chmod 404 test5
chmod 714 test1
chmod 715 test0
chmod 504 test2
chmod 641 test4
# STEP 4: tar it all up
tar -cf ../exo2.tar *
# STEP 5: Exit sandbox
cd ..
Remember that you should only upload exo2.tar and nothing else in ex02 otherwise Moulinette might complain (I can't tell you for sure)
ex03: id_ed25519_pub
Using ssh-keygen, you can generate SSH keys. These always come with a private and public keypair.
ssh-keygen -t ed25519
Leave the default values for all 3 prompts by just leaving them empty and now your public key file is in ~/.ssh/id_ed25519.pub, copy it to your ex03 folder, rename and you’re done.
ex04: midLS
The command is:
ls -tmp
and that’s because:
-tsorts by time; newest first-madds commas to the list-padds the / to directory names
These flags can be found in the man page for ls, which can be opened by running
man ls
ex05: GiT commit
This goes into git_commit.sh
#!/bin/bash
git log -5 --format="%H"
#!/bin/bashis the shebang, it tells the shell what this script is designed to run with, in this case bashgit logshows the commit log-5limits it to 5 entries—format=”%H”makes git only show the full commit hash (%H is a placeholder that tells git to show the full hash)
These flags can be found in git man pages. You can also open man pages for sub-commands like git log sometimes, for example
man git logs
Finally to make the script executable, chmod +x git_commit.sh