0981: "Porn Folder"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

User avatar
Quicksilver
Posts: 437
Joined: Wed Apr 29, 2009 6:21 am UTC

0981: "Porn Folder"

Postby Quicksilver » Wed Nov 23, 2011 5:59 am UTC

Image
http://xkcd.com/981
Alt text:"Eww, gross, you modified link()? How could you enjoy abusing a filesystem like that?"
stick it in Program Files. or is this just fileception?

jpk
Posts: 607
Joined: Sat Nov 13, 2010 7:33 am UTC

Re: 0981: "Porn Folder"

Postby jpk » Wed Nov 23, 2011 6:08 am UTC

I came to comment, but I realized that there's absolutely nothing interesting to say about internet pornography anymore.

And really, I don't have that much to say about hard loops in file systems, either. I guess, if that's your kink, and you do it on your own drives, you're not going to hurt anyone, so go for it.

User avatar
iChef
Posts: 343
Joined: Fri Oct 15, 2010 9:33 pm UTC
Location: About 5 cm. south of the ring finger, USA.

Re: 0981: "Porn Folder"

Postby iChef » Wed Nov 23, 2011 6:21 am UTC

I'll be in my room hardlinking my directory, if you know what I mean.

Sure you can do it on your own drive, but if you do it to a shared network drive does that count as an orgy?
Those whom God loves, he must make beautiful, and a beautiful character must, in some way, suffer.
-Tailsteak author of the Webcomics 1/0 and Leftover Soup

User avatar
Sean Quixote
Posts: 229
Joined: Tue Sep 14, 2010 1:20 am UTC
Location: Ubeki-beki-beki-beki-stan-stan

Re: 0981: "Porn Folder"

Postby Sean Quixote » Wed Nov 23, 2011 6:22 am UTC

I wonder. Has xkcd itself been Rule 34'ed yet?

I know there was that wetriffs thing, and a recent comic about Fitocracy or some such thing, but has it ever really bindun?

WizenedEE
Posts: 27
Joined: Wed Dec 01, 2010 5:23 am UTC

Re: 0981: "Porn Folder"

Postby WizenedEE » Wed Nov 23, 2011 6:33 am UTC

:?
recursionedited.png


All that work of making find deal with recursion has finally paid off.

Spoiler:
darn.

User avatar
RebeccaRGB
Posts: 336
Joined: Sat Mar 06, 2010 7:36 am UTC
Location: Lesbians Love Bluetooth
Contact:

Re: 0981: "Porn Folder"

Postby RebeccaRGB » Wed Nov 23, 2011 6:38 am UTC

I once heard of someone who hard-linked a directory like that, and was unable to get his computer to boot again. [/urban-legend]

I don't see why we couldn't write software that checks for cycles in the path of inodes it follows to avoid that, though.
Stephen Hawking: Great. The entire universe was destroyed.
Fry: Destroyed? Then where are we now?
Al Gore: I don't know. But I can darn well tell you where we're not—the universe!

nowhereman
Posts: 68
Joined: Thu Apr 15, 2010 5:46 pm UTC

Re: 0981: "Porn Folder"

Postby nowhereman » Wed Nov 23, 2011 6:49 am UTC

I think I should start off the awfulness... What gets me off is making a folder for every first letter of every individual program folder. Then I add inside each folder created this way the second letter and so on until I get trees like C:\P\r\o\g\r\a\m\f\i\l\e\s or for my Linux buds out there: home/f/i/r/e/f/o/x.

In actuality the 11th puzzle in HackThisSite.org irritated me for days on end. Then again, pushing buttons and grabbing and shaking things is a lot like what I do with porn.
"God does not play dice with... Yahtzee!" - Little known quote from Einstein

myoilu
Posts: 26
Joined: Tue Jan 25, 2011 4:50 pm UTC

Re: 0981: "Porn Folder"

Postby myoilu » Wed Nov 23, 2011 7:02 am UTC

my first GOOMHR, i feel like i've accomplished something...

User avatar
Nyerguds
Posts: 62
Joined: Mon Aug 27, 2007 7:43 am UTC

Re: 0981: "Porn Folder"

Postby Nyerguds » Wed Nov 23, 2011 7:16 am UTC

Hahaha! Don't know if you got this feature in any Linux GUI (probably), but in windows, you can press '*' to "expand all" in a tree.

Cue endless loop that hangs the file browser :mrgreen:

Mardeg
Posts: 7
Joined: Wed Nov 23, 2011 7:03 am UTC

