Project done during Full Stack Software Engineering studies at ALX AFRICA SE School. It aims to learn about how to handle files (open, close, read and write), file descriptors, system calls and file permissions in C language.
- C files are compiled using
gcc
- Tested on Ubuntu 20.04 LTS
All of the following files are programs written in C:
Filename | Description |
---|---|
0-read_textfile.c |
Reads a text file and prints it to the POSIX standard output |
1-create_file.c |
Creates a file |
2-append_text_to_file.c |
Appends text at the end of a file |
3-cp.c |
Copies the content of a file to another file |
100-elf_header.c |
Displays the information contained in the ELF header at the start of an ELF file |
- Look for the right source of information online
- How to create, open, close, read and write files
- What are file descriptors
- What are the 3 standard file descriptors, what are their purpose and what are their POSIX names
- How to use the I/O system calls open, close, read and write
- What are and how to use the flags O_RDONLY, O_WRONLY, O_RDWR
- What are file permissions, and how to set them when creating a file with the open system call
- What is a system call
- What is the difference between a function and a system call
- Write a function that reads a text file and prints it to the POSIX standard output.
- Create a function that creates a file.
- Write a function that appends text at the end of a file.
- Write a program that copies the content of a file to another file.
- Write a program that displays the information contained in the ELF header at the start of an ELF file.
- Prince Solomon - princexz
All work contained in this project was completed as part of the curriculum for ALX Africa SE. ALX Africa is an online full-stack software engineering program that prepares students for careers in the tech industry using project-based peer learning. For more information, visit this link.