LS - Unix Command

Supported Flags: -R -t -u -l -f -d -G -r -a

Reading Directories

This program uses a struct called DIR , a struct called dirent , opendir() , readdir() , and closedir() in the dirent.h library to obtain file names within a directory



Things Covered

Using readdir() system call

Calling stat struct values using lstat() within the sys/stat.h standard C library's POSIX API

Using lstat(path, &statbuf) to call meta data

Different types of files and repos within the unix filesystem

Bubble sort and Merge sort

Makdev() system call to create hex values for device drivers

Extracting permissions using lstat()

Accessing time last modified and time last accessed using system calls for file

Recursive functionality reading through the entire repo

Sorting files times using tv_msec and tv_nsec

Much more!