Author: saygwagwa

  • Linux File Manipulation and Archiving

    Challenge:

    The challenge involved executing fundamental Linux file and directory manipulation tasks using command-line
    interface tools (CLI), including creation, moving, and deletion. Additionally, the objective was to master creating
    and manipulating archives using the tar command, including applying compression techniques.

    My Role & Actions:

    As the system operator, my actions focused on demonstrating proficiency in file system
    operations and data archiving using core shell utilities:

    • File and Directory Management: Executed commands to copy files, such as copying `/etc/passwd` to
      `mot_de_passe`. Created and listed new directories using `mkdir` and various options of `ls` (including
      listing all files with `-a`, detailed format with `-l`, and indicating file types with `-F`). Files were
      moved and renamed using `mv`, and selectively removed using `rm`.

    • Text Filtering and Utilities: Utilized powerful text processing utilities such as `head` and `tail` to
      view file content extremities. Employed `grep` to filter file content based on patterns (e.g., finding
      HTTP/HTTPS services or lines without comments using `-v`). Used `sort` to organize content (e.g.,
      `etudiants.txt`) and `cut` to extract specific columns or characters from delimited data (e.g.,
      `notes.csv`).

    • Archive Creation and Inspection: Saved files into an uncompressed archive located in `/tmp` using `tar
      -cvf`. Inspected the contents of the archive (`sauve.tar`) using `tar -tvf`. The archive initially stored
      the full path of files, excluding the starting /.

    • Restoration and Compression: Restored deleted files from the uncompressed archive. Created a compressed
      archive (`sauvebis.tar.gz`) using the `-z` option (gzip) and relative paths. Subsequently decompressed and
      restored the files from the compressed archive back into the home directory.

    Solution & Outcome:

    The practical exercises successfully demonstrated comprehensive file and directory lifecycle management within the
    Linux environment. Mastery of essential command-line tools for file processing (`grep`, `sort`, `cut`) was
    established through successful data manipulation tasks. The primary outcome in archiving involved the ability to
    reliably create, inspect, and restore both compressed and uncompressed archives, validating that restored files,
    such as `.profile`, returned to their intended location.

    Key Skills Demonstrated:

    • Linux File and Directory Management (cp, mv, rm, mkdir, ls).

    • Archive Creation and Manipulation (tar, including compression via z).

    • Input/Output Utilities (head, tail, grep, wc).

    • Data Filtering and Sorting (cut, sort).

    • Shell Scripting Fundamentals (implicit use of shell operators and commands).

  • Linux Filesystems & Searching Find and Autocompletion

    Challenge:

    The core challenge involved increasing efficiency within the Linux Command Line Interface (CLI) by mastering two
    critical functions: rapidly executing commands and navigating paths using autocompletion, and performing complex
    file system searches using the powerful find command. This required the ability to locate files based
    on multiple criteria, such as name, type, size, and date, across a large directory hierarchy.

    My Role & Actions:

    I engaged in various configuration and command-line operations to demonstrate control over the filesystem and shell
    behavior:

    • Autocompletion Practice: Tested command autocompletion (e.g., typing `c` or `da` followed by the Tab key)
      and utilized path autocompletion to quickly navigate to the user directory (`cd /home/guest/`).

    • Basic Search: Used the find command with both absolute and relative paths to display
      the full file structure recursively.

    • Name-Based Search: Executed searches targeting files by their exact name (e.g., `README`) and used
      wildcards (jokers) to find patterns (e.g., `*.png`).

    • Type-Based Search: Differentiated search results by specifying file type, locating only directories
      (`-type d`) or ordinary files (`-type f`).

    • Attribute-Based Filtering: Filtered results based on file size (e.g., files larger than 100 kilobytes,
      `-size +100k`) and modification date (`-mtime +5`).

    • Complex Logic: Applied advanced searching using exclusion (negation `!`, e.g., excluding files ending in
      `.png`) and logical operators (e.g., searching for files smaller than 100K AND named `README`; searching for
      files named ‘f’ OR `README` using `-o`).

    • Action Execution: Used the `-exec` predicate to execute the ls -lh command on the resulting
      files found by the search criteria (e.g., listing the detailed characteristics of all files named `README`).

    Solution & Outcome:

    The successful execution of the tasks confirmed proficiency in navigating and querying the Linux filesystem
    efficiently. Command and path autocompletion significantly reduced typing effort and increased accuracy during
    configuration. By mastering the find utility, I successfully performed highly granular searches based
    on combinations of attributes (name, type, size) and executed chained commands on the results. This competence is
    foundational for effective maintenance and administrative scripting in a Linux environment.

    Key Skills Demonstrated:

    • System Administration & Automation

    • Linux Shell Proficiency

    • File System Searching and Indexing (find command)

    • Command and Path Autocompletion

    • Using Wildcards and Logical Operators for Filtering.

  • Linux Shell Commands Redirections & Wildcards

    Challenge:

    The primary challenge was mastering essential Linux shell functionalities to manipulate input, output, and error
    streams, efficiently process text data, and use pattern matching (wildcards) for powerful file and command
    management. This involved understanding how special shell characters control the flow of data between commands and
    files in a command-line interface (CLI).

    My Role & Actions:

    I operated within a Linux environment to execute precise data flow and file pattern matching commands:

    • Standard Output Redirection: Used the `>` operator to redirect the output of commands (`cal`, `date`) to a
      file, overwriting existing content.

    • Output Appending: Employed the `>>` operator to add the output of a command (`date`) to the end of an
      existing file without deleting its contents.

    • Error Redirection: Utilized the `2>` operator to specifically redirect standard error messages (e.g., from a
      failing `cut` operation on a nonexistent file) into a separate log file (`erreurs.log`).

    • Stream Merging: Used the `2>&1` syntax to combine both standard output and standard error into a single
      destination file (`sio1.txt`).

    • Piping & Filtering: Implemented pipelines (`|`) to chain commands together, using the output of one command
      as the input for the next. This was demonstrated using commands like `sort` and `tail` on system files
      (e.g.,
      `/etc/services`).

    • Data Processing Chain: Executed a multi-step process using `cut`, `sort`, and `uniq` to extract a list of
      names from a CSV file, sort the resulting list, and eliminate duplicate entries (`avecdoublons` to
      `sansdoublons`).

    • Wildcard Usage (Jokers): Demonstrated pattern matching using jokers like `*` (matching any sequence of
      characters), `?` (matching a single character), and character ranges (e.g., `[w-z]` or `[!a-v]`) within `ls`
      commands to select files based on criteria.

    • Character Protection: Employed the backslash (`\`) and quotation marks (`’ ‘`, `” “`) to protect special
      shell characters (such as `#` or interpreting the variable `$HOME`) from being processed by the shell as
      commands or variables.

    Solution & Outcome:

    The practical work confirmed the ability to precisely control program output and input streams, a fundamental
    requirement for efficient system administration and scripting. Successfully manipulating large text outputs (like
    password files or service lists) using pipelines (`cut`, `sort`, `uniq`) proved command proficiency for data cleanup
    and analysis. Furthermore, the correct application of wildcards demonstrated skill in rapidly locating and managing
    files based on complex naming patterns, while protection characters ensured the integrity of file names containing
    special symbols.

    Key Skills Demonstrated:

    • Linux Shell Scripting & Automation

    • Input/Output Redirection (`>`, `>>`, `2>`, `2>&1`)

    • Piping (`|`) and Text Filtering Utilities (`sort`, `cut`, `uniq`, `grep`)

    • Wildcards and Pattern Matching

    • Command-Line Interface (CLI) Proficiency.

  • Debian Server Network Integration

    Challenge:

    Setting up and integrating a new Debian server from scratch using exclusively the command line, without a graphical
    interface. The primary challenge was ensuring seamless network communication within a multi-machine environment and
    establishing remote access for ongoing management.

    My Role & Actions:

    As the system administrator, I took on the task of configuring the core network functionalities. This
    involved:

    • Precisely configuring network interfaces for two virtual machines to ensure they were properly
      interconnected on the same internal network.

    • Establishing communication between the virtualized environment and the physical network using bridged
      access.

    • Initiating the installation of an SSH server to enable secure, command-line based remote configuration and
      management.

    • Utilized essential command-line tools for configuration (e.g., editing /etc/network/interfaces, /etc/hosts,
      /etc/resolv.conf) and verification (e.g., ping, ss) to ensure correct network setup and troubleshoot
      connectivity.

    Solution & Outcome:

    The project successfully achieved the fundamental network integration of the Debian server, enabling full
    communication capabilities within the configured environment. While the SSH server installation was initiated for
    future remote access, the core network setup was fully functional, laying the groundwork for further server
    deployment and management.

    Key Skills Demonstrated:

    Linux Network Configuration, Command-Line Interface (CLI), Virtualization (VMware/VirtualBox implicitly), Network
    Troubleshooting, System Integration, SSH setup, ip command, ss command.