How do you keep your computer directories structured?

Every time I switch to a new computer, everything starts out very pristine and I try to keep everything very organized.

but as times goes on, stuff becomes more and more messy, which is quite frustrating at times.

What are your tricks to keep your files, folder hierarchies and projects organized on your systems?

1 Like

Mine’s based around Apple’s default user directory:

  • Applications
  • Desktop
  • Documents - Split between personal, work, home, tech etc
  • Downloads - Apple’s default downloads folder so mostly a temporary space
  • Movies - Apple’s default - not used
  • Music
  • Pictures - Contains folders, such as family, friends, iPhone downloads etc
  • Program files - Downloaded software files
  • Projects - Contains subfolders for things like code (folders for each app), learning material (by language), notes, etc
  • Public - public drop box
  • Sites - website/app files
  • src (contains Ruby - not sure why I’ve got this tbh!)
  • Temp - temporary downloaded stuff, does not get backed up to Time Machine and basically contains stuff I don’t mind losing

This makes it easy to move from old machine to new, as I just copy these files onto the new machine (as well as settings and emails from the hidden .Library folder).

2 Likes

Great question! I’ve tried various approaches but end up in a mess anyway. I’m waiting for someone to come up with something innovative.

I’m quite happy having a pretty flat hierarchy. What messes my things up is that I have too many projects in progress at one time and I move around between them. For example, I need to make an urgent change to a project. I want to swap branches only to see that I have too many changes in progress in one repo; changes which I made too long ago so properly committing them would mean spending time figuring out what was going on so I just make another clone.

In the end I have a very neat structure with great directory names. Unfortunately I never use these and most of my work and important files are under ~/tmp

1 Like

All my source code is organized following the convention Go was built on, e.g. ~/src/github.com/bitwalker/<repo>, or in other words, ~/src/<host>/<user_or_org>/<repo>. So I put all my personal projects and forks in ~/src/github.com/bitwalker, if I clone someone else’s stuff, it goes in a folder dedicated for them, e.g. ~/src/github.com/elixir-lang/elixir. So far this hasn’t failed me, and has made it easy to keep things in a structure which is easy to navigate. I usually have a lot of projects, but if you don’t have so many, this might be unnecessary overhead.

Music I store on an external SSD, which I manage using beets. The folder structure is ultimately Music/<artist>/<album>/<song>, but I don’t maintain the structure myself directly, it’s all done by beets.

Movies and TV are stored on the same SSD, in Movies/<title> (<release year>)/ and TV/<series> (<release year>)/<season>/ respectively.

Photos I organize by Pictures/<year>/<event_or_month>

Downloads I don’t organize, they get moved to storage and organized by category. I don’t keep around anything I don’t want long term.

Books I organize by <genre>/<author>/<title>

Documents are split between work and personal, and categorized by purpose, no hard set rules here though, just whatever makes sense for a given document.

I don’t use my desktop for anything, it’s empty.

That’s about it - my recommendation is to keep your system simple, anything too complex will be ignored and eventually you have a mess again. If you aren’t sure where something goes, I have an “unsorted” folder in each major category where I keep things, and I rename the files there something verbose to make it easier to find later, and then leave stuff there until I have time to go in and sort a few things all at once. This makes the mental overhead of keeping things organized really light, and keeps things tidy for when I actually have time.

4 Likes
$ pwd
/Users/ben/Desktop/Stuff/old_desk/Desktop/stuff

The evidence would suggest that I simply don’t…

4 Likes

Haha I’ve been known to do the same! Really looking forward to stacks:

