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?
Personally I have a ~/tmp and a ~/storage
Anything that I don't need to keep goes in tmp. For example, downloaded RPMs that I just want to install, links to movie clips that freinds send me, most downloads (I move them elsewhere afterwards if I want to keep them), experimental compiles (moving the dir somewhere else if I keep it installed and want to keep the installer for cleaning it up later).
~/storage/ contains anything I want to keep. That includes project files, music, backups and so on.
If I need to make space then ~/tmp gets a scrubbing, if I want to back up or move to a new machine then it's a simple case of copying ~/storage and any ~/.foo config stuff to the new box (or backup in case of a system re-install).
My home directory varies on different hosts, but I usually have the ~/tmp subdir for all the thrash (untarred packages of software, temporary scripts, etc). Then there is ~/public_html with my home page, and ~/bin (added to my $PATH) with various scripts and locally installed programs. On most hosts I also have ~/tex, ~/txt, ~/audio and ~/video subdirs as well. My primary mail host has ~/Mail with inboxes subdir. That's all (and bits of random crap here and there).
-Yenya
--
While Linux is larger than Emacs, at least Linux has the excuse that it has to be. --Linus
... you don't, for that reason i have my home directory as my desktop directory, so if my home is ugly, so is my desktop. it hardly ever is (or at worst my desktop is a list of to-do's
I have an XP Pro+sfu system for my main workstation, some of this might make a litte more sense in that context.
I split my drive into three partitions;
c:\ is for system stuff and the temp folder. I redirected all temp folder locations to c:\temp, including all the windows temp files, user profile temp folders, browser caches, etc. makes it easy to clean up and simple to retrieve stuff
d:\ became 'Documents', redirected for all user profiles concept of 'My Documents', by registry hacks and system policy changes (makes new user defaults to here) that is broken up into folders named 'audio' 'images' 'documents' 'music' 'projects' 'online' 'sort' and a few others. This makes cli management of files extra easy to deal with. I use the root of each of these folders as an 'incoming' space for files of that type, with sub folders for longer term post sorting storage.
e:\ became 'Programs', broken down into categories like 'av' 'dev' 'games' 'graphics' and 'net' with the root of the drive as the default program location for installers using that system variable. speeds up installing things tremendously, as I just need to add the relavent subcategory in place of the default that a wizard gives me usually 'c:\program files\(blah)' or 'e:\(blah)'.
f:\ is another larger older and slower drive, on the second ide bus, called 'freezer', where I store zips, ISOs and the like. I also have a folder there called 'Bad Music' , where I store music that's shown up but isn't going to get listened too. For some reason, i can't delete crap music, but I don't want it showing up in my music players' lists (think "transformed man - william shatner" and anything by "styx", crap like that).
last but not least, i keep a folder on the desktop called 'drawer' where I can dump accumulated files rapidly and sort them later. I usually put half of those in the trash. for little scraps and notes, I dump them all into one big file named '(sort date) - notes.txt' from the command line, using the command "d:\desktop\drawer\type *.txt >> notes.txt" and file that away. just have to remember to put titles and carriage returns in my notes. between windows search and google desktop search, i have no trouble bringing that stuff up quickly when I eventually need it.
Sooner or later, google will be right, you won't be able to keep up with all the accumulated crap that TiB hard drives and uber-pipe broadband and "smart" agents and tivo-like p2p this crap was downloaded because it's like the other crap you've searched for
And we will love it.
Before I part with'em: two pennies weigh ~4.996+/-0.014g, have a zinc core, and the face of Lincoln. You can keep 'em.
First, file systems have supported a hierachy for awhile now -- use it !
Second, sort as soon as you get the file.
Third, seperate public files (things you won't mind sharing across the local network) from private files.
Fourth, (a tip for windows users) keep a "zipped_programs" or similar directory. Build a hierarchy inside of it for task, program name, then version. It may look like such:
If I have a CD of software I've installed, I tend to rip it and keep it in its own directory, along with the serial/key in a seperate file. Then put the CD in a binder and store it somewhere safe. If you download a no-cd crack, store it as well. Congrats, you just made your life a lot easier.
Finally, manage your home directory as well. Seperate folders for seperate tasks. Include a ~/tmp/ directory, its useful.
That is my system, across windows and linux, developed by me. It works well, and it makes any windows installs go quickly. In addition, since I'm on a dialup link, its nice to have a program archive for installing updates onto all machines on the local lan.
I only have one complaint with the system, and its for linux -- I would prefer to have a method of keeping track of any changed configuration files, including versioning.
Of course, there are many possible solutions to this problem. I'm leaning towards having a /custom directory, with a symlink of any file I've changed, and a script to check it all into RCS if there are any changes. So, for example, /custom/etc/X11/XF86Config-4 would be a symlink to /etc/X11/XF86Config-4 and the RCS file would be saved under /custom/etc/X11/.RCS/XF86Config-4,v
I just use:
alias l='ls -lrt | tail -24'
and then I only look at recent files, and I let the cruft run free. Additionally, I capitalize any long-living directory.
Then I just tar up any files that are not capitalized direcories that are more then say 4 months old. I keep the lists of files keept in each backup (dvdr) in a Directory.
I also just periodically, run a:
du -sk * | sort -n
and just blow away any big files or directories that are not important to me.
Don't sort - search.
I disagree with them on this, although when my desktop or documents folder (yeah yeah, I have 'net at work only right now) get full I sweep them into a 'sort_this_junk_out' folder, then that gets swept into the next, then I burn a CD backup of my documents, and a year later find endless levels of forgotten detritus.
I say, do what the photographers do. Sort by as much as you need.
Work, Home, Play
Play -
Video
Music
Funny
Pr0n
Etc etc. Then have a download folder, and a sep install folder. Anything you want to keep move it to install or to work/home/play.
Then setup a chron job to rm -rf ~/download/* every 48 hours.
This forces you to buck up your ideas, and auto wipes shizzle you don't want. the chron could:
rm -rf ~/furnace/*
mv ~/download/* ~/furnace/*
Which would give you a 92 hours period to save files.
Just my arbitarily small denomination of the currency of your choice.
#hostfile 0.0.0.0 primidi.com 0.0.0.0 www.primidi.com 0.0.0.0 radio.weblogs.com
The best thing I've done to my home directory is to make it read-only. This way I can prevent all those unnecessary configuration files that nearly every program wants to write, even if it really has no configuration data that's different from the default (what's up with that, developers?) And, of course, if I am ever dumb enough to try to write something at the root level, I get a polite reminder.
Between home and work, I have about ten different home directories on two different flavors of unix as well as windows. I keep them all clean and in sync with "rm" and "cvs".
Every home directory has 'local' and 'tmp' subdirectories for files specific to those machines that don't get source controlled or distributed.
The source controlled branches have subdirectories like "arch/linux", "arch/w32", "arch/ux", and "arch/all" for binaries and scripts that are OS dependent or independent. Other subdirectories like "etc", "src", and "emacs" contain about what you would expect. Any thing that needs keeping gets source controlled.
New account setup is as easy as a "cvs checkout".
Cleaning is about as easy as "cvs update", "cvs commit", "rm -rf", and "cvs checkout".
I wrote a shell script that automatically handles files found on key fobs or other portable storage.
/mnt/$DEVICE for three directories: bin, track and transport. It makes a backup of the bin directory, performs rudimentary version checking(md5sum) and snapshot backup on files in the track directory, and copies files from the transport directory to a timestamped directory under $HOME/transfer/transport.
:)
It checks
In my spare time, I'm improving it. It's currently a combination of three or four scripts, but it should be down to a single script by Monday. Anyone who wants a copy, email me.
tasks(723) drafts(105) languages(484) examples(29106)
"If you think the problem is bad now, just wait until we've solved it." --- Arthur Kasspe
My strategy? I've got folders like: Computer, Research, Personal, Crypt (for cryptography, not encrypted files), and tmp. In the end, I've got "only" 152 files in my homedir. Of course, I've also got massive confusion about whether something goes under Computer or Crypt....
I struggle along with my file organization...I try to keep everything in several main folders (Music, Movies, Pictures, Code, Documents), but invariably it requires maintenance and diligence on my part to adhere to my storage policies.
I think that an iTunes-like interface for your whole hard drive would be highly beneficial to manage the myriad files people have these days with those 200GB HDDs.
What I am thinking about is an interface like iTunes. Back in the windows days, I would organize my mp3s like any other files - you keep separate folders for genres (or artists, or however you wanted to sort it) all under an mp3 directory. Then you use that structure to create playlists in your fav mp3 playing software.
Fast forward to the days of iTunes - I hardly know where my mp3 files are located - I have a huge library list which is full of metadata that helps me to locate individual songs, or songs of a certain type or genre. The iTunes software takes care of storing them on the hard drive and organizing them in a way that is meaningful to itself. I have way more power and flexibility in creating my playlists since I can do smart searches through the db list of songs.
Of course, the major drawback here is you have to now keep up with metadata. While I think some clever means of doing this can be conceived (when you purchase a song from the iTunes store, it comes with meta-data already attached), some work will always be put on the user if you expect to have some customized results.
So I have a few directories like ~/bin , ~/msc , ~/tmp and ~/project_abbrev .
What I'd like though is multiple views of my data, like VFolders in Evolution, where an entirely different organizational structure could be applied to an entire directory tree.
That way, if one view has names associated with the underlying file formats ~/pdf , ~/jpeg , ~/ppt , etc. then, another view might have ~/today , ~/yesterday , ~/mold_covered .
Frequently, I'll have one application that I use for multiple projects. Sometimes, it's really convenient to have multiple project files for the single application all in the same place (because it's easier not to rebuild Rome from scratch).
Some of these files could be huge. And while I know about symbolic links, those have to be created by hand.
And, yes, even in the Google sense, having some organizational structure with Score by match and Score by Most Recent grep 'Video Card Perf' would also be nice.
"Provided by the management for your protection."
I'm writing this as the clueful user, neither the newbie nor the guru.
I have always had an issue with the few attributes that can be assigned to a file with a linux system. I won't bother going into my file heirarchy like everyone else has because it is very similiar. I will say that I have a 'www' folder that is available on the web. This is most frustrating!!! Why should I have to maintain a seperate tree for stuff I want online? What happens when I have yet another division I want? Files that are also on the samba network, or, files that are pornographic? Files that are recipes I want shared on Kazaa? each one splits it up more, and provides a need for duplicate files in multiple locations.
horrible!
i want to set meta information about the file. I want to
chmod +web portman.jpg
in my home directory and have it show up as a available on my website!
I once thought I could implement this in the filenames. Each attribute could be unique and part of the filename.
mv portman.jpg portman.web.jpg
mv portman.web.jpg portman.samba.recipes.web.jpg
et cetera. i never did it. maybe cause its dumb. i there was something that can do what i want to do.
slashdot: where everyone yells sarcastic metaphors to themselves to understand the issue
Welcome to the world of per-process namespaces. They have to be created by hand, however (although you could go and fix that).
I also like what BeOS did. You could create live query directories which would be populated with any files that apply to a query. Combined with their (for lack of a better term) metadata file system, it was awesome.
Free of Flash! Free of Flash!
I once read an article about a guy who put his entire home directory in CVS. This strikes me as a possible solution to clutter. Need a directory to work on a bunch of test images? Create a new CVS module and stuff the files in that. I like the idea although I'm not good enough with CVS to pull something like that off. I'd like to try it someday though. Does anyone have any links to articles, HOWTOs, guides, etc on using CVS or RCS to keep files and directories organized?
I used to try to store everything in deep heiarchies with complex organizations, both electronic and paper files. After reading David Cole's 'Getting Things Done' I reorganized everything into a very flat structure. Everything goes into a folder with a descriptive title at the root level. This works suprisingly well, again in both the PC and the real world. I end up with lots of folders many of which have only 1 file or paper in them. But stuff is so easy to find. When finding a file/document I can usually go strait to t it. Even if I can't, I rarely have to look in more than two folders.
Maintaining a complex heiarchy requires the user to keep a mental map of the heiarchy in mind to find stuff. Using a very flat system only requires the user to be able to use the alphabet. Using my complex heiarchy system used to make me feel organized and smart. Now my system is quite dumb but it works so much better.
Simple people talk of people, better people talk of events, great people talk of ideas.