<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/linux-has-a-black-hole-in-it--myumcp32i" -->

---
title: Linux has a BLACK HOLE in it! | daily.dev
description: Explains what /dev/null actually is in Linux: a special character device file, not a regular file on disk, that acts as an interface to the kernel and...
canonical: https://daily.dev/posts/linux-has-a-black-hole-in-it--myumcp32i
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Linux has a BLACK HOLE in it! | daily.dev
og:description: Explains what /dev/null actually is in Linux: a special character device file, not a regular file on disk, that acts as an interface to the kernel and...
og:url: https://daily.dev/posts/linux-has-a-black-hole-in-it--myumcp32i
og:image: https://api.daily.dev/og/posts/MyUmCp32i.png
og:image:alt: Linux has a BLACK HOLE in it!
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.

# Linux has a BLACK HOLE in it!

**[typecraft](https://daily.dev/sources/typecraft)** · 2 min read · 0 upvotes · 0 comments

## Summary

Explains what /dev/null actually is in Linux: a special character device file, not a regular file on disk, that acts as an interface to the kernel and immediately discards anything written to it. Demonstrates with cat, dev/urandom redirection, and file permission flags (the 'c' type indicator) to show why the file always shows zero bytes. Covers the practical use case of redirecting unwanted command output or errors to /dev/null in bash scripts to suppress noise.

## Full article

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

## Questions this post answers

### Why does /dev/null always show zero bytes even after writing data to it?

/dev/null is a character special device file, not a regular file, so it does not store data on disk. Any data written to it is immediately discarded by the kernel interface it represents, which is why checking its size always shows zero bytes, even after piping large amounts of data from a source like /dev/urandom.

_Developers debugging shell redirection quirks can find deeper Linux explainers curated on daily.dev._

### What does the 'c' file type mean in Linux file permissions output?

The letter 'c' in the file type column of permissions output indicates a character special device, distinguishing it from 'l' for symbolic links, 'd' for directories, and a hyphen for regular files. Character devices like /dev/null act as interfaces to the kernel rather than storing data on disk.

_Anyone parsing ls output to understand file types can track more Linux fundamentals via daily.dev._

### Why do bash scripts redirect command output to /dev/null?

Bash scripts redirect output to /dev/null to suppress unwanted or error output from commands, such as an ls call on a nonexistent file, so the script runs cleanly without printing failures or noise. This is a common pattern for silencing expected errors or discarding output you don't need to see.

_Script authors refining error handling can find related bash tips through daily.dev._

## Similar posts on daily.dev

- [Linux's 'everything is a file' idea is 50 years old, and it still explains why the OS feels so different](https://daily.dev/posts/linux-s-everything-is-a-file-idea-is-50-years-old-and-it-still-explains-why-the-os-feels-so-diffe-tmf5qg45d) · XDA Developers · 3 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#shell](https://daily.dev/tags/shell), [#bash](https://daily.dev/tags/bash)

[View this post on daily.dev](https://daily.dev/posts/linux-has-a-black-hole-in-it--myumcp32i)

```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":"Linux has a BLACK HOLE in it!","url":"https://daily.dev/posts/linux-has-a-black-hole-in-it--myumcp32i","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/linux-has-a-black-hole-in-it--myumcp32i"},"datePublished":"2026-09-09T22:45:03.859Z","dateModified":"2026-09-14T08:10:38.646Z","description":"Explains what /dev/null actually is in Linux: a special character device file, not a regular file on disk, that acts as an interface to the kernel and...","image":"https://i.ytimg.com/vi/XURtvqq5ooo/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/XURtvqq5ooo/sddefault.jpg","isAccessibleForFree":true,"articleSection":"typecraft","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":"typecraft","logo":"https://media.daily.dev/image/upload/s--iVakgkBx--/f_auto/v1728807219/logos/typecraft","url":"https://daily.dev/sources/typecraft"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/linux-has-a-black-hole-in-it--myumcp32i","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,shell,bash","timeRequired":"PT2M","video":{"@type":"VideoObject","name":"Linux has a BLACK HOLE in it!","description":"Explains what /dev/null actually is in Linux: a special character device file, not a regular file on disk, that acts as an interface to the kernel and...","thumbnailUrl":"https://i.ytimg.com/vi/XURtvqq5ooo/sddefault.jpg","uploadDate":"2026-09-09T22:45:03.859Z","duration":"PT2M","url":"https://api.daily.dev/r/MyUmCp32i","embedUrl":"https://www.youtube.com/embed/XURtvqq5ooo"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"typecraft","item":"https://daily.dev/sources/typecraft"},{"@type":"ListItem","position":3,"name":"Linux has a BLACK HOLE in it!"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/linux-has-a-black-hole-in-it--myumcp32i#faq","mainEntity":[{"@type":"Question","name":"Why does /dev/null always show zero bytes even after writing data to it?","acceptedAnswer":{"@type":"Answer","text":"/dev/null is a character special device file, not a regular file, so it does not store data on disk. Any data written to it is immediately discarded by the kernel interface it represents, which is why checking its size always shows zero bytes, even after piping large amounts of data from a source like /dev/urandom. Developers debugging shell redirection quirks can find deeper Linux explainers curated on daily.dev."}},{"@type":"Question","name":"What does the 'c' file type mean in Linux file permissions output?","acceptedAnswer":{"@type":"Answer","text":"The letter 'c' in the file type column of permissions output indicates a character special device, distinguishing it from 'l' for symbolic links, 'd' for directories, and a hyphen for regular files. Character devices like /dev/null act as interfaces to the kernel rather than storing data on disk. Anyone parsing ls output to understand file types can track more Linux fundamentals via daily.dev."}},{"@type":"Question","name":"Why do bash scripts redirect command output to /dev/null?","acceptedAnswer":{"@type":"Answer","text":"Bash scripts redirect output to /dev/null to suppress unwanted or error output from commands, such as an ls call on a nonexistent file, so the script runs cleanly without printing failures or noise. This is a common pattern for silencing expected errors or discarding output you don't need to see. Script authors refining error handling can find related bash tips through daily.dev."}}]}
```