Re: 0981: "Porn Folder"

Postby Mardeg » Wed Nov 23, 2011 7:48 am UTC

I saw Truecrypt installed on a friend's machine and praised him, but he said he didn't use it and just had it there as a discouragement to look for the unencrypted porn.

enigmamf
Posts: 6
Joined: Mon Nov 14, 2011 5:44 am UTC

Re: 0981: "Porn Folder"

Postby enigmamf » Wed Nov 23, 2011 8:12 am UTC

Apple implemented directory hard links in HFS for Time machine - you don't have to modify link(), but you do have to compile your own program to call it (see http://stackoverflow.com/questions/80875/what-is-the-bash-command-to-create-a-hardlink-to-a-directory-in-os-x)

Apeiron
Posts: 117
Joined: Tue Feb 12, 2008 5:34 pm UTC

Re: 0981: "Porn Folder"

Postby Apeiron » Wed Nov 23, 2011 8:19 am UTC

Dear Randall,

Question marks mark questions.

User avatar
CorruptUser
Posts: 8881
Joined: Fri Nov 06, 2009 10:12 pm UTC

Re: 0981: "Porn Folder"

Postby CorruptUser » Wed Nov 23, 2011 8:19 am UTC

I actually do wonder if sexbots will not only have sexual fantasies, but weird and depraved fantasies like this.

tyler.daniels
Posts: 3
Joined: Wed Nov 23, 2011 8:32 am UTC

Re: 0981: "Porn Folder"

Postby tyler.daniels » Wed Nov 23, 2011 8:37 am UTC

Apeiron wrote:Question marks mark questions.

I think he was trying to punctuate the inflexion/intonation of his confusion.

barasawa
Posts: 13
Joined: Wed Mar 16, 2011 3:35 pm UTC

Re: 0981: "Porn Folder"

Postby barasawa » Wed Nov 23, 2011 8:42 am UTC

Doing tech support, you have no idea how many times we got calls on things like this.
We referred to it as An Infinitely Recursive Drive (or Folder).

If someone was doing a full antivirus scan, it would end up crashing. Same thing if they tried to get the properties of one of those folders or drives in that kind of mess.

And the number of people that completely borked their system because, "I found another copy of my everything on my drive in that folder, so I deleted it."...

Ironically, it was an easy problem, and once you identified it, it was a two minute fix max if you had the right tools and the person on the computer was cooperative and not computer illiterate. (Does not apply if they already tried moving or deleting it... Then it's just a total freaking mess.)

User avatar
Richard.
Posts: 47
Joined: Mon Sep 21, 2009 12:29 am UTC
Location: On the internets
Contact:

Re: 0981: "Porn Folder"

Postby Richard. » Wed Nov 23, 2011 8:58 am UTC

tyler.daniels wrote:
Apeiron wrote:Question marks mark questions.

I think he was trying to punctuate the inflexion/intonation of his confusion.

Exactly, which is literally what the word 'punctuation' conveys. See, look, I am doing it a shitton in this very post.
we live in a beautiful world.

Spoiler:
Image

User avatar
AvatarIII
Posts: 2098
Joined: Fri Apr 08, 2011 12:28 pm UTC
Location: W.Sussex, UK

Re: 0981: "Porn Folder"

Postby AvatarIII » Wed Nov 23, 2011 9:08 am UTC

just name any folder anywhere system32, people will generally not touch it.

userxp
Posts: 436
Joined: Thu Jul 09, 2009 12:40 pm UTC

Re: 0981: "Porn Folder"

Postby userxp » Wed Nov 23, 2011 10:40 am UTC

In Windows, I enjoy naming my folders "con".

User avatar
BAReFOOt
Posts: 179
Joined: Mon Jul 19, 2010 7:48 am UTC

Re: 0981: "Porn Folder"

Postby BAReFOOt » Wed Nov 23, 2011 11:20 am UTC

I always said: If it’s not full graphs, it’s not worth using. ^^

That’s why I replaced all databases, files systems, files, the Internet the hardware abstraction layer, the user interface, Facebook and all trees outside of my apartment with a big unified graph of everything with no root.

User avatar
BAReFOOt
Posts: 179
Joined: Mon Jul 19, 2010 7:48 am UTC

Re: 0981: "Porn Folder"

Postby BAReFOOt » Wed Nov 23, 2011 11:24 am UTC

userxp wrote:In Windows, I enjoy naming my folders "con".

I prefer “$MFT”. Or for images: $Bitmap. :P

User avatar
Menacing Spike
Posts: 2982
Joined: Wed Jan 06, 2010 8:25 pm UTC
Location: Fighting the Zombie.

Re: 0981: "Porn Folder"

Postby Menacing Spike » Wed Nov 23, 2011 11:57 am UTC

A question for the UNIX geeks: do the recursive exploration commands store the inodes to avoid that kind of loop?

thepowersgang
Posts: 1
Joined: Wed Nov 23, 2011 12:10 pm UTC

Re: 0981: "Porn Folder"

Postby thepowersgang » Wed Nov 23, 2011 12:13 pm UTC

Shouldn't that be... Folder Porn? (Puts on sunglasses)

That said, it is delightfully evil to implement recursive loops like that, and most smart programs will keep track of inodes to avoid duplication and infinite recursion.

dns_server
Posts: 6
Joined: Mon Apr 21, 2008 10:25 am UTC

Re: 0981: "Porn Folder"

Postby dns_server » Wed Nov 23, 2011 12:18 pm UTC

Menacing Spike wrote:A question for the UNIX geeks: do the recursive exploration commands store the inodes to avoid that kind of loop?

Most kind of searching commands avoid this by not following symlinks by default.
There is usually an option to follow symlinks so i would assume this keeps the inode reference.

This comic reminds me of some of the things you used to be able to do with a windows file system.
From memory there were some file system bugs with windows where if you created a folder tree bigger than 20 you exposed some bugs with vfat on windows.
I can remember that if you created a big folder tree say 15 deep and copied that into a big folder tree you could get a tree further than you were suppose to.
It was impossible to delete the tree from the base as explorer gave up on finding the leaf node.
I think the folders would eventually loop if you tried to open them up one at a timebut that might be my memory.

TheCycoONE
Posts: 12
Joined: Wed Nov 17, 2010 7:40 pm UTC

Re: 0981: "Porn Folder"

Postby TheCycoONE » Wed Nov 23, 2011 1:19 pm UTC

dns_server wrote:
Menacing Spike wrote:A question for the UNIX geeks: do the recursive exploration commands store the inodes to avoid that kind of loop?

Most kind of searching commands avoid this by not following symlinks by default.
There is usually an option to follow symlinks so i would assume this keeps the inode reference.


Unfortunately the question and comic weren't about symlinks where this kind of thing is expected. Hardlinking a directory is not generally allowed at all (hence the reference to modifying link()) I would imagine the ability to handle that situation was implementation dependent, but I haven't tested it.

heltonbiker
Posts: 4
Joined: Fri Nov 18, 2011 11:43 am UTC

Re: 0981: "Porn Folder"

Postby heltonbiker » Wed Nov 23, 2011 1:35 pm UTC

Mardeg wrote:I saw Truecrypt installed on a friend's machine and praised him, but he said he didn't use it and just had it there as a discouragement to look for the unencrypted porn.


I actually use it. It even has a mounting script and a backup scheme to another hard drive. Now my biggest risk is someone deleting the huge, apparently useless, and unidentifiable block file to free some disk space. But that won't happen.

(Wait, what if I forget a paused slideshow open to answer the doorbell... Oh me yarm!!!)

Harry Voyager
Posts: 52
Joined: Thu Nov 04, 2010 7:55 am UTC

Re: 0981: "Porn Folder"

Postby Harry Voyager » Wed Nov 23, 2011 1:43 pm UTC


User avatar
Fenix Rising
Posts: 6
Joined: Wed Aug 17, 2011 3:32 pm UTC
Location: The People's Republic of Socialist Romanistan

Re: 0981: "Porn Folder"

Postby Fenix Rising » Wed Nov 23, 2011 2:02 pm UTC

Harry Voyager wrote:I wonder...


I see what you did there.

User avatar
A. Smith
Posts: 125
Joined: Mon Feb 11, 2008 5:01 am UTC
Location: Under a Hyperspace Bypass

Re: 0981: "Porn Folder"

Postby A. Smith » Wed Nov 23, 2011 2:15 pm UTC

FOLDERCEPTION.

hamjudo
Posts: 86
Joined: Wed Feb 16, 2011 6:56 pm UTC

Re: 0981: "Porn Folder"

Postby hamjudo » Wed Nov 23, 2011 2:35 pm UTC

TheCycoONE wrote:
dns_server wrote:
Menacing Spike wrote:A question for the UNIX geeks: do the recursive exploration commands store the inodes to avoid that kind of loop?

Most kind of searching commands avoid this by not following symlinks by default.
There is usually an option to follow symlinks so i would assume this keeps the inode reference.


Unfortunately the question and comic weren't about symlinks where this kind of thing is expected. Hardlinking a directory is not generally allowed at all (hence the reference to modifying link()) I would imagine the ability to handle that situation was implementation dependent, but I haven't tested it.


One simple technique is to track filesystem depth. They add one each time they enter a directory, subtract one when they exit. If they go too deep they assume something is wrong.

There are lots of filesystems out there. Particularly in the world of network, and user filesystems, inodes are not always a nice simple 32 bit number.

User avatar
WolfieMario
Posts: 120
Joined: Fri Jan 28, 2011 10:45 pm UTC
Contact:

Re: I wonder...

Postby WolfieMario » Wed Nov 23, 2011 2:37 pm UTC

"Sometimes game development isn't about doing what is nice to everyone all the time." - Jens Bergensten

sjorford
Posts: 28
Joined: Wed Jan 14, 2009 9:52 am UTC

Re: 0981: "Porn Folder"

Postby sjorford » Wed Nov 23, 2011 2:42 pm UTC

Came across one of these built into the AS/400 IFS. The root contains a /QOpenSys folder for... some sort of UNIXy related reason*, and that contains a subfolder called /QOpenSys which is a link back to itself.

*I know just enough about AS/400s to be dangerous, and even less about UNIX

User avatar
thesingingaccountant
Posts: 57
Joined: Fri Jul 22, 2011 1:18 pm UTC
Location: My trusty tablet, most likely

Re: 0981: "Porn Folder"

Postby thesingingaccountant » Wed Nov 23, 2011 2:52 pm UTC

Someday I should learn how computers work so that jokes like this will make more sense to me. Will my Introduction to Programming class next semester help in any way?
Never trust a psychic who has to reschedule.

erzx
Posts: 1
Joined: Wed Nov 23, 2011 3:38 pm UTC

Re: 0981: "Porn Folder"

Postby erzx » Wed Nov 23, 2011 4:04 pm UTC

mount --bind could do similar effect as a physical hard link:

Code: Select all

mkdir -p a/b/a
mount --bind a a/b/a
cd a/b
cd a/b
cd a/b

/Un/fortunately it doesn't nest, so the last cd won't work. Another trick:

Code: Select all

mkdir temp
mount --bind dir1 temp
mount --bind dir2 dir1                                                     
mount --move temp dir2                                                     
rmdir temp

Now the contents of dir1 is visible in dir2, and vice versa. Confusing but fun. (works in Linux, at least).

User avatar
Menacing Spike
Posts: 2982
Joined: Wed Jan 06, 2010 8:25 pm UTC
Location: Fighting the Zombie.

Re: 0981: "Porn Folder"

Postby Menacing Spike » Wed Nov 23, 2011 4:04 pm UTC

thesingingaccountant wrote:Someday I should learn how computers work so that jokes like this will make more sense to me. Will my Introduction to Programming class next semester help in any way?


For this joke? Not really at all, no.

Also why not a longer loop.

User avatar
6453893
Posts: 557
Joined: Wed Dec 13, 2006 2:40 am UTC
Location: Australia

Re: 0981: "Porn Folder"

Postby 6453893 » Wed Nov 23, 2011 4:37 pm UTC

My porn folder is one of a few hundred folders in various nestled configurations, all with dull, system-y sounding names. A lot of the dummy paths already contain copies of themselves inside themselves. If I looped them as well, finding the porn would be that much closer to impossible.

kurkosdr
Posts: 17
Joined: Thu May 20, 2010 4:51 pm UTC

Re: 0981: "Porn Folder"

Postby kurkosdr » Wed Nov 23, 2011 4:52 pm UTC

In Unix systems, placing a file called “-r“ in the home directory will result in deletion of all subfolders if the user types rm * to delete all files that are not inside subfolders, or if the user tries to delete all files in the home directory containing the letter “r“ (rm *r*). Don‘t know if it works on Linux.

User avatar
Exüberance
Posts: 23
Joined: Mon Oct 06, 2008 5:33 pm UTC

Re: 0981: "Porn Folder"

Postby Exüberance » Wed Nov 23, 2011 5:00 pm UTC

I once mounted my filesystem within itself (as part of a thing for making incorrectly-programmed 32-bit programs use the 32-bit libraries instead of the 64-bit ones while still being able to access the rest of the system).

I later realized I didn't need it anymore, so I deleted the folders ............ before unmounting it first.

Yeah, that broke everything. I was able to recover a lot pretty easily though.


Also, on my cousin's portable harddrive (he uses Windows), there exists a folder with quotes in it that I put there. Windows has an aneurysm whenever it sees characters it decides it doesn't like, so he can't move, delete, access, or rename the folder. It just sits there... taunting him. It's empty though- I'm not a complete jerk :p

6453893 wrote:My porn folder is one of a few hundred folders in various nestled configurations, all with dull, system-y sounding names. A lot of the dummy paths already contain copies of themselves inside themselves. If I looped them as well, finding the porn would be that much closer to impossible.


Unless they just do a search for file nodes in the maze of folders.

kurkosdr wrote:In Unix systems, placing a file called “-r“ in the home directory will result in deletion of all subfolders if the user types rm * to delete all files that are not inside subfolders, or if the user tries to delete all files in the home directory containing the letter “r“ (rm *r*). Don‘t know if it works on Linux.


It works in bash. The reason is that the wildcard * is expanded by the terminal, then interpreted rather than the program interpreting the *. This is why Linux doesn't let you use "/" in filenames (plus it would be confusing!)

I'm not sure about other shells. I'm actually kind of surprised that * doesn't escape - characters when it expands. Would be a pretty easy fix I would think

EDIT: Trying to delete the "-r" file doesn't work even when wrapped in single quotes. o.O Wuuhhhhh? I can delete it graphically through nautilus though. Weird.
Maybe * DOES escape the character properly, but rm for some reason interprets it as a flag? Most peculiar :?:

User avatar
bmonk
Posts: 662
Joined: Thu Feb 18, 2010 10:14 pm UTC
Location: Schitzoed in the OTT between the 2100s and the late 900s. Hoping for singularity.

Re: 0981: "Porn Folder"

Postby bmonk » Wed Nov 23, 2011 5:26 pm UTC

CorruptUser wrote:I actually do wonder if sexbots will not only have sexual fantasies, but weird and depraved fantasies like this.

Only if you tell them to "Go do yourself"? :twisted:
Having become a Wizard on n.p. 2183, the Yellow Piggy retroactively appointed his honorable self a Temporal Wizardly Piggy on n.p.1488, not to be effective until n.p. 2183, thereby avoiding a partial temporal paradox. Since he couldn't afford two philosophical PhDs to rule on the title.

dantman
Posts: 7
Joined: Fri Oct 02, 2009 6:34 am UTC

Re: 0981: "Porn Folder"

Postby dantman » Wed Nov 23, 2011 5:48 pm UTC

Exüberance wrote:I'm not sure about other shells. I'm actually kind of surprised that * doesn't escape - characters when it expands. Would be a pretty easy fix I would think

EDIT: Trying to delete the "-r" file doesn't work even when wrapped in single quotes. o.O Wuuhhhhh? I can delete it graphically through nautilus though. Weird.
Maybe * DOES escape the character properly, but rm for some reason interprets it as a flag? Most peculiar :?:


To a program -r '-r' and "-r" are all the same, no matter what you use the program gets the string '-r' there is no concept of named arguments in the shell, only a list of strings to pass to a program, so the program is the one that handles the parsing of arguments. Hence since it gets -r any amount of shell level escaping is futile.

You can use -- to separate args from filenames when using rm, so `rm -- '-r'` will delete the file "-r".

User avatar
tetsujin
Posts: 426
Joined: Thu Nov 15, 2007 8:34 pm UTC
Location: Massachusetts
Contact:

Re: 0981: "Porn Folder"

Postby tetsujin » Wed Nov 23, 2011 6:00 pm UTC

So the guy is enough of a Unix geek to want to create a hard-linked directory loop - but both characters refer to directories as "folders"?

("folder" may actually be a better abstraction than "directory" to describe a point in a directory hierarchy - but I always thought of it as a Windows-ism.)

As for the "rm -r" thing, just use a relative path instead of a bare filename:

Code: Select all

$ ls
-r a
$ rm -r
rm: missing operand
$ rm ./-r
$ ls
a
---GEC
I want to create a truly new command-line shell for Unix.
Anybody want to place bets on whether I ever get any code written?


Return to “Individual XKCD Comic Threads”

Who is online

Users browsing this forum: No registered users and 76 guests