How to use the Linux cat command to read the contents of a folder. This is a cool trick.

This is a neat trick that allows you to use cat to view the contents of a directory. This library is loaded before the cat command is executed and modifies its behavior to allow you to use cat to list a directory. #include <unistd.h> #include <stdio.h> #include <dirent.h> #include <string.h> #include <stdlib.h> #include <sys/types.h> #include … Read more