Live data from Hacker News

Ask HN: How do you organize your files

news.ycombinator.com

11–20 of 44 posts

Re: Ask HN: How do you organize your files

#11
post #5

Beside the usual `Images`, `Videos`, `code` directory, the single most important directory on my system is `~/flash` (as in : flash memory). This is where my browser downloads files and where I create "daily" files, which I quickly remove. This is a directory that can be emptied at any moment without the fear of losing anything important, and which help me keeping the rest of my fs clean. Basically `/tmp` for user.

Why not just use `/tmp`?

Because it's already a mess, and because I don't want to take the risk of deleting sockets when I want a purge.

Re: Ask HN: How do you organize your files

#13
Home directory is served over NFS (at work). Layout is as follows:

  phireal@pc ~$ ls -1
  Box/       - work nextcloud
  Cloud/     - personal nextcloud
  Code/      - source code I'm working on
  Data@      - data sources (I'm a scientist)
  Desktop/   - ...
  Documents/ - anything I've written (presentations, papers, reports)
  Local@     - symlink to my internal spinning hard drive and SSD
  Maildir/   - mutt Mail directory
  Models/    - I do hydrodynamic modelling, so this is where all that lives
  Remote/    - sshfs mounts, mostly
  Scratch/   - space for stuff I don't need to keep
  Software/  - installed software (models, utilities etc.)
At home, my main storage looks like:

  phireal@server store$ ls -1
  archive     - archived backups of old machines
  audiobooks  - audio books
  bin         - scripts, binaries, programs I've written/used
  books       - eBooks
  docs        - docs (personal, mostly)
  films       - films
  kids        - kids films
  misc        - mostly old images I keep but for no particular reason
  music       - music
  pictures    - photos, organised YYYY/MM-$month/YYYY-MM-DD
  radio       - podcasts and BBC radio episodes
  src         - source code for things I use
  tmp         - stuff that can be deleted and probably should
  tv_shows    - TV episodes, organised show/series #
  urbackup    - UrBackup storage directory
  web         - backups of websites
  work        - stuff related to work (software, data, outputs etc.)

Re: Ask HN: How do you organize your files

#15
One external raid (mirrored) that holds information only necessary for when I'm working at my desk. Within that drive I have an archive folder with past files that are rarely/ever needed. The folder structure is labeled broadly such as "documents" "media" and more specific folders within. For the file level I usually put a date at the beginning of the name going from largest to smallest (2017-6-21_filename). For sensitive documents; I put in encrypted DMG files using the same organization structure.

As for all "working" documents, they're local to my machine under a documents or project folder. The documents folder is synced to all my devices and looks the same everywhere with a similar organization structure as my external drive. My projects folder is only local to my machine, which is a portable, and contains all the documents needed for that project.

TL;DR Shallow folder structure with dates at the beginning of files essentially.

Re: Ask HN: How do you organize your files

#16
One thing I do that I've found to be pretty helpful is to prefix files/directories with a number or date, for sorting. Some things are naturally ordered by date, for example events. So I might have a directory "my-company/archive", where each item is named "20170621_some-event".

Other things are better sorted by category or topic. For tools or programming languages I'm researching I might have a directory with items "01_some-language", "02_setup", "10_type-system", "20_ecosystem", etc.

Re: Ask HN: How do you organize your files

#17
My home folder is it.

  .
  ├── Desktop
  ├── Downloads
  ├── Google Drive // My defacto Documents folder
  │   ├── legal
  │   ├── library // ebooks and anything else I read
  │   ├── ...
  ├── Downloads
  ├── Sandbox //  all my repositories or software projects go here
  ├── Porn // useful when I was a teen, now just contains a text file with lyrics to "Never Gonna Give You Up"
I backup my home folder via Time Machine. I haven't used Windows in years but when I did, I used to do something similar. Always kept a separate partition for games, and software because those could be reinstalled easily, personal data was always kept in my User folder.

Re: Ask HN: How do you organize your files

#18
I try not to over think it, just:

  ~/$MAJOR_TOPIC
  |
  |--- ./$MORE_SPECIFIC
      |
      |--- ./$MORE_SPECIFIC
          |
          |--- ./general-file.type
      |
      | ./general-file.type
  |
  |--- ./$MORE_SPECIFIC
  |
  |--- ./general-file.type
etc

As you find yourself collecting more general files under a directory that can be logically grouped, create a new directory and move them to it.

Also keep all your directories in the same naming convention (idk maybe I'm just OCD)

Re: Ask HN: How do you organize your files

#19
I mostly work with Golang so usually all work related stuff will be in my GOPATH in ~/code/go/src/github.com/company-name/.

Non Golang code will go to ~/code, sometimes ~/code/company-name but I also have couple of ad hoc codebases spread around in different places on my filesystem.

So it is a bit disorganized. However last few years I have rarely ever needed to cd outside of ~/code/go.

Some legacy codebases I worked on (and still need to contribute to from time to time) can be in most random places as it took some effort and time to configure local environment of some of these beasts to be working properly (and they depend on stuff like Apache vhosts) so I am too afraid to move those to ~/code as I might break my local environment.

Post reply on HN