> For the complete documentation index, see [llms.txt](https://42-guide.gitbook.io/42-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://42-guide.gitbook.io/42-guide/piscine-life/shell00.md).

# Shell00

#### **Shell 00 Module Overview**

The **Shell 00** module is part of the **C Piscine** curriculum at 42, designed to introduce you to the fundamentals of shell scripting and command-line operations in a Unix-like environment. This module consists of a series of exercises that progressively increase in difficulty, helping you build a strong foundation in using the shell effectively.

Through these exercises, you will learn essential skills such as file manipulation, permissions management, SSH key generation, Git usage, and more. Each exercise is carefully crafted to reinforce your understanding of key concepts while encouraging you to explore and experiment with shell commands.

***

#### **Exercises Breakdown**

Below is a summary of the exercises you will work on, along with the key skills and concepts you will learn:

1. **Exercise 00: Z**
   * **Task**: Create a file named `z` that displays the letter 'Z' followed by a newline when using the `cat` command.
   * **Learning Outcome**: Understand basic file creation and output redirection in the shell.
2. **Exercise 01: testShell00**
   * **Task**: Create a file with specific permissions and attributes, then package it into a `.tar` file.
   * **Learning Outcome**: Learn about file permissions (`chmod`), ownership, and how to create `.tar` archives.
3. **Exercise 02: Oh yeah, mooore...**
   * **Task**: Create a set of files and directories with specific permissions and symbolic links, then package them into a `.tar` file.
   * **Learning Outcome**: Gain experience with advanced file permissions, symbolic links, and directory structures.
4. **Exercise 03: SSH me!**
   * **Task**: Generate an SSH key pair and add the public key to your repository.
   * **Learning Outcome**: Understand SSH key generation, the difference between public and private keys, and how to use them for secure authentication.
5. **Exercise 04: midLS**
   * **Task**: Write a command that lists files and directories (excluding hidden files) in a specific format, sorted by modification date.
   * **Learning Outcome**: Learn how to use `ls` with advanced options and format output using shell commands.
6. **Exercise 05: GiT commit**
   * **Task**: Create a shell script that displays the IDs of the last 5 Git commits.
   * **Learning Outcome**: Gain experience with Git commands and shell scripting.
7. **Exercise 06: gitignore**
   * **Task**: Write a shell script that lists files ignored by Git.
   * **Learning Outcome**: Understand how `.gitignore` works and how to identify ignored files in a repository.
8. **Exercise 07: diff**
   * **Task**: Create a file that, when compared with another file using `diff`, produces a specific output.
   * **Learning Outcome**: Learn how to use the `diff` command and understand file comparison in Unix.
9. **Exercise 08: clean**
   * **Task**: Write a command to find and delete temporary files (e.g., files ending with `~` or starting and ending with `#`).
   * **Learning Outcome**: Master the `find` command and learn how to clean up directories efficiently.
10. **Exercise 09: Illusions, not tricks, Michael...**
    * **Task**: Create a magic file that detects files containing the string "42" at the 42nd byte.
    * **Learning Outcome**: Learn about the `file` command and how to create custom magic files for file type detection.

***

#### **Key Takeaways**

By completing the **Shell 00** module, you will:

* Develop a solid understanding of basic and advanced shell commands.
* Learn how to manage file permissions and ownership.
* Gain experience with Git, SSH, and shell scripting.
* Build confidence in navigating and manipulating the Unix file system.

This module is an excellent starting point for anyone looking to master the command line and prepare for more advanced topics in software development and system administration.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://42-guide.gitbook.io/42-guide/piscine-life/shell00.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
