Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an embarrassing problem: during my younger and wilder days, I used to download a certain type of movie clips and pictures. The combination of youthful foolishness and a couple of beers apparently caused me to put these files in odd places on my hard drives.

My girlfriend is moving in with me in a few weeks, and I am horrified at the prospect of her stumbling onto one of those files. I have been over my drives a few times, but I manage to find another of those dammed files each time. I have huge drives containing hundreds of thousands of files, most of them legitimate and work related, so I can't just format the PC. To complicate matters even more, some of the offending files are named in misleading ways.

I seriously need help here. How can I make my PC honest again?

share

locked by nhinkle Jul 24 '12 at 18:32

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as not constructive by random Jul 16 '12 at 21:17

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
windirstat for windows and kdirstat for *nix the filter on file type/name –  ratchet freak Sep 4 '11 at 21:37
204  
Share your entire harddrive on a p2p network and see what files get the most downloads! :) –  Doug T. Sep 5 '11 at 1:38
5  
It would be a pretty cool idea for a software program. It could scan all media files and use a filtering algorithm (similar to Google Images - moderated mode) to detect files that are likely to be risque. Then it could move them all to a "quarantine" folder, and let you decide what to do with them. –  jonathanconway Sep 5 '11 at 5:25
3  
If they have normal file extensions and just the rest of the filenames are "misleadingly named" you just have to search for all files of each type and delete the nasties identified by their thumbnails. If even the file extensions are "misleadingly named" then you need a tool that can identify file types by their contents and either give them correct extensions or list them by thumbnail in something like a file browser which includes a delete button. –  hippietrail Sep 5 '11 at 7:00
1  
Find all files above certain size (50MB?) - should work at least for the movies –  GDR Sep 5 '11 at 21:26
show 1 more comment

25 Answers

  1. Use the other answers to remove horse porn and that icky scat stuff.

  2. Talk to your girlfriend. Tell her that you are a normal guy who watches spicy media, drinks beer and feels embarrassed to be accused of the former. This gives you the advantage of building up communication skills and making the relationship more honest and transparent.

  3. Tell her that she is the one and you don't really need these media files any more, she can delete them at any time herself.

share
37  
4. Follow through and really don't watch any of this any more, so if she does find it the timestamps associated with the file will back up your claims. –  Joel Coehoorn Sep 5 '11 at 3:44
11  
File times can be faked, so they're not very reliable evidence. After quickly running perl script, he says "Hey look, honey. I last accessed this one 12 years ago!" –  anthony-arnold Sep 5 '11 at 5:40
25  
+1 for a non-technical solution to a social problem –  soulmerge Sep 5 '11 at 8:28
17  
@Joel Unrecommended! Be honest about how looking at 'spicy' stuff is ok (although get rid of the horses, ja) and don't freak out. If she's mega-threatened by you being your own separate person, you'll have bigger fish to fry. –  buildsucceeded Sep 5 '11 at 9:50
8  
@Lord Torgamus, If you have ever worked in IT security you will know that the weakest link in any system is the social one. Very frequently "user education" (in this case the OP talking to his girlfriend about the images) is better than any technical solution money can buy. –  Scott Chamberlain Sep 6 '11 at 14:30
show 12 more comments

It is called format and reinstall. It is the surest way to do this. Backup what you know you want to keep (presumably you know where these files are) and nuke the rest.

You can always do a search for every type of media file using built in search or a third party tool (ie, searching all .jpg files in the system, or all .gif or all .mpeg, etc) and going through the results one by one, but that is time consuming and always runs the risk of you missing a certain file type.

