Slashdot Mirror


How To Manage Your Home Directory?

gustgr writes "There are times I got surprised after running ls in my $HOME directory. It is filled with trash, test files, directories that were supposed to be only temporary, ascii files with quick notes and all sort of stuff. In other words, it is a complete mess. Then I remove the trash, clean up the directories, run the mv command a few times and everything looks good and normal again. Two weeks later the disorder is back and I have to handle it again. How do you manage your home directory in order to keep it clean? Are your homes a mess too?" I usually keep folders labeled "audible," "visible," "legible," and "work," and subfolders within these that are at least mostly consistent between computers / drives; every day or so I sweep loose files into these, then open each folder, sort, repeat. How do you sort your data?

10 of 176 comments (clear)

  1. recompile everything by hand by Lord+Bitman · · Score: 1, Insightful

    The most clutter in my directory comes from all the programs which for inexplicable and stupid reasons decide that configuration files go in the root of the directory. This is Stupid. There is no reason for it. If you are a developer, you automatically suck. Die. (seriously, geez!)

    --
    -- 'The' Lord and Master Bitman On High, Master Of All
  2. rm -rf * by Mordant · · Score: 1, Insightful

    usually works for me. ;>

  3. For now, I'm letting it go to hell by Dixie_Flatline · · Score: 4, Insightful

    For the moment, I'm just letting everything go to pot. I just throw things in whatever directory is convenient, and hope that I remember where I put it later. I'm really looking forward to Spotlight on OS X.

    Personally, I think that in a few years time, heirarchical filesystems will be on their way out. With the current state of computing, there's little reason to have such a system when you can have a filesystem that does all the work for you. I've heard that the same functionality will be coming to Linux through ReiserFS (though I admit to not following that very closely since I'm obviously an OS X user).

    So, that probably doesn't help you much, but then again, it might. Just look around for a system that allows fast indexed searching of your machine so you don't have to keep track of this crap yourself.

    (Incidentally, it isn't only you. In one of the ACM's recent quarterly journals on Human-Computer Interaction, it found that most users are unable to keep track of where their files are because there are just too many of them. Also, it found that the search facilities currently in place in Windows and Mac (OS 9?) systems are entirely inadequate for the task.)

    1. Re:For now, I'm letting it go to hell by hackstraw · · Score: 3, Insightful

      Me too. I just thow crap in my home directories until 'ls' simply outputs too much stuff, and then I clean up.

      My personal machine is a mac as well, and my safari download location is my home directory. I actually like my home directory messy :) It makes a quick 'scp' easier because I don't have to type or remember the path either on the 'to' or 'from' machine. I always know where my current files are. Simply typing 'ls' is pretty much always useless. 'ls -lotr' is usually better. WIldcards really help.

      I consider stuff in my home directory as kinda temporary and/or immediate files. Meaning that I could be using them for the next couple of months or so. I find it too easy to use wildcards and to sort by time to waste my time cleaning up stuff. If someone mentions a PDF that they sent me last week I do ls -lotr *.pdf Odds are its near the bottom somewhere with a filename that makes sense.

      Now if something is important enough that I want to keep it semi-indefinitely, I put it somewhere where I can find it later, most likely on 2 different computers, and often one of them gets backed up.

      I thought of writing a cronjob to go and touch all of the file in my home directory that do not begin with '.' and are not directories and have a timestamp of older than 24 hours, and automatically moving junk to some directory after 14 days or so, but I havn't done that yet.

      I guess my point is that 1) besides my '.' files, I consier all files in $HOME to be basically temporary. Most of them are downloads which are located in safari's download manager for some time, and are also easily reobtainable. I don't mind the mess because filtering, grepping, sorting makes finding something trivial. Once things get "out of hand", I clean up. Sometimes I just move bunches of junk to a new dirctory called 'stuff' or something, and after its been in stuff long enough and I havn't needed any files from there, I just toss stuff. 2) I put important files in logical places where I know important files go. And, I always have at least one form of redundancy.

    2. Re:For now, I'm letting it go to hell by jc42 · · Score: 2, Insightful

      For the moment, I'm just letting everything go to pot. I just throw things in whatever directory is convenient, and hope that I remember where I put it later. ... I'm obviously an OS X user

      Heh. A year ago, I would have replied by commenting on how easy it is on linux (or any earlier unixoid system) to create directories and tell all apps to store their output files in the appropriate places. Then I got a PowerBook. The file system is chaos. Nearly every app has its own scheme for where to store files. Most don't ask; they just store things away in a directory and with a filename that is never displayed. Some do pop up a "Save" window. Some of those only allow a save/don't choice. Some let me type in a file name but not the directory (and most of those strip off any directory that I include ;-). A very few let me choose the directory and the file name.

      Periodically, I look around in a Terminal window, and try to figure out what the hell all those multi-MB files are, and which I can delete. Many of them have gibberish names. Some of those I can identify by examining their contents; others are pure mysteries that I move into a "tmp" subdirectory with the hope that whatever needs it will complain and give me enough of a clue to restore the file. A few apps have broken, presumably because I moved a file that they want but I couldn't identify.

      Quite a lot of the files have clues in their names, and often they are sitting in really bizarre places. Some of my source directories for projects are littered with files from Mac apps, or files that I can't identify.

      It sure looks like Apple is consciously working on destroying the usefulness (and simplicity) of a neirarchical file system, so we'll have to use a search mechanism to find files. This does tend to throw a monkey wrench into attempts to build my own packages (or port others') into directories. Strange, unrelated files appear in a package that have nothing to do with it. This goes a long way toward discouraging the use of OS X for the development of commercial packages.

      Well, it's been an interesting experience ... I do worry about what I'll do when the disk gets filled with files that I can't identify. I give it two years.

      I'd agree that the Windows and Mac tools for searching are inadequate. I'd add linux to that list, but add that it's not much of a problem there, since my own directories don't seem to get violated by the installed apps.

      In any case, I keep finding that some combination of "find" and "grep" does a better job than any fancier tool that I've yet come across. It can take a while, though.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
  4. Nobody has mentioned... by wolf31o2 · · Score: 2, Insightful
    It seems that nobody has mentioned the simplest way to keep your home directory neat and orderly... Don't make a mess. It really is much simpler to think about what you're doing before you do it rather than after the fact. Start put with a list of directories that you know that you will use.

    Personally, I have a downloads, documents, gentoo, pictures, scripts, and work.

  5. Re:Home dir solution by Just+Some+Guy · · Score: 1, Insightful
    Where's "-1: Psychotic"? Do you really visit everything interesting in ~ at least once a month? I haven't touched my resume in over a year, but I'd hate to lose it. Also, at least one of the following is true:
    • /home is mounted with noatime, or you use tar with the --atime-preserve flag or dump for backups.
    • You don't do backups, or do them less often than every 30 days.
    • You're not actually deleting any files because atime gets touched every time you run a backup.

    If you're relying on atime to play nicely with your backups, then your system is a bit fragile; change one parameter and things no longer work as expected. If you don't do backups but you clean house with a blind find | rm, then you're freakin' nuts and probably don't care about the finer points anyway. :)

    --
    Dewey, what part of this looks like authorities should be involved?
  6. Don't make little files! by erikharrison · · Score: 3, Insightful

    The real trick is to USE APPLICATIONS! Don't keep notes in temp files, or little files with peoples phone numbers. Use a sticky note app, use a contact app. You'll find that they not only keep your home directory clean, but these developers have thought of all the things you can do with that info, and made most of it pretty easy.

    Really, I kept all my numbers in a file, yadda yadda yadda. "I don't need no stinking calendar app". But once I used it, I realized that, in fact, I did. Try it

    1. Re:Don't make little files! by angst_ridden_hipster · · Score: 3, Insightful

      But make sure the applications you use have good standards for import/export, or are open source with comprehensible code in a language for which you have some hope of proficiency.

      Otherwise, when the application programmer goes away, or the company goes out of business, you can be stranded with your data in a lot of obscure (probably binary) formats that are now useless. Of course, you only discover this kind of thing after an OS upgrade or something that breaks the old application...

      --
      Eloi, Eloi, lema sabachtani?
      www.fogbound.net
  7. Re:My layout by the_womble · · Score: 2, Insightful

    I assuming you are using Lynx or some kind of Unix,

    so your wife now presumeably tells people how terrible this Linux is, and that it does not even have a "proper internet" - or something on those lines.

    The community thanks your for your contribution to Linux advocacy.