Skip to content

OsamaRab3/system-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

System Programming with C

This repository contains implementations of various Linux commands using the C programming language. It serves as a practical guide and reference for understanding system programming concepts and how to interact with the Linux operating system through C code.

Table of Contents

Introduction

System programming involves developing software that directly interacts with the underlying hardware and operating system. In this repository, we explore Linux system calls and commands implemented in C to gain a deeper understanding of how operating systems function at a low level.

Features

  • Implemented Linux commands:

  • ls: List directory contents.

  • cp: Copy files

  • rmdir: Remove empty directories.

  • rm: Remove files

  • cat: Concatenate files and print on the standard output.

  • grep: Print lines matching a pattern.

  • pwd: Print name of current/working directory.

  • echo: Display a line of text.

  • nano: Terminal-based text editor

  • touch: Create new empty files.

  • wc: Count words, lines, and characters in files

  • mkdir: Creates a new directory.

  • date: Display the current date and time

  • sleep: Pause the execution of a program for a specified number of seconds.

  • chmod: Changes the permissions of a file or directory to the specified mode.

  • uname: Get basic information about the OS

  • clear: Clear terminal

Installation

To run the programs in this repository, you'll need a Linux environment with a C compiler installed, such as GCC.

  1. Clone this repository:
    git clone https://github.com/OsamaRab3/system-programming.git
    
  2. Navigate to the repository directory:
        cd system-programming
  3. Compile the programs:
        gcc program_name.c -o program_name
    

Usage

To use any of the implemented commands, follow these steps:

  1. Example:
        gcc ls.c -o Ls
        ./Ls 
  2. Example:
        gcc cat.c -o cat
        ./cat file.text
    

Contributing

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Create a new Pull Request.

About

Implementing fundamental Linux commands using C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published