share
3  
+1 - I wrote up an answer and just seen it is pretty much the same as you suggested! I would recommend a reinstall, but, failing that... possibly use a media handling tool that can auto scan the drive and index everything making it easier to find the files to delete! –  William Hilsum Sep 4 '11 at 20:26
2  
This is kind of rude considering that the OP specifically stated that he didn't want to resort to formatting. Still, it's probably good for future visitors. –  Pops Sep 5 '11 at 19:43
2  
@Lord Torgamus, I gave an alternative, but I was just being honest, either search for the files type by type and risk missing a set or nuke them all. I know backing up thousands of files is time consuming, but so is searching through media files type by type and inspecting each one for content. The former lets you mass copy and leave for a while, the latter you need to constantly be there to work. Sometimes you need to just make a sacrifice if something is that important to you and the OP made it clear it was important to him to have it gone. –  MaQleod Sep 6 '11 at 14:51
1  
I don't really disagree with the technical content, but something about your wording rubbed me the wrong way. Maybe it subconsciously triggered the "the answerer didn't read the question" part of my brain, I don't know. –  Pops Sep 6 '11 at 15:02
show 3 more comments
  1. Get an external hard drive(s) large enough to hold everything good and bad. Use encryption software such as TrueCrypt to create encrypted partition(s) on the external hard drive. Copy everything good and bad onto the encrypted drive.

  2. Reboot and test that you're able to retrieve the files from the encrypted drive.

  3. Once you've backed up everything onto the encrypted drive, back up the headers of the encrypted drive according to the instructions of the particular encryption software.

  4. Format and reinstall your operating system, and also format any other external drives that might have "spicy" stuff.

  5. Copy back the non-spicy stuff onto your main hard drive(s).

  6. Put away the encrypted hard drive in the closet. If you later find that there is a legit file that you forgot to copy in step 5, you can dig up the encrypted hard drive to look for it. Since you won't be using the encrypted drive often, you're probably going to forget the password, so make sure to have a system to retrieve the password in case you forget (e.g. the first 12 letters of the first 12 words of Chapter 12 of a certain book).

On the encrypted drive you might consider creating the first partition as unencrypted with innocent stuff on it, so it's less obvious to somebody who uses the drive that it has any encrypted data. Or you could use the "hidden volume" feature of the encryption software, if the software you choose has the feature and you're willing to deal with the extra complexity.

share
27  
This is by far the best answer. I have the same problem that the Original Proponent has, and didn't want to delete the spicy files (collector's stuff), so I created encrypted block files which I mount only when I want to download more. Also, I use Linux, so things are a lot unfamiliar already to non-geeky GFs, and a block device without file extension, although huge, won't raise any suspicion, much less be mounted accidentally. –  heltonbiker Sep 5 '11 at 12:51
12  
@helton: instant +1 for "collector's stuff" –  Lohoris Sep 5 '11 at 15:45
2  
This solution is the best because you can access again the spicy media if you break up with your gf =) –  Andreas Bonini Sep 10 '11 at 22:17
show 2 more comments

This is a potential X-Y Problem (and I'm not talking about X and Y chromosomes). Your real objective (X) is, presumably, to maintain a healthy and successful relationship with your girlfriend and you've decided that purging your computer of all sexual content (Y) is the means to accomplish that.

Before you spend too much time and effort on Y, have you verified that it actually will accomplish, or at least contribute to, X?

In more straightforward terms, do you even know what your girlfriend's views are regarding porn in general and/or the specific flavors that you've enjoyed in the past? fungusakafungus has already advised honesty, which is imperative here. Beyond that, though, women these days are becoming increasingly tolerant of porn and, believe it or not, some of them actually like it.

Before you fall all over yourself groveling for forgiveness for having looked at other women before meeting her and swearing up and down that you'll never want to see any other woman naked again so long as you may live (trust me, no matter how much you mean it when you say it, you'll be lying), take a few minutes first to find out whether she even cares in the first place. She very well may not. Or maybe you'll discover that she's willing to show you her collection if you show her yours.

Otherwise, I have to refer back to part of Preet Sangha's answer: "If you can't talk to your partner honestly then I suspect maybe you should consider deleting or upgrading your potential partner?" Bigger issues than this will come up in any long-term relationship. If you can't talk about this, you'll be in bad shape when they do. And I maintain that any relationship which requires you to disavow your past and deny a part of yourself for the indefinite future, all out of fear that your partner might find out who you actually are, is simply not worth it.

