Why do you pipe stderr of du into /dev/null?
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil.
-
No spam.
-
Posts are to be related to self-hosting.
-
Don't duplicate the full text of your blog or readme if you're providing a link.
-
Submission headline should match the article title.
-
No trolling.
-
Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
To keep the errors out and provide just the result.
One think I miss from reddit… /r/datahoarder
These were my people. I probably have 100TB but it certainly isn't in my home directory. I'm not sure if I should be immpressed or freightened.
There's !datahoarder@lemmy.world, !datahoarder@lemmy.ml, and !datahoarder@selfhosted.forum...
EDIT: spelling
Well TIL … I subscribed to the first two but the last one didn't work for some reason.
I was like "nothing wrong here" until I saw that T that my brain just refused to parse the first time.
If I was on my laptop and not my phone I would post a screenshot with a P just for you
Your username absolutely does not check out. Or your shredder is broken haha
I shred paper. ;-) After digitizing it of course. ;-)
Meanwhile here I am trying to upgrade my 512gb NVME drive to 2Tb while also still trying to afford car payments, rent and food. Rookie numbers on my part.
The most well-timed thing I ever did was buy 6 2tb NVMe drives in August last year
God help me if one fails
ZFS it
That's why there are 6. There's a pool with a hot spare. Just don't want to pay $350 or whatever to replace a $90 drive.
I'm reading the command to the tune of Du Hast
Du hast mich. Du hast mich gefragt UND ICH HAB SPEICHERPLATZ
Toller Musik Geschmack!
never saw the s argument and was curious what's the difference to d. man pages are way ahead of me ^^
--max-depth=0is the same as--summarize
So just did a couple of experiments...
sudo su -sh /home - returns permission denied errors on certain NAS subdirectories, but not a lot.
du -sh /home --summarize -returns the same errors.
du -sh --max-depth=0 - returns the same errors plus an error saying that using --max-depth=0 is the same as --summarize.
;-) for the purposes of what I was doing (creating a clip for posting) redirecting stderr to null was the best option.
But I learned a few things today, which is cool. ;-)
Pfft, the only "hoarding problem" is that storage is expensive these days!
I know, I just paid $500 for a 24TB SAS drive that was $250 just over a year ago.
Pardon my stupidity BUT why include stdout to Devnull? Why not omit and simply 'du -sh /home'
There’s probably a bunch of permissions errors, filesystems warnings for cross-filesystem mounts or links, etc. all going to stderr. Linux output streams are a bit odd, 1 is stdout and 2 is stderr. So the command is redirecting the “noise” to null and just printing the actual command output. That would be my assessment, but OP could probably give a more correct answer..!
2> means stderr.... Keeps the "can't access ...." Out of the display.
I create videos, and back up all of my raw footage. I make weekly videos, and the size ranges from 50GB up to 500GB or more. I have 105TB available, 90TB used at the moment. I also have a fully redundant set of another 105TB. My employer has unfortunately made it very easy to justify hoarding, as they'll sell me reputable used commercial drives for $10/TB.
The video archives are 53TB
TubeArchivist is 19TB
Legally acquired movies and TV is 10TB
Immich is 2TB
Those are the main users of data. A bunch of other folders are using anywhere from a gig to 500GB, but those are basically rounding errors.
How often did you need a raw video older than one year?
I don't need a raw video older than a day after the video is finished. I also don't need TBs of legally acquired content. I also don't need TBs of archived YouTube videos. I don't really need a NAS. I don't need a phone. We don't really need any of this tech stuff actually.
To answer your question more seriously, they're nice to have sometimes, instead of having to re-edit finished videos to make a compilation or something. I'm also hoping that maybe I'll see some success some day and be able to hire a more skilled editor (or even just me from the future with improved skills) to turn old media into feature-length films or just better versions of what I released. I dunno. It's data hoarding, but when I do want it, it's super nice to have.
I've also seen multiple professional creators talk about regretting not keeping the original footage from their old videos, so I'm not making that mistake. It's just nice to have it if you ever do want it, and I have the skills to archive it myself on the cheap, as compared to paying something like BackBlaze $7/TB/mo.
Just checked and my average video this year is currently at 400GB, so that's $4*2 for redundancy, so $8 per week aka $35/mo. If it were in BackBlaze, my subscription fee would go up by $12 per month forever, and it'd currently be at $630/mo, with zero redundancy. When I frame it like that, I'd be a fool not to do it!
Is there any advantage of using du over df for this?
Someone may eventually write CLI programs called hast and mich that you can somehow usefully pipe to it
Now that’s a good idea
I gotten used to dust instead of du because it has much nicer visual representation.
df only shows partitions, whereas du adds up the file sizes in the directory you specify.
So, in particular, if you want to find out what's taking up so much space, you can repeatedly run du -sh * and cd into the largest directory.
What he said. DF won't take into account the contents of mount points within a directory.
Or you run ncdu and save some keystrokes.
What he said. DF won't take into account the contents of mount points within a directory.
What he said. DF won't take into account the contents of mount points within a directory.
What he said. DF won't take into account the contents of mount points within a directory.
Yeah it lets you have time to get some tea while it works.