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?
Anything I want to get rid of, I put in the /bin. Stuff I can't really categorise I put in /etc, and all the stuff I use goes in /usr.
That man tried to kill mah Daddy
Always make a directory and put the files you are dealing with in it immediately. Don't wait.
You are being MICROattacked, from various angles, in a SOFT manner.
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).
This is easy. Pornographic movies go in the /vids directory, while pornographic images go in the /pics directory.
Simply give all your files names starting with '.'.
I believe posters are recognized by their sig. So I made one.
This is my way.. I stick everything on the desktop, then when desktop is full I make a folder called stuff and move everything into it. rinse, repeat if you get too many folders called stuff2 stuff3 stuff50 whatever, just make a new folder and put all the other folders inside it :)
... 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.
cd; find . -atime gt 30 -print | xargs rm -f
Best when modified and run as root over luser dirs, of course. Quotas are for sissies.
My home directory ussually looks like the following:
~/download - for all downloaded files. If I am downloading many related files I put them in appropriately named sub dirs
~/library - for any documentation downloaded from the net, and a copy of my O'Reilly CD Bookshelves
~/temp - for a temp directory
~/test - for temp files from tarballs and installations
~/bin - for locally installed apps
~/work - for a temporary work space when working on projects
~/devel - all personal programming projects
~/locker - any other files I wish to keep
~/Document - any office or other personal documentation.
The only files I purposely keep in the root of my home directory (aside from the dot-files) is a running todo list of notes and tasks, all of which is contained in one file.
DOS is dead, and no one cares...
If there's a Bourne Shell, I'll see you there
Something like this might work:
Then you run it as follows:The output is in three fields: space used by the directory, the directory name, and the tar.gz file where we found the original. You can be asked to delete anything it finds with:If you want to be a little safer you can just delete the originalYou can also whip something up using find to look for files which haven't been accessed in more than a certain number of days. Reading a file updates its atime, so that's a pretty secure way to find stale temporary files.
For real zaniness, add xargs basename, sort, uniq -c, and sort -n. That'll get you a breakdown of how many applicable files found in each directory and sort it for you.Ain't Unix awesome?
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
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.)
bin - contains a set of script files that do personal things, plus a handful of binaries.
doc - contains documents that I've created. Broken down quite carefully:
doc/coding - personal projects
doc/fandom - various groups and activities I do
doc/karma - a large software project I work on
doc/life - real world things: maps and notes about camp sites and dating ideas, family things
doc/photo - photos I have taken organized by date (doc/photo/year/month/day)
doc/photo/found - photos of friends I have found
doc/projects - various projects I work on, the cast I direct, etc.
doc/songs - songs I have written and notes on covers I perform
doc/system - notes on hardware, software and my network
doc/text - essays, stories, etc. that I have written
doc/work - memos and invoices (actual work files are below
ks - my primary work project, a large source tree
pub - data files I've downloaded or ripped/encoded.
pub/games - roms for emulators
pub/image - very organized images from all over the place, from 10th century tapestries to scans of Manning's fetish lineart.
pub/music - organized by genre
pub/text - ebooks (first level is erotica, fiction, nonfiction, reference, rpg and scripts).
pub/video - very very organized and quite deep. I've been encoding my extensive DVDs and VHS collection for quite awhile now.
usr - contains system settings, in $HOME so I can sync (more info later)
usr/etc/cron - network wide cronfiles, these sync everything and are symlinked.
usr/etc/dot - all my dot files ($HOME/.*). rc files and config directories. I sync my settings and back them up.
usr/etc/fileindex - index of pub (since pub doesn't exist on my laptop when I'm not NFSed to it).
usr/etc - also contains hosts and ssh info.
usr/install - tarballs and rpms to install everything the way I like it.
usr/log - chat logs and the like
usr/palm - my palm apps and backup/sync directories. I can drop text files in here and they appear as ebooks on my palm. Go KPilot!
usr/share - contains various media and configuration files. Top level under this are ( desktop fonts icons kde kde.betty kde.riffraff ksubtle menu.betty music people sound wallpaper ). The kde.hostname directories are my configs for my laptop and desktop, and $HOME/.kde/share symlinks to them. Thus my kde config is backed up and synced. music here are startup/shutdown and alert music. people are face shots of individuals for use in PIM apps. icons is a personal set of icons.
work - contains a directory for each client.
www - contains a mirror for each of the sites I maintain (my personal ones - the professional ones are way too big).
In addition to the above, I have a directory named pool on my laptop - that's media files (a few movies, tv shows, some talk radio programs) that I know I can delete without worry since they are in pub on the home file server. Stuff to watch when I'm waiting or bored.
I also have a tmp, which on my laptop NFS mounts to tmp on my home server. It contains inbound and unsorted items. I get about four gigs, burn, index the disc and then move them into pub. I can recreate pub with my spindles and index.
Finally I have a $HOME/betty on my laptop. My laptop's name is betty, and it contains anything that I downloaded directly to the laptop and I want to keep... sort of the opposite of $HOME/pool. Things here go to $HOME/tmp, and then go through the "burn/index/move to pub" cycle.
As a result, I can find any file I want in nearly a terabyte of data that goes back 25 years, some of it Apple ][ files BBS logs. I am not done indexing my offline media - I need to get a high quality turntable for some virgin vinyl that has content that has never been released on CD. Plus some VHS tapes that have never been (and is unlikely to be) released on DVD. I also have a small collection of 16mm and 35mm trailers for various odd and cult films.
For awhile I ou
"$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
This is about a professor of mine from the University of Chicago who is a head honcho at Argonne Labs. Apparently, he's had a reputation for some years of having the most disgusting ~home directory. They eventually made a game about it: what they used to do was somebody would type 'ls' and someone else would get on a bike. Then they'd hit enter and they'd try to do laps around the server room until the ls stopped. I think their record was something around 14.
--Stephen
Did you ever notice that *nix doesn't even cover Linux?
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
> That's funny, I was thinking of suggesting 'animal', 'vegetable', 'mineral', etc...
> Or perhaps using the 'Kingdom', 'Phylum', 'Class', etc... schema."
Personally I have 14 folders in my home directory, corresponding to the 14 different file classifications:
ThoseThatBelongToTheEmperor
EmbalmedOnes
ThoseThatAreTrained
SucklingPigs
Mermaids
FabulousOnes
StrayDogs
ThoseThatAreIncludedInThisClassification
ThoseThatTrembleAsIfTheyWereMad
InnumerableOnes
ThoseDrawnWithAVeryFineCamel'sHairBrush
Others
ThoseThatHaveJustBrokenAFlowerVase
ThoseThatResembleFliesFromADistance
SURELY NOT!!!!!