Heh, I have a Games directory for gaming things, so like Games/Factorio for factorio stuff (which has directories separated by version, mods, mod packs, save backups, etc…

Source code is top level in my home directory, so cpp for ++ stuff, elixir for Elixir stuff, etc… (Source code is very important to me, my most used things, hence top level).

Video’s are in Video, Images in Image, etc… etc… Music in Music, non-music audio in Audio, etc…

I use a lot of ‘tagging’, so something will have a main entry, like take an music file, but I also have lots of symlinks in subdirectory trees of artist, album, etc… etc… The filesystem is a great database so why not use it. I’ve always thought of looking for and/or making a fuse interface for auto-directory tagging based on audio metadata but I’ve never got around to it yet.

I’m not sure what my style would be called, but I’ve been using it for decades at this point… >.>

EDIT: Oh, and I have tmp directories in dang-near half of my subdirectories… ^.^;

i have ~/oss/<group>/<repo or project> usually
so ~/oss/elixir/nerves or ~/oss/farmbot/api

I have something like:

  • ~/Workspace/<COMPANY_A>/<project_name> - My Company’s Projects
  • ~/Workspace/COMPANY_B>/project_name>- Second Company’s Projects
  • ~/Workspace/oss/<project_name> - OpenSource projects
  • ~/Learning/codes/<language_name>
  • ~/Learning/resources/ebooks - Includes child folders for each Language and Techs (Ruby, Elixir, PHP, dotNet, JS, Databases)
  • ~/Learning/resources/videos
  • ~/DrobBox/PersonalDocuments
  • ~/DropBox/<company_name>/Documents
  • ~/DropBox/Photos
  • ~/Downloads - Downloaded files and temp files
1 Like
  1. ~/r/<org-name> (short for repositories) for all the projects that I work on.
  2. ~/sr/ for projects which I download and build (stuff like alacritty, elixir) and for projects whose src code I want to read.
  3. ~/s/ (scratch directory): for one off scripts that I am testing out (*.exs, *.rb, *.sh etc,.)
  4. ~/scripts/ -> ~/r/dotfiles/scripts: Hosts my utitlity scripts
  5. ~/src for golang code
1 Like

~/code/<language>/<project-or-meaningful-fork-name>
~/media/video/<category-where-it's-something-like-dev-for-development>/<language>/<presenter>

Other than that I use XDG directories for configs, data, etc., and all my dotfiles are spread out in the code folder but symlinked from these config directories. I mirror this structure somewhat on my Dropbox as need be. Other than some obvious folders for audio-/e-books I don’t really care all that much about order for anything outside of code or learning material.

The code folder looks like this: https://pastebin.com/1Gh76ezJ (complete with old artifacts from long ago that somehow live on because of cp -r all-my-old-stuff ~/code/)

~/src is my main entrypoint to all computer code.

Within there I have:

  • ansible
  • contracts
  • courses
  • github
  • legacy
  • scripts
  • sites
  • tmp

This includes code ranging all the way back to VB6 in the mid-1990s to sites being made with Phoenix today.

Ooh, I like the short names. I may need to copy that for my own organizational purposes.

I currently use:

  1. ~/dev/<project> for all source code repositories that I have
    a. ~/dev/forks for any projects that I’ve just forked or cloned and don’t actively contribute to
    b. ~/dev/archived for projects that I have not worked on in a long time (usually > 1 year)
  2. ~/<company-name for all repositories and files related to my actual job
  3. ~/config my dotfiles that I synchronize with git (with a branch for each computer that I use)
  4. ~/Dropbox for all sorts of other files (pdfs, documents, etc)

My Dropbox is a mess though, with too many shared folders and a nonsensical hierarchy

I format my directories with camelCase names, files with PascalCase, and my files are organized based upon activity. Files that are in multiple activities are symbolically linked. For example, elixir files would be hard linked under ~/code/elixir/projectName and symbolically linked under ~/projects/projectName/code. Thus non-code stuff related to the project such as say papers can be accessed there, but it is also in my central code directory. The same applies to written documents and art.

To keep this organized I regularly do a cleanup and delete old things / move things about. This cleanup occurs about once a month to keep everything orderly and efficient though I do frequently slack off.

The default structure I have on Linux.

Plus “projects”