Join Nostr
2026-03-23 17:44:20 UTC
in reply to

Listens to Baroque while coding murder.exe :newt: on Nostr: >GNU Cat actually performs better than Busybox Cat because it does actual buffering ...

>GNU Cat actually performs better than Busybox Cat because it does actual buffering and mmap trickery so it can handle large files better.

Or they could just

```
for(int i = 1; i < argc; i++) {
struct stat st;
stat(argv[i], &st);
int fd = open(argv[i], O_RDONLY);
sendfile(stdout, fd, NULL, st.st_size);
close(fd);
}
```

Here. That's the entire cat for you, give or take error handling.