<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/write-your-own-ls-dir-listing-in-c--jz5a963d0" -->

---
title: Write your own ls (dir listing in C) | daily.dev
description: Patreon ➤ https://www.patreon.com/jacobsorber Courses ➤ https://jacobsorber.thinkific.com Website ➤ https://www.jacobsorber.com --- Write your own ls (dir...
canonical: https://daily.dev/posts/write-your-own-ls-dir-listing-in-c--jz5a963d0
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Write your own ls (dir listing in C) | daily.dev
og:description: Patreon ➤ https://www.patreon.com/jacobsorber Courses ➤ https://jacobsorber.thinkific.com Website ➤ https://www.jacobsorber.com --- Write your own ls (dir...
og:url: https://daily.dev/posts/write-your-own-ls-dir-listing-in-c--jz5a963d0
og:image: https://api.daily.dev/og/posts/Jz5a963d0.png
og:image:alt: Write your own ls (dir listing in C)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Write your own ls (dir listing in C)

**[Jacob Sorber](https://daily.dev/sources/jacobsorber)** · 5 min read · 0 upvotes · 0 comments

## Summary

Patreon ➤ https://www.patreon.com/jacobsorber
Courses ➤ https://jacobsorber.thinkific.com
Website ➤ https://www.jacobsorber.com
---
Write your own ls (dir listing in C) // Listing the contents of a directory. We do it every day, but many have never done it from a C program. So, that's what we're doing in this video. 

***

Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.

About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab. 

More about me and what I do:
https://www.jacobsorber.com
https://people.cs.clemson.edu/~jsorber/
http://persist.cs.clemson.edu/

To Support the Channel:
+ like, subscribe, spread the word
+ contribute via Patreon --- [https://www.patreon.com/jacobsorber]

Source code is also available to Patreon supporters. --- [https://jsorber-youtube-source.herokuapp.com/]

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=JZgu666U78w>

---

[View this post on daily.dev](https://daily.dev/posts/write-your-own-ls-dir-listing-in-c--jz5a963d0)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Write your own ls (dir listing in C)","url":"https://daily.dev/posts/write-your-own-ls-dir-listing-in-c--jz5a963d0","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/write-your-own-ls-dir-listing-in-c--jz5a963d0"},"datePublished":"2026-09-29T14:03:59.564Z","dateModified":"2026-09-29T15:51:45.182Z","description":"Patreon ➤ https://www.patreon.com/jacobsorber\nCourses ➤ https://jacobsorber.thinkific.com\nWebsite ➤ https://www.jacobsorber.com\n---\nWrite your own ls (dir...","image":"https://i.ytimg.com/vi/JZgu666U78w/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/JZgu666U78w/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Jacob Sorber","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Jacob Sorber","logo":"https://media.daily.dev/image/upload/s--DYmm6K_p--/f_auto/v1710506159/logos/jacobsorber","url":"https://daily.dev/sources/jacobsorber"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/write-your-own-ls-dir-listing-in-c--jz5a963d0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"","timeRequired":"PT5M","video":{"@type":"VideoObject","name":"Write your own ls (dir listing in C)","description":"Patreon ➤ https://www.patreon.com/jacobsorber\nCourses ➤ https://jacobsorber.thinkific.com\nWebsite ➤ https://www.jacobsorber.com\n---\nWrite your own ls (dir...","thumbnailUrl":"https://i.ytimg.com/vi/JZgu666U78w/sddefault.jpg","uploadDate":"2026-09-29T14:03:59.564Z","duration":"PT5M","url":"https://api.daily.dev/r/Jz5a963d0","embedUrl":"https://www.youtube.com/embed/JZgu666U78w"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Jacob Sorber","item":"https://daily.dev/sources/jacobsorber"},{"@type":"ListItem","position":3,"name":"Write your own ls (dir listing in C)"}]}
```

