u/-Winnd

Please review my "safe rm" tool written in C

Please review my "safe rm" tool written in C

Hello guys,

What I made is basically a simple alternative to the rm command, but instead of permanently deleting files, it moves them to a trash directory so they can be recoverd later, my project was inspired by trash-cli, a cli tool that does basically the same thing.

this is still a work in progress, and i still want to implement a few more thins. i m also sure there are parts of the code that could be improved a lot.

i would really appreciate any feedback or suggestions.

repo: https://github.com/wiirios/trash-rm

thx for taking the time to check it out, and please feel free to roast it ;)

u/-Winnd — 7 days ago

I started reading the Dragon Book and in the compilation section I understand that every variable is necessarily stored in a memory register (obviously) through an assembly instruction, but I wanted to understand the following: if any variable I create is already stored in the computer's memory (if it's used), why in some cases, such as when using a struct, do I have to use malloc? Like, isn't the compiler already doing that?

reddit.com
u/-Winnd — 16 days ago