share
8  
+1 "mabye she's willing to show you her collection" - exactly –  sehe Sep 10 '11 at 23:22
add comment

You can use Picasa to do a scan of all your media files on your computer, tag and organize them. This prevents you from having to do a reinstall and organize your media at the same time.

share
2  
+1 This is easy, even if potentially a bit time consuming, and actually answers op's question. Should be #1 IMO. –  Christopher Galpin Sep 6 '11 at 17:28
show 2 more comments

I don't think you're going to find a piece of software that can automatically identify media files of a certain genre or content, unless they are expressly tagged as such. :)

If you're really paranoid/worried about it, your only technical option is to backup the stuff you DO want to keep, format the drive, and reinstall your Operating System.

A few hours of pain doing that now may save a few weeks of pain if she finds them in the future.

Another option: Tell your G/F about them and explain yourself; if she leaves you, it wasn't meant to be. Honesty is the foundation of every good relationship. ;)

share
7  
If spicy means porn, then there really is software which will identify such content –  Scott Weinstein Sep 5 '11 at 20:20
1  
@Scott: How accurate is it these days? It's not something I follow, but the results were pretty poor (high rates of both false positives and false negatives) last I heard. –  Dave Sherohman Sep 6 '11 at 7:43
add comment

I'm not sure what all the relationship advice is doing here. That said:

A lot of research has gone into automatic identification of porn images. A quick google search brings up pages such as http://www.yangsky.com/products/porndetect/index.htm

share
1  
Interesting research! And a good answer, assuming the OP is in fact asking about porn, and not, say, dogfighting videos. –  Pops Sep 5 '11 at 19:46
2  
As I said in my answer, this smells like an XY problem to me and the appropriate response to XY problems is generally "this is the correct way to solve X", not "here's how to do Y". Telling them how to do Y leaves the actual problem unresolved. In this case, X is a social problem which cannot be resolved by any amount of purged data; a social solution is the only way to truly address it. –  Dave Sherohman Sep 6 '11 at 7:52
show 1 more comment

I was in a similar situation as you at one point, my girlfriend had just moved in with me and she got to see how much I really used my PC. In preparation, BEFORE she moved in, I swept all of the PCs for 'stuff'. I figured we were living together, working at the same company, and going to the same school, our lives were completely intertwined at that point, and that it was best to just get rid of all of the 'stuff'.

After moving in she would give me a hard time about all of the time that I wasn't paying attention to her by casually stating "There are sometimes that I think you like your computers more than you like me" ( there were 15 in the apartment in the second bedroom). Then she started getting inquisitive... "What ARE you doing when you are using your PC?" which I would poetically reply "I don't know, stuff" (Just a warning, that's really not the best answer).

One day, I'm cleaning up the hard drive on my PC, searching for old files and deleting the ones I didn't want to keep. She came in and asked "what are you doing?" I knew the coast was clear, because I already swept any spicy files BEFORE she moved in.

This particular day I was searching by file type, thinking I would just get rid of files that I didn't need that I had downloaded. This was the early days of the internet, so if I saw a cool program or picture, I felt compelled to save it because there was still the fear that this internet thing would 'go away' at some point.

Ah, the folly of youth... I invited her to sit down and join me, figuring that this would be a great opportunity for her to see what I was doing while I was using my PC. We went through 100 or so pictures together, all of family, and friends, and put them into folders so they were easy to find later. I stumbled on a picture named something like "Christmas Time.jpg" and figured it was a picture of me and my family when I was a kid, or a corny x-mas graphic.

I think I remember saying something like "See, were having a good time in front of the old PC. Hmm, let's see what this picture is honey". I double clicked the picture, and Windows opened a full screen preview of it, a girl naked in a santa suit in a VERY compromising position. In an instant I closed and deleted the picture. I had hoped that the whole process was too quick for her to realize what happened, or she had turned her head to look at the cat momentarily. In another instant I turned and looked at her to gauge her reaction. Her mouth was agape, and the color had sunk out of her face. It was too late. She had seen it all. The damage was done. Without saying a word, she got up and left the room. She didn't even give me time to try to talk my way out of it.

