Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSEShell

This is a simple, custom shell for Unix-based systems, designed to provide an interface for executing system programs. This project includes a basic shell implementation, a set of system programs (find, ld, ldr), and some test files.
This project is done with powerpony and BoweiDu01.

Directory Structure

The project is organized as follows:

  • bin/ - Contains compiled executables for system programs.
    • find - Program to find files.
    • ld - Program for listing the contents of the current directory.
    • ldr - Program for listing the contents of the current directory recursively.
  • cseshell - The main executable for the CSEShell.
  • files/ - Contains various test files used with the shell and system programs.
    • combined.txt, file1.txt, file2.txt, ... - Test text files.
    • notes.pdf - A PDF file for testing.
    • ss.png - An image file.
  • makefile - Makefile for building the CSEShell and system programs.
  • source/ - Source code for the shell and system programs.
    • shell.c and shell.h - Source and header files for the shell.
    • system_programs/ - Source code and header for the system programs.

Building the Project

To build the CSEShell and system programs, run the following command in the root directory:

make

This will compile the source code and place the executable files in the appropriate directories.

Running CSEShell

After building, you can start the shell by running:

./cseshell

From there, you can execute built-in commands and any of the included system programs (e.g., find, ld, ldr).

System Programs

  • find.c - Searches for files in a directory.
  • ld.c - List the contents of the curent directory.
  • ldr.c - List the contents of the current directory recursively.

Each program can be executed from the CSEShell once it is running. This starter code only allows the shell to execute a command once before exiting because execv replace the entire process' address space. Students need to fix this and allow the shell to prompt for more commands in Programming Assignment 1.

Files Directory

The files/ directory contains various text, PDF, and image files for testing the functionality of the CSEShell and its system programs.

Makefile

The Makefile contains rules for compiling the shell and system programs. You can clean the build by running:

make clean

Source Directory

Contains all the necessary source code for the shell and system programs. It is divided into the shell implementation (shell.c, shell.h) and system programs (system_programs/).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages