/dev/null: Difference between revisions
Jump to navigation
Jump to search
(Created blank page) |
No edit summary Tag: Reverted |
||
Line 1: | Line 1: | ||
[[/dev/null]] is a Linux null device file. It (in [[Chaz Wiki:Manual of Style|simplification]],) is a kind of hack to throw files to go down a server | |||
<sup>[https://www.digitalocean.com/community/tutorials/dev-null-in-linux <nowiki>[1]</nowiki>]</sup>. | |||
Let’s take a look at understanding what it means, and what we can do with this file. | |||
=Properties= | |||
This will return an End of File (EOF) character if you try to read it using the cat command. | |||
<code>cat /dev/null</code> | |||
This is a ''valid'' file: | |||
<code>stat /dev/null</code> | |||
This gives me an output of... | |||
<code> | |||
File:/dev/null | |||
Size:0 Blocks:0 IO Block:4096 character special file | |||
Device:6h/6d Inode:5 Links:1 Device type:1,3 | |||
Access:(0666/crw-rw-rw-) Uid:( 0/ root) Gid:( 0/ root) | |||
Access:2020-02-04 13:00:43.112464814 +0530 | |||
Modify:2020-02-04 13:00:43.112464814 +0530 | |||
Change:2020-02-04 13:00:43.112464814 +0530 | |||
</code> |
Revision as of 17:12, 18 April 2025
/dev/null is a Linux null device file. It (in simplification,) is a kind of hack to throw files to go down a server [1]. Let’s take a look at understanding what it means, and what we can do with this file.
Properties
This will return an End of File (EOF) character if you try to read it using the cat command.
cat /dev/null
This is a valid file:
stat /dev/null
This gives me an output of...
File:/dev/null
Size:0 Blocks:0 IO Block:4096 character special file
Device:6h/6d Inode:5 Links:1 Device type:1,3
Access:(0666/crw-rw-rw-) Uid:( 0/ root) Gid:( 0/ root)
Access:2020-02-04 13:00:43.112464814 +0530
Modify:2020-02-04 13:00:43.112464814 +0530
Change:2020-02-04 13:00:43.112464814 +0530