I got the silent treatment for about a week after that. To make matters worse, we were living together, working at the same company, and going to the same school, our lives were completely intertwined at that point.(DOH!) It seemed as if there was no way of ever living it down. I was sure she was on the verge of dumping me and moving back in with her parents.

Fast forward ten years... The whole incident wasn't as relationship busting as I had originally thought. We've been married for several years now, and have a beautiful, super smart child together.

The moral of the story is that it doesn't matter how you do it, you just need to get rid of ALL of the spiciness on your PC. If you leave any of it, there is a chance that you will get complacent and forget about something, or too proud and think that she will never find it. I guarantee it that she will find it, and it will definitely not be in the situation of your choosing. Just imagine her saying the first time you have a holiday together, "Hey mom, check out these great pictures we've got on our PC", right before inadvertently opening the illicit folder...

Back to the folly of youth... Looking back at the situation now, I realize that when I downloaded the free files in the first place I was just a desperate nerd looking for any outlet or chance at even one sided or virtual-ized interaction with a woman. I didn't realize it right away when my girlfriend moved in, but this was my chance to be with a woman. A real woman. After all... she liked me enough to want to share a house with me, there was no telling what would come of our relationship.

So congratulations man, you've made it. Don't be an idiot and screw it all up by holding on to any fictionalized ideas of what a woman should look like or do when a camera is pointed their way. You've got a real one that is going to start climbing in bed with you every night in the near future, so make the most of it. I suggest spending several nights and possibly a weekend or two alone BEFORE she moves in, completely deleting EVERYTHING that is even remotely 'spicy'.

How to round up the files? If you are using windows, you can use the built in search function. There is an option to search for 'Media" or "Movies and Pictures" since windows XP, just make sure to change the option to expand the search to look in system and hidden folders as well.

To catalog all of the images on your PC, use something like Picasa or Shotwell to find all of the images on your machine. These programs are fast and free, and will find every image on your PC.

http://yorba.org/shotwell/

http://picasa.google.com

Best idea AFTER you figure out your stray file issue, and you want to hold on to the illusion of what a woman may be? Use something like Virtual box for 'play' time. That way when your conscience rears it's head and your future wife wants to look at what your doing on line you will only have to delete ONE file.

http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html

http://www.virtualbox.org/

In closing, you will have to ask your self the following questions:

How do you want to run your relationship?

Do you want to build it on trust and respect? Or do you want to build it all on a foundation of deception?

Is a bird in the hand worth a folder full of smut?

After all, would you really keep a stack of issues of Hustler and Penthouse laying around for her to stumble on?

share
11  
"or she had turned her head to look at the cat momentarily" -- was the cat in a compromising position as well? –  sehe Sep 5 '11 at 7:09
4  
First time I read "How do you want to run your relationship?" I read "How do you want to RUIN your relationship?"... –  Rich Sep 5 '11 at 15:24
show 1 more comment

I agree with some answers here, though I'm quite surprised none have suggested to create her an account. You'll use your account, she'll use hers. You should do so regardless of this problem, anyway.

Of course this solves the problem only for the internal disks and not for the removable media.

share
5  
+1 for creating a new account. This should be done for anyone who shares a computer, regardless of "questionable" content. Files stored outside of the users directory, however, are still accessible by anyone (unless the permissions for the file or parent folder have been explicitly modified), so this is not necessarily a solution if the images are stored in a folder called C:\stuff or some such thing. –  Paperjam Sep 5 '11 at 19:00
2  
+1: Shared accounts are a tool of the Dark One. –  Dave Sherohman Sep 6 '11 at 7:54
add comment

If it was "during you younger and wilder days", I would try with date based search.

If you have Windows 7, write down in search box (after hitting Win button or clicking on Win sign) search. First result should be "Searches". Open it and then hit icon "Everywhere". It will list all files you have on your disks (and which can be accessed from Windows). Right click somewhere on black space on the right margin, sort by and then hit "More...". It will list atrributes by which those files can be sorted. I guess, for you ones starting with Date will be the most interesting. Look also for Duration, Year, Frame rate (to filter video files) and maybe Tags if you're lucky.

share
1  
+1 for date based search. If you can include this in a search pattern along with other criteria like type and size, excluding folders known to be clean, etc. you can probably narrow the search down considerably. –  Shawn Sep 6 '11 at 2:24
add comment

Buy a second hard drive, and install any operating system on it. Then you can "dual boot" your dirty OS for play time, and your clean OS for girlfriend time.

DUAL BOOT IS THE WAY TO GO. Just make sure to keep a password on it so she can't stumble into the dirty one.

share
show 2 more comments

Use windows search to find "*.avi, *.mkv, *.jpg" etc, etc. Then enlarge the icons on the search results so they have previews and quickly scroll through them for "dirty" photos and videos. Another tip would be to set the file size to above a certain amount (100KB for instance) so you dont get windows system gifs and jpegs.

share
add comment
  1. Remove the spicy files: Run picasa (or other image indexer) on your hard drive. Delete all spicy images. Run windirstat on your hard drive or search for all movie formats (*.avi, *.mpg, *.mpeg, *.flv, etc) and look for large movies, etc. Delete all spicy movies.
  2. Keep This Cleaned HD as a Backup: Buy a new hard drive (say bigger size; honestly label old one as backup), reinstall the OS, important programs, copy over select non-spicy files that you need, and your old hard drive is now the backup (not stored in the machine). Personally, I would not encrypt this drive -- that will raise huge red flags like you have something to hide (unless the spicy photos had something you need to hide from her at all costs; e.g., spicy photos with just men).

This is overkill for a reasonable gf moving in (unless she's already let it known that's she's strong anti-spice)--just do the first step (if one spicy photo makes it through that was downloaded years earlier; she won't care too much). However, if you wanted to do the same thing but for a different reason; say small children will be using the computer this makes sense.

Also, I wouldn't trust answers saying delete everything but files known to be safe. You will forget something that you will want later on.

share
add comment

Find files on the drive with the extensions of media files. I doubt your work stuff has a lot of such stuff scattered all over the place.

share
add comment

there's programs to do that.

But they aren't ready-for-use in your situation. Anyway, it might worth taking a look:

http://www.safevchat.org/ -> detects nudity in chat room

http://www.patrick-wied.at/static/nudejs/ -> using javascript. Some review about it here: http://davidwalsh.name/nudejs

PORNsweeper -> from http://money.cnn.com/2000/09/20/technology/porn_sweep/

share
add comment

you could tell her that you are being honest & open with her... that way you would build (more) trust and openness.

plus this way you can tell her that if she (by-chance) stumbles upon some "spicy" media she can delete it (if she wishes)..

Update: you could consider using Google Picasa to list out all images in your computer.. it will be one stop shop to finding all images, videos (basically any media) & you can categories them & then delete.

share
add comment

You can run a batch script to delete any and every image. Just put it into the directory you want to delete all the images, it will also delete images in sub-directories

@echo off
echo Deleting files
del /s /f *.png
del /s /f *.gif
del /s /f *.jpg
del /s /f *.bmp
:: you can add more file types.
echo Operation completed!
echo. Done!
pause

Just copy and paste it into notepad or another text editor and save it as a *.bat file. Updated to delete read only files.

share
1  
and this would delete... EVERY file, even ones that are useful in some way. –  Journeyman Geek Sep 5 '11 at 0:58
1  
I'd much prefer if there was some processing of the images, to automatically find only X-rated ones. Otherwise you'll be spending way too much time sifting through the images yourself. It's difficult though. –  jonathanconway Sep 5 '11 at 8:13
show 4 more comments

On a serious technical answer, apps like GrandPerspective and WinDirStat might be your only "friends". But nobody can really beat fungus's answer - this is a social issue and you should aproach it as such.

share
add comment

