Live data from Hacker News

Tips on how to structure your home directory (2023)

unixdigest.com

131–140 of 172 posts

Re: Tips on how to structure your home directory (2023)

#132

I wish every OS had a space that is only and truly my space. No predefined directories, no config files that I did not put there myself, and no app should ever create files or directories there. I settled a very long time ago to organize all my own data into projects under /proj and an alias `cdp` for `cd /proj`. That was what decades ago my colleagues were doing, and it has worked well for me ever since. I appreciat…

I would say that ~/Documents is pretty good here. The only trouble I have had is it being the default save location of some apps. But I haven't had something yet write there without any explicit action.

Re: Tips on how to structure your home directory (2023)

#135
post #49

Earlier quoted context omitted.

Pro tip: don't put your stuff in your $HOME directory. $HOME is for applications to pollute. Put your stuff literally anywhere else.

I can’t tell if this is sarcasm or not. $HOME is the one directory which belongs to the user. In some cases, it might even be encrypted with a user-owned key. I can’t imagine being comfortable putting my files anywhere _outside_ of the home directory. That feels like going back to the DOS / Win3.x days where hard drives were the wild west.

It's not sarcasm. It's a pro tip which makes your life easier.

Also $HOME is a system directory, and it belongs to your operating system (.bashrc and such), also to your DE, also about every program and standard that I am aware of claims it for itself to use (freedesktop and such).

Re: Tips on how to structure your home directory (2023)

#136

Earlier quoted context omitted.

That's only two applications to configure though.

The `~` path (and `cd` with no arguments, to get there) are also part of the prime real estate. It's as if these polluters think you'll enjoy accessing their stuff via `~/ ` which might or might not be true.

[deleted]

Re: Tips on how to structure your home directory (2023)

#137
post #50

I actually have quite a simple structure that serves me well (your mileage might vary) projects/ 2023/ 2024/ 0000-something/ 0312-other-project/ 0419-hn-comment/ each year I make a year folder. And each project has a month + day prefix. Sometimes I want long term projects to pop up on top, so I prefix them with 0000 (or only make the day 00). It is simple, works on any OS. Although on Linux I do have some helper scri…

I do something similar for relevant folders, where I organize by time.

I have a top level dir where I usually have what I'm working on at the moment - think "this day" or "this week".

When it's time to archive it, outside that time window, I created a folder, using this format, for example for today:

041924

I move all the files I created on that day into there.

As a person with a typical human lifespan, I see no need to use a "2024" string - I don't think I'll live to see 2100, and anything before 2000 isn't relevant. "24" is just fine.

And that's it. Time keeps rolling on, so the number of 'archive' folders keeps increasing, but they're small in size and easy to locate.

This works really well when you're creating not-that-unique standard files every day, btw, which is my use case.

Re: Tips on how to structure your home directory (2023)

#138
For the last couple of years, I've only had these directories: dev, test and prod.

Whatever I am working on or learning goes in dev, whatever is ready for testing or experimentation goes in test. Everything else goes in prod.

But I have been thinking of expanding on this.

Thanks for sharing the article. I might gain some inspiration.

Re: Tips on how to structure your home directory (2023)

#139
I have had a very curated home taxonomy, than I give up. Now nearly all my digital life is managed in a graph of org-mode notes, org-attached. So I do not need to look for some file traversing a tree but a single org-roam-node-find typing something to reach a heading title. This plus a heavy note usage allow for a far better search, full-text in notes via ripgrep as well, working far better both for structured files, like regular bills, and casual files. A small bonus the two-level cache-like global attachment dir is essentially a nicely balanced tree, meaning if I decide (experimented than dropped since of no use for me) to index my files for instance with Recoll (Xapian comfy wrapper) the indexing is typically faster than in a classic curated taxonomy.

Re: Tips on how to structure your home directory (2023)

#140
post #63

I think it's a nice idea, but don't like the media structure into family and so on. Looks like he's going to have a ton of problems with duplicates and then edited duplicates down the line, which can easily be mixed up, and then you lose your edits and so on. Pictures are better sorted with EXIF keywords. So, metadata stored in the picture itself, perhaps even in the MIME type. Thus, if a picture is family related, j…

Media-specific content-addressed stores (ideally as overlays which refer to but don't change your directory structure or file organization) seem to be the way to go with this. I think photoprism and photostructure don't really care about your directory structure or organization, but paperless(-ngx, or whatever is the most current iteration) is "notorious" for being opinionated about organization / not wanting to resp…

Depends a bit on the use case. For personal photos, mobile photos and the like, I use Google Photo as well. But it just isn't suitable for professional storage or sorting IMHO, tho the face recognition is certainly neat. The best I've came across was FotoStation, but it's many years since I worked with those sorta things.
Post reply on HN