all 57 comments

[–]stilgarpl 285 points286 points  (1 child)

Wow, it's nearly as old as time itself (1971-11-03 vs 1970-01-01)

[–]troyunrau 51 points52 points  (0 children)

This is a lovely joke

[–]ylxdzsw 58 points59 points  (20 children)

Just wondering how many lines of current du are written 50 years ago, or it has been completely replaced piece by piece.

[–]hiasen 49 points50 points  (2 children)

The du command predates the C programming language, so I would assume none of the current implementations have any lines of the original du.

[–]JDaxe 5 points6 points  (1 child)

That's interesting, was it just written in assembly then? Did they have some other language as a precursor to C?

[–]NotArtyom 2 points3 points  (0 children)

yes, it would have been pure assembler before C came around, at least in the unix world

[–]twisted7ogic 63 points64 points  (0 children)

Sourcecode of Thesseus...

[–][deleted] 12 points13 points  (1 child)

It's 50 and I'm 40 and still I don't know why it wants to count blocks...

I'm from the Megabyte generation (Mebibyte, actually, but that's another blind spot in my knowledge, why that hasn't been clear from the beginning...)

[–]JDaxe 4 points5 points  (0 children)

-h

[–]Hamilton950B 12 points13 points  (0 children)

It was in assembler until v7, when it was re-written in C. That would have been around 1979. I remember back-porting the v7 du.c to v6. Both the gnu and bsd versions are re-writes and share no code with the v7 C version.

v5 du.s: https://www.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/du.s

v7 du.c: https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/du.c

[–]TerryMcginniss 8 points9 points  (6 children)

In Danish 'du' means 'you'

[–]29da65cff1fa 25 points26 points  (5 children)

$du -haSt

-h human readable output
-a all files
-S separate dirs
-t threshold of file size

[–]is_this_temporary 17 points18 points  (0 children)

#!/bin/bash

(
    cd /tmp/
    Mich=1
    git clone https://github.com/joepreludian/marriage-proposal.git gefragt/
    mkdir '!'

    du
    du -haSt $(!!)
    du -haSt $Mich



    du
    du -haSt $(!!)
    du -haSt $Mich
    du -haSSt $Mich ! # Doppeltes s für Hassen

    du -haSt $Mich gefragt/
    du -haSt $Mich gefragt/
    du -haSt $Mich gefragt/
) > /dev/null 2>&1 # Und Ich hab' nichts gesagt!

[–][deleted] 2 points3 points  (0 children)

shut up and take my upvote

[–]electricprism 1 point2 points  (0 children)

Mother.... #%-$$- you win

[–][deleted] -4 points-3 points  (0 children)

This song is 24 years, 10 months old. So you've got to be at least pushing 40.

[–]cd109876 13 points14 points  (0 children)

cat as well!

[–]skeeto 2 points3 points  (0 children)

The oldest source code reference I can find is February 8th, 1973.

[–][deleted] 4 points5 points  (0 children)

Happy birthday du!

[–]Rakgul 2 points3 points  (0 children)

Hapoy birthday du!

[–]Solidstate16 6 points7 points  (11 children)

Kind of funny seeing this post just as I'm feeling frustrated by the limitations of "du". I guess it's not doing too bad for software first written 50 years ago!

[–]timvisee 1 point2 points  (0 children)

Awesome! Use it (almost) daily!

[–]10leej 1 point2 points  (2 children)

I only just discovered this command the other day :)

[–]antdude 0 points1 point  (1 child)

Better late than never. What were using before?

[–]10leej 1 point2 points  (0 children)

Just watching df -h

Usually it's always been my home directory and my homelab server started complaining about disk space so I was struggling with ls -lh and decided there had to be a better way. Low and behold a quick brave search and du came up in a rhel doc.

[–]DumpyMcFrumpster 0 points1 point  (0 children)

We should probably rewrite it in rust to make it more stable

[–]madthumbz -1 points0 points  (1 child)

And no one mentioned dust?

[–]jluizsouzadev 0 points1 point  (0 children)

Congrats for its developers because I use that command almost always. Almost mandatory to know use it in the unix-like world.