Live data from Hacker News

Tips on how to structure your home directory (2023)

unixdigest.com

141–150 of 172 posts

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

#141

Beyond organization, I want to concisely back up and port between machines. The `.config` folder is a big headache when trying to be strategic about backups due to apps putting gigs of session data there. "session data" is not "config", consarnit! An app's "config" shouldn't be gigs large. Grumble grumble, grouse grouse, and so on. :^)

So much this, why do apps use .config like a place to store app data? We have .local and .cache for that

Because programmers like to have something like DATA_DIR - a writable directory managed by the program.

Thinking about multiple storage locations is effort and most users don't care about this too much anyway

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

#142
post #111

Beyond organization, I want to concisely back up and port between machines. The `.config` folder is a big headache when trying to be strategic about backups due to apps putting gigs of session data there. "session data" is not "config", consarnit! An app's "config" shouldn't be gigs large. Grumble grumble, grouse grouse, and so on. :^)

And it should be possible for `.config` to be read-only, provided you do not ask a program to change a persistent setting.

You would love nixos - all configs are readonly.

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

#143

For me the way I use is as follows: Capital names for GUI things, lowercase names for CLI things. I'd prefer ~/documents, etc, but GUI people insist on capitalizing, so whatever. Very rarely I have to mix those, so it's not a big problem. ~/dotfiles is my dotfiles directory with git. I create ~/.zshrc -> dotfiles/zshrc, etc. I don't use any software to manage that, I just create symlinks. In the past I've used ~/.dot…

I very much dislike capitalizing anything. I know it's only an extra key to hit, but it's annoying as all get out.

I personally would rather type "ThisIsSomeOtherProject" than "this-is-some-other-project" as advocated on the page. Approximately the same number of keypresses but fewer characters to read.

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

#144

Earlier quoted context omitted.

I use “/Code”.

I once accidentally did an `rm -rf ~/` on a machine without backups and it removed everything alphabetically up until `~/Coding` (everything else being unimportant). So I fixed that by setting up backups and renaming it `~/Zoding` lol. Haven't been foolish enough to make that same mistake again, though.

Yay, I am quite safe, all my projects are nested inside "~/Work"!!

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

#145
post #44
post #35

I hate having a polluted home directory, especially when an application thinks it should get a non hidden directory in my home! The one that upsets me the most is the default directory for go modules `~/go`. This frustrates me so much. I refused to install any go apps or use it for development for years. I've unfortunately had to give in, and it can at least be overridden by setting `GOPATH`, but it is a terrible, te…

The worst offenders are CLI tools written by people on Macs that do not respect XDG, because it's not a thing over there. So every tool gets to pollute your dotfiles with its own stupid directory. .rustup, .mix, .npm, .yarn, etc. But polluting your home directory like ~/go, without even the decency to hide it, is extremely rude and offensive.

> people on Macs

> pollute

gah, reminds me of my pet peeve.

Insert a drive, it gets .Trashes ._Trashes .DS_Store .fseventsd .Spotlight-V100 and other nonsense everywhere.

And if you are ever trying to recover a failing drive, do not mount it on a mac.

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

#147
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…

> 041924

I can accept YY instead of YYYY, but surely YYMMDD is preferable due to sort order.

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

#148
post #112

Earlier quoted context omitted.

My experience with metadata is that a lot of applications don't care about its integrity but will never mess with the filename unless that is the purpose of the application. Demo a sync program and find that all the creation dates have changed to today!

> My experience with metadata is that a lot of applications don't care about its integrity [...] This has led me to formally maintaining significant metadata in the filename, for certain kinds of files; everything else gets lost or diverges. For instance, a book file might be named `Title [a=Jim Smith; isbn=9781234567890].pdf`.

I feel like you're probably kidding, but I kind of like this.

Maybe not psyched about the shell-interpreted brackets, semicolons, and spaces. But the idea is interesting!

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

#149
post #17

I have found it surprizingly difficult to categorize my files in a way that is elegant and intuitive. I've been meaning to look into FUSE for a tagging-based system instead of the current hierarchical one, although I suspect that the difficulty of categorizing things is unlikely to go away even with tags.

I am genuinely surprised tagging never got more traction in the native FS space. I use MacOS's tagging pretty extensively and Dropbox at least keeps them in sync, a lot of other services lose them.

You can tag bookmarks too. No one does this, of course.

Tagging data is such a niche feature. But when it's useful, it's very useful.

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

#150
post #45
post #35

I hate having a polluted home directory, especially when an application thinks it should get a non hidden directory in my home! The one that upsets me the most is the default directory for go modules `~/go`. This frustrates me so much. I refused to install any go apps or use it for development for years. I've unfortunately had to give in, and it can at least be overridden by setting `GOPATH`, but it is a terrible, te…

IMO, the GOPATH itself is a terrible design. It makes you mix together things from unrelated projects in the same directory structure, instead of each project having its own independent directory structure, like on every other programming language. The GOPATH design goes so much against the way I organize my projects, that it's the main reason I have never got interested into learning Go. Perhaps this design makes mo…

Well then you'll be relieved to know that that aspect of GOPATH was made optional in 2018 and hasn't been the default since 2021.
Post reply on HN