https://github.com/arkeasz/remof
my own rm command
https://github.com/arkeasz/remof
c command rm
Last synced: about 1 year ago
JSON representation
my own rm command
- Host: GitHub
- URL: https://github.com/arkeasz/remof
- Owner: arkeasz
- Created: 2025-01-29T01:29:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-18T03:43:22.000Z (over 1 year ago)
- Last Synced: 2025-02-18T04:27:28.691Z (over 1 year ago)
- Topics: c, command, rm
- Language: C
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom `rm` Implementation in C
This project is a custom implementation of the `rm` command in C, designed to provide basic file deletion functionality with additional features and improvements.
## Features
- **File Deletion:** Delete files specified by the user.
- **File Information:** Use `FileData` structure to check file type before deletion.
## Getting Started
### Prerequisites
- GCC (GNU Compiler Collection) or any C compiler.
- Basic knowledge of terminal commands.
### Installation
1. Clone the repository:
```bash
git clone https://github.com/arkeasz/remof.git
cd remof
```
2. Compile the program:
```bash
make
```
3. Run the program:
```bash
./rf file1.txt file2.txt
```
### Usage
To delete files, provide the filenames as arguments:
```bash
./rf file1.txt file2.txt
```
### Example
```bash
$ ./rf test.txt
File deleted successfully. (test.txt)
$ ./rf non_existent.txt
Error: Unable to delete the file.
```
## Contributing
Contributions are welcome! If you'd like to contribute, please follow these steps:
1. Fork the repository.
2. Create a new branch (`git checkout -b feature/YourFeature`).
3. Commit your changes (`git commit -m 'Add some feature'`).
4. Push to the branch (`git push origin feature/YourFeature`).
5. Open a pull request.