Actually the best tool for finding hidden porn on a computer is an unsuspecting partner, just try it - they'll find it no matter how hidden it is. :-)

Seriously though - there are many many tools (like windirstat) that will help you find and delete them. The question remains however....

If the files have remained on your system for this length of time then I suspect that they have become 'sticky'. This leads to them reappearing (usually in the middle of the night) a while after they've been deleted. You need perhaps a more long term solution - my suggestion is that

  1. If you can't talk to your partner honestly then I suspect maybe you should consider deleting or upgrading your potential partner?
  2. Consider taking the disk out of the PC, and destroying it by smashing it against a wall. Consider perhaps smashing it against something else as a reminder that the Internet is here to stay in you life forever.

The first option may remove the problem in the simplest way, while the second, though more drastic, may only be the short term solution and could possibly lead to a more pressing longer (maybe shorter!) term problem.

BTW: This the best SU question I've ever seen; kudos for posting it.

share
3  
It's about removing material. If the material doesn't need to be removed then the problem is gone. –  Preet Sangha Sep 5 '11 at 6:57
1  
The first, single-line, version of this answer was so much better and to the point. This edit is a jungle of random stuff. –  Lohoris Sep 5 '11 at 15:49
show 3 more comments

You can try indexing and filtering files on your computer using some kind of app or manualy written script.

Then you get paths to the stuff, and then you can manually check it (it will make that any type of 'dangerous' file will be caught (or maybe it is spelled cought?).

You can filter out directories created recently for photos with your girlfriend etc or movies from your engagement or somewhat. The list will be shorter then. You can also do it reverse way - find only files you are willing to save and wipe this ol' n'full-of-dirty-media-piece-of-steel-and-sillicon!

Sorry but I haven't time for now to write such an app/script, but hope this method would help you.

share
add comment

When you say PC, I'm assuming you're running Windows.

Windows 7 Explorer you can type kind:picture and it'll find all picture files on your computer, otherwise something like *.jpg,*.gif,*.jpeg,*.bmp,*.png might work. Unless you're like the rest of us that saves them to *.zip and renames those, you're not in too bad a situation.

It'll take time, but make sure you look at them. You might be able to avoid certain directories, but be sure to also scan your Temporary Internet Files folders as well as your browser download folders.

If it's really a concern, the best way would be to do what you don't want to and that's to copy the files you know you need to a clean drive, then reformat/reinstall and copy back your old files. It's not fullproof, since you are retaining old files, but it's something. Sometimes it's good just to start from scratch anyhow (for peace of mind).

share
add comment

I have code that will put all the files with specific extension to one folder from given source. If you are able to find from those, it will be easier to search in one folder instead of the whole drive.

The code is here, and the procedure is as follows:

  1. Copy the code below into a text file and save it as a .vbs file.
  2. Replace D:\Src\ and D:\ALL Dist\ with your source and destination folders.
  3. Now save the code and just double click the file.

Code:

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Call ListFolderContents("D:\Src\")
Set fso = Nothing

Sub ListFolderContents(path)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Dim strSourceFolder
Dim strDestFolder
strDestFolder="D:\ALL Dist\"
Set folder = fso.GetFolder(path)
'wscript.echo folder.path

For Each objFile in folder.files
sourceFileName = fso.GetFileName(objFile)
'wscript.echo folder.path+"\"+sourceFileName
sourceFileName = folder.path+"\"+sourceFileName
If fso.FileExists(sourceFileName) Then
If not fso.FileExists(strDestFolder) Then
fso.CopyFile sourceFileName, strDestFolder, TRUE
End If
End If
Next
'fso.CopyFile sourceFile, destFileName

For each item in folder.SubFolders
ListFolderContents(item.Path)

Next
set folder = Nothing
End Sub
share
add comment

[...] caused me to put these files in odd places on my hard drives

Also note that some directories, including temporary internet files, might not be easily searchable using standard tools. (Like: Windows Explorer does not really show one the true contents of its Temporary Internet Files folder.) And temporary internet files might not have a recognizable file name extension. But that's mostly solved by clearing the temporary files.

But if you used non-standard file name extensions yourself, then Windows won't help you find them unless you use some utility that relies on examining the file, including using magic numbers. Or, if you're not on Windows at all, then surely you cannot rely on file name extensions when searching, as many operating systems simply don't require such extensions.

To search by examining the file contents, if possible using magic numbers, tested on a Mac:

#!/bin/bash

# Recurses into all subdirectories of the current folder, to determine which
# file types are present in that directory. As this takes a long time to run,
# this also stores the results for later use.

# Recurse all directories from current directory:
find . -type d | while read dirname; do 
    # For each directory: 
    #   - find -type f   find all regular files
    #   -   -exec echo   print the directory name and some comma separators
    #   -   -exec file   print the MIME type
    #   - sort           group lines with similar MIME types
    #   - uniq -c        count all unique combinations of directory and type
    #   - tee            show result(s) on screen and append to file
    #
    # So, the following appends count, directory name and MIME type, like
    #   41 ,./my/directory/name,image/jpg
    #    3 ,./my/directory/name,image/png
    #   12 ,./my/directory/name,video/x-flv
    # to a comma-separated output file:

    find "$dirname" -mindepth 1 -maxdepth 1 -type f \
        -exec echo -n ",$dirname," \; -exec file -b --mime-type "{}" \; \
       | sort | uniq -c | tee -a folders-and-types.csv
done

echo "Found the following MIME types:"
cut -d , -f 3 folders-and-types.csv | sort | uniq

echo "Found images and videos in the following subdirectories:"
grep ",image\|,video" folders-and-types.csv

To get a list including the file names, one could filter the file types right away, when sure about the MIME types that should be included:

find . -type d | while read dir; do 
    # The following appends the file path and MIME type, like
    #   ./my/directory/name/favicon.ico: image/x-ico; charset=binary
    #   ./my/directory/name/test.jpg: image/jpg
    #   ./my/directory/name/test.me: image/png
    #   ./my/directory/name/test.temp: video/x-flv
    # to the output file:
    find "$dir" -mindepth 1 -maxdepth 1 -type f \
        -exec file --mime-type "{}" \; \
        | grep ": audio\|: image\|: video" | tee -a all-media-files.txt
done

Both approaches need a very long time to complete, and will give you a very long list. But I think it's the only reliable way on non-Windows machines, and when you've been using odd file name extensions.

On Linux, something similar will work. On Windows, this would require using something like Cygwin or GnuWin, or booting into Linux using a Live CD.

Beware that you might also be interested in application/zip and similar MIME types, or even application/octet-stream for unknown file types.

share
add comment

First, I recommend that you follow the advice about using an image manager to find all your pictures and talk to her about the images you like.

Second, you should enable separate user accounts for both yourself and her. This will ensure that your stuff will stay yours and her stuff will stay hers. Store all your pics and whatnot somewhere in your directories and you won't have to worry about anyone stumbling across anything with a bit of heat.

share
show 2 more comments

Forget the content of just some files: this site is for superusers and if your files are disorganized that's a big problem, too. :) You need to get it all organized. If you're on Windows, try a program like WinDirStat to get a sense of where different filetypes are located, how you're using space, etc.

If you're on Linux, try simple command line tools like find. For instance, you can look for the most common file extensions via

find . -type f -printf "%f\n" | cut -f 2- -d "." | sort | uniq -c | sort -nr | head -n 30

Or you can ignore certain file types:

find . -type f -printf "%f\n" | grep -iv dll | cut -f 2- -d "." | sort | uniq -c | sort -nr | head -n 30

To find the assortment per subdirectory:

find . -type f -iname "*.jpg" | cut -f 2 -d "/" | sort | uniq -c | sort -nr | head

Anyway, take the time to get all your stuff organized. You're trying to make a good overall impression here. (And don't forget to clean your bathroom and fridge! Your bachelor days are OVER. Congrats.)

share
show 3 more comments

protected by Nifle Jul 16 '12 at 11:41

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.