29jm / SnowflakeOS

"It is very special"
https://jmnl.xyz
MIT License
316 stars 18 forks source link

Implement more utility commands like cat, mkdir etc... #14

Open 29jm opened 3 years ago

29jm commented 3 years ago

On top of my head, the following are missing and could be implemented with the functions available in the libc right now:

xadaemon commented 3 years ago

I will give a shot at cat and rm might make for a fun challenge

29jm commented 3 years ago

@octetd actually I added a basic cat a few commits ago, but it doesn't support multiple files, e.g. cat file1 file2, maybe you could add that? As for rm I added an unlink program that literally just calls unlink (the system call), but It'd be cool to have a more proper rm, with support for its -r option.

The current unlink system call won't delete folders though, not even empty ones. I'll add an rmdir syscall, you can assume you have it (from unistd.h, see man 3 rmdir) in the mean time if you start before I push it.

xadaemon commented 3 years ago

I will hold on until you push that then and give priority to #15

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Sunday, December 20th, 2020 at 07:17, Johan Manuel notifications@github.com wrote:

@octetd actually I added a basic cat a few commits ago, but it doesn't support multiple files, e.g. cat file1 file2, maybe you could add that? As for rm I added an unlink program that literally just calls unlink (the system call), but It'd be cool to have a more proper rm, with support for its -r option.

The current unlink system call won't delete folders though, not even empty ones. I'll add an rmdir syscall, you can assume you have it (from unistd.h, see man 3 rmdir) in the mean time if you start before I push it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

GandelXIV commented 2 years ago

I will try implementing cd.

29jm commented 2 years ago

I will try implementing cd.

Excellent, let me know if I can help with anything.