0981: "Porn Folder"

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

Moderators: Moderators General, Magistrates, Prelates

Re: 0981: "Porn Folder"

Postby engr » Wed Nov 23, 2011 7:11 pm UTC

Desktop - My Computer - C - Windows - Desktop - My Computer - C - .....
At least that's how it was on Windows 98, I think.
engr
 
Posts: 270
Joined: Sat Sep 25, 2010 3:08 am UTC

Re: 0981: "Porn Folder"

Postby cream wobbly » Wed Nov 23, 2011 7:29 pm UTC

dns_server wrote:Most kind of searching commands avoid this by not following symlinks by default.

Yeah. Today's comic is about hard links. Symlinks are not this.
cream wobbly
 
Posts: 158
Joined: Mon Aug 03, 2009 3:07 pm UTC

Re: 0981: "Porn Folder"

Postby cream wobbly » Wed Nov 23, 2011 7:31 pm UTC

engr wrote:Desktop - My Computer - C - Windows - Desktop - My Computer - C - .....
At least that's how it was on Windows 98, I think.

Likely. But inserting non-files into a filesystem is a strange and unique concept -- a hack. Hard linking, by comparison, is logical, and fits the filesystem model.
cream wobbly
 
Posts: 158
Joined: Mon Aug 03, 2009 3:07 pm UTC

Re: 0981: "Porn Folder"

Postby cream wobbly » Wed Nov 23, 2011 7:33 pm UTC

tetsujin wrote: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.)

The presence of hardlinked directories should be a sufficient clue as to what OS they're using.
cream wobbly
 
Posts: 158
Joined: Mon Aug 03, 2009 3:07 pm UTC

Re: 0981: "Porn Folder"

Postby Tobu » Wed Nov 23, 2011 7:42 pm UTC

I'm pretty sure most filesystem implementations are vulnerable to malicious on-disk structures; a directory loop would be an easy denial of service at the least.
Tobu
 
Posts: 19
Joined: Mon Aug 10, 2009 10:09 pm UTC

Re: 0981: "Porn Folder"

Postby ARandomDude » Wed Nov 23, 2011 7:48 pm UTC

ARandomDude
 
Posts: 60
Joined: Mon Dec 28, 2009 7:10 pm UTC

Re: 0981: "Porn Folder"

Postby rhomboidal » Wed Nov 23, 2011 8:18 pm UTC

The actual porn is in "calendar/backthatassup"
User avatar
rhomboidal
 
Posts: 320
Joined: Wed Jun 15, 2011 5:25 pm UTC

Re: 0981: "Porn Folder"

Postby perakojot » Wed Nov 23, 2011 8:18 pm UTC

cream wobbly wrote:inserting non-files into a filesystem is a strange and unique concept -- a hack.

/dev/*
/proc/*
/sys/*
perakojot
 
Posts: 19
Joined: Mon Apr 26, 2010 3:58 pm UTC

Re: 0981: "Porn Folder"

Postby Exüberance » Wed Nov 23, 2011 8:39 pm UTC

engr wrote:Desktop - My Computer - C - Windows - Desktop - My Computer - C - .....
At least that's how it was on Windows 98, I think.


Wasn't that just a shortcut (ie, not a symlink, just a think that makes Windows Explorer go to a different place) though?
User avatar
Exüberance
 
Posts: 22
Joined: Mon Oct 06, 2008 5:33 pm UTC

Re: 0981: "Porn Folder"

Postby project2051 » Wed Nov 23, 2011 10:44 pm UTC

I keep my porn on the desktop.. I can't waste time clicking through folders to get to it. :P
project2051
 
Posts: 113
Joined: Fri Jan 29, 2010 2:20 pm UTC

Re: 0981: "Porn Folder"

Postby gormster » Wed Nov 23, 2011 11:06 pm UTC

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


thatsthejoke.jpg
Eddie Izzard wrote:And poetry! Poetry is a lot like music, only less notes and more words.
gormster
 
Posts: 205
Joined: Mon Jul 23, 2007 6:43 am UTC
Location: Sydney

Re: 0981: "Porn Folder"

Postby Menacing Spike » Thu Nov 24, 2011 1:15 am UTC

perakojot wrote:
cream wobbly wrote:inserting non-files into a filesystem is a strange and unique concept -- a hack.

/dev/*
/proc/*
/sys/*


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

Re: 0981: "Porn Folder"

Postby cjmcjmcjmcjm » Thu Nov 24, 2011 1:22 am UTC

project2051 wrote:I keep my porn on the desktop.. I can't waste time clicking through folders to get to it. :P

I keep mine in folders, depending on subject type
frezik wrote:Anti-photons move at the speed of dark

DemonDeluxe wrote:Paying to have laws written that allow you to do what you want, is a lot cheaper than paying off the judge every time you want to get away with something shady.
User avatar
cjmcjmcjmcjm
 
Posts: 1007
Joined: Tue Jan 05, 2010 5:15 am UTC
Location: Anywhere the internet is strong

Re: 0981: "Porn Folder"

Postby hrasdt » Thu Nov 24, 2011 1:32 am UTC

cjmcjmcjmcjm wrote:
project2051 wrote:I keep my porn on the desktop.. I can't waste time clicking through folders to get to it. :P

I keep mine in folders, depending on subject type

Linus Torvalds wrote:Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it ;)


Relevant.
hrasdt
 
Posts: 17
Joined: Fri Jun 04, 2010 9:25 am UTC

Re: 0981: "Porn Folder"

Postby RebeccaRGB » Thu Nov 24, 2011 2:18 am UTC

tetsujin wrote:("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.)

It was a Macintosh-ism long before (over 10 years before) it was a Windows-ism. (Or, if you want to get pedantic, it's technically a Lisa-ism or maybe even a Xerox-ism.)
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!
User avatar
RebeccaRGB
 
Posts: 335
Joined: Sat Mar 06, 2010 7:36 am UTC
Location: Lesbians Love Bluetooth

Re: 0981: "Porn Folder"

Postby ijuin » Thu Nov 24, 2011 2:32 am UTC

This is why there needs to be a Time To Live variable set for diving into directory trees, like the Time To Live for network hops, and for the same reason--to prevent loops.
ijuin
 
Posts: 339
Joined: Fri Jan 09, 2009 6:02 pm UTC

Re: 0981: "Porn Folder"

Postby StClair » Thu Nov 24, 2011 2:39 am UTC

I wouldn't call it a perversion, but I prefer to use hard links whenever possible (and get cranky when programs and/or OSes insist on "helping" me by hiding them behind libraries, "My ____", etc etc). I have a preferred set of directories ("Text", "Images", "Sounds", etc) that I've migrated from system to system over the last twenty years or so. I want to know where my files actually are.

(Of course, on some level I'm aware that they're just infinitesimal bits of iron oxide on a hard-disk platter... but there are necessary and unnecessary levels of abstraction, and I cling to the belief that most symbolic links are the latter.)
User avatar
StClair
 
Posts: 253
Joined: Fri Feb 29, 2008 8:07 am UTC

Re: 0981: "Porn Folder"

Postby idisjunction » Thu Nov 24, 2011 11:09 am UTC

dantman wrote:
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".


You can also do rm -r ./-r
idisjunction
 
Posts: 6
Joined: Wed Aug 03, 2011 5:14 am UTC

Re: 0981: "Porn Folder"

Postby The Moomin » Thu Nov 24, 2011 2:04 pm UTC

Filesystem porn is so up itself.

Or is this some sort of computer centipede?
User avatar
The Moomin
 
Posts: 164
Joined: Wed Oct 13, 2010 6:59 am UTC
Location: Yorkshire

Re: 0981: "Porn Folder"

Postby jalohones » Thu Nov 24, 2011 11:43 pm UTC

Nah, it's no good. No matter how deeply I try to nest my file system, it always somehow ends up linking to the Wikipedia entry for Philosophy.
jalohones
 
Posts: 45
Joined: Wed Feb 23, 2011 5:12 am UTC

Re: 0981: "Porn Folder"

Postby Jeyekomon » Thu Nov 24, 2011 11:47 pm UTC

I saw mainly some Linux-related discussion here, so.. Any ideas how to create that directory loop in windows?
Of course it will be difficult imo, but.. Is that even possible?
Jeyekomon
 
Posts: 6
Joined: Mon Apr 06, 2009 8:35 am UTC

Re: 0981: "Porn Folder"

Postby idisjunction » Fri Nov 25, 2011 7:10 am UTC

Jeyekomon wrote:I saw mainly some Linux-related discussion here, so.. Any ideas how to create that directory loop in windows?
Of course it will be difficult imo, but.. Is that even possible?


I think hard links can only be done with files on Windows. Softlinks are possible, but the software to create them is not included by default, at least in Windows XP.

Relevant external links:

http://paranoid-engineering.blogspot.com/2009/04/symbolic-links-in-windows.html
http://msdn.microsoft.com/en-us/library/windows/desktop/aa363878%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365006%28v=vs.85%29.aspx
idisjunction
 
Posts: 6
Joined: Wed Aug 03, 2011 5:14 am UTC

Re: 0981: "Porn Folder"

Postby Jeyekomon » Fri Nov 25, 2011 8:29 pm UTC

idisjunction wrote:Relevant external links:

Ha, that looks interesting! Thanks.
Jeyekomon
 
Posts: 6
Joined: Mon Apr 06, 2009 8:35 am UTC

Re: 0981: "Porn Folder"

Postby Ken_g6 » Fri Nov 25, 2011 9:48 pm UTC

I actually made a hardlinked directory loop on WinXP just now, using something called NTFS Link. :mrgreen: I made the path "C:\recursive\folder\is", then linked "recursive" into "is". (And renamed "Link to recursive" to "recursive".)

It works up to "C:\recursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\recursive" but then it pops up a dialog when I try to get into "folder": "Can't access this folder. Path is too long."

Edit: The last screen when I type "dir /s" from "recursive":

Code: Select all
 Directory of C:\recursive\folder\is\recursive\folder\is\recursive\folder\is\rec
ursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\rec
ursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\rec
ursive\folder\is

11/25/2011  02:36 PM    <DIR>          .
11/25/2011  02:36 PM    <DIR>          ..
11/25/2011  02:36 PM    <JUNCTION>     recursive
               0 File(s)              0 bytes

 Directory of C:\recursive\folder\is\recursive\folder\is\recursive\folder\is\rec
ursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\rec
ursive\folder\is\recursive\folder\is\recursive\folder\is\recursive\folder\is\rec
ursive\folder\is\recursive

11/25/2011  02:36 PM    <DIR>          .
11/25/2011  02:36 PM    <DIR>          ..
11/25/2011  02:36 PM    <DIR>          folder
               0 File(s)              0 bytes

     Total Files Listed:
               0 File(s)              0 bytes
             111 Dir(s)   5,995,327,488 bytes free

C:\recursive>
User avatar
Ken_g6
 
Posts: 33
Joined: Tue Jun 29, 2010 10:45 pm UTC
Location: in yer GPUz fakterin' primez in wardrobez

Re: 0981: "Porn Folder"

Postby ormaaj » Sat Nov 26, 2011 12:57 pm UTC

Yes, on Windows there are hardlinks, symlinks, and shortcuts - 3 different categories. I'm sure most people are unaware of anything but shortcuts as IIRC you can't create them using the file explorer.
ormaaj
 
Posts: 3
Joined: Fri Dec 10, 2010 2:58 pm UTC
Location: Minnesota

Re: 0981: "Porn Folder"

Postby Mrkva » Sat Nov 26, 2011 5:45 pm UTC

Patch for Linux 3.1.2 (works at least on ext4). But be careful with that :)
Code: Select all
--- fs/namei.c.bak   2011-11-26 18:41:08.000000000 +0100
+++ fs/namei.c   2011-11-26 18:43:40.000000000 +0100
@@ -2908,8 +2908,6 @@
       return -EPERM;
    if (!dir->i_op->link)
       return -EPERM;
-   if (S_ISDIR(inode->i_mode))
-      return -EPERM;
 
    error = security_inode_link(old_dentry, dir, new_dentry);
    if (error)
Mrkva
 
Posts: 1
Joined: Sat Nov 26, 2011 5:42 pm UTC

Re: 0981: "Porn Folder"

Postby Kartoffelkopf » Sun Nov 27, 2011 1:23 pm UTC

As a mechanophile, this thread, erm, intrigues me.
Image
wacht auf!

Blog|Reviews
User avatar
Kartoffelkopf
 
Posts: 134
Joined: Sat Jan 26, 2008 9:44 am UTC

Re: 0981: "Porn Folder"

Postby Copper Bezel » Sun Nov 27, 2011 6:47 pm UTC

ormaaj wrote:Yes, on Windows there are hardlinks, symlinks, and shortcuts - 3 different categories. I'm sure most people are unaware of anything but shortcuts as IIRC you can't create them using the file explorer.

Well, the same would be true on any particular Linux system, since things like .desktop files are equivalent to Windows "Shortcuts." Some file managers provide a graphical method for making symlinks, but not all.

StClair wrote:(Of course, on some level I'm aware that they're just infinitesimal bits of iron oxide on a hard-disk platter... but there are necessary and unnecessary levels of abstraction, and I cling to the belief that most symbolic links are the latter.)

Just so long as you understand that the folder structure doesn't in any way reflect the organization of said bits. = ) Personally, I don't see the difference between hard links and symlinks in this respect, although a hierarchical filesystem would be a fairly nice solution. = )

perakojot wrote:
cream wobbly wrote:inserting non-files into a filesystem is a strange and unique concept -- a hack.

/dev/*
/proc/*
/sys/*


Bit of a tautology in this instance, but the conceit is that "everything is a file," no?

Edit: Meant non-hierarchical. Dammit.
Last edited by Copper Bezel on Tue Nov 29, 2011 2:06 pm UTC, edited 1 time in total.
SpringLoaded12 wrote:You're like a modern-day Holden Caulfield, except that no one would read a book about you.
User avatar
Copper Bezel
 
Posts: 371
Joined: Wed Oct 12, 2011 6:35 am UTC
Location: Mission, Kansas, USA

Re: 0981: "Porn Folder"

Postby balthasar_s » Mon Nov 28, 2011 3:30 pm UTC

engr wrote:Desktop - My Computer - C - Windows - Desktop - My Computer - C - .....
At least that's how it was on Windows 98, I think.


There is no "My Computer" in c:\windows\desktop in Windows 98.
User avatar
balthasar_s
 
Posts: 9
Joined: Mon Nov 28, 2011 3:20 pm UTC
Location: Poland

Re: 0981: "Porn Folder"

Postby incircuitous » Wed Nov 30, 2011 5:58 pm UTC

Somehow I was expecting the comic to contain a reference to Oak Island, Nova Scotia.
incircuitous
 
Posts: 4
Joined: Wed Nov 30, 2011 5:55 pm UTC

Re: 0981: "Porn Folder"

Postby dbosst » Sat Dec 17, 2011 9:21 am UTC

I don't know how many people know about ADS. but I suppose even fewer know about Junctions since windows XP doesn't come shipped with a tool to make them ...
Code: Select all
12/17/2011  03:55 AM    <JUNCTION>     here

Spoiler:
The surprising bit is the command prompt properly shows it as a Junction; in the list view in Windows Explorer, you'll see it as "File Folder", however, if you click on the properties for the parent folder of the junction, it will reflect the correct number of real folders under the "Contains:" section (although there is no mention of junctions).

Folder porn (nix & windows) was popular in the 1990s among public ftp sites that were "re-purposed" by the anons & pirates of those days.

I suppose that's the source of nostalgia with this comic.
dbosst
 
Posts: 4
Joined: Fri Nov 18, 2011 6:09 pm UTC

Re: 0981: "Porn Folder"

Postby AUS » Sun Mar 18, 2012 3:30 am UTC

Sorry for the necrobump, but does anyone have any idea how to do this on Windows 7?
AUS
 
Posts: 34
Joined: Fri Sep 16, 2011 6:38 am UTC

Re: 0981: "Porn Folder"

Postby j_kubik » Sun May 06, 2012 4:07 am UTC

Mrkva wrote:Patch for Linux 3.1.2 (works at least on ext4). But be careful with that :)
Code: Select all
--- fs/namei.c.bak   2011-11-26 18:41:08.000000000 +0100
+++ fs/namei.c   2011-11-26 18:43:40.000000000 +0100
@@ -2908,8 +2908,6 @@
       return -EPERM;
    if (!dir->i_op->link)
       return -EPERM;
-   if (S_ISDIR(inode->i_mode))
-      return -EPERM;
 
    error = security_inode_link(old_dentry, dir, new_dentry);
    if (error)


You should also modify ln command (or whatever tool you are using) too. Most tools are making several checks independenly from checks in kernel because these only return quite generic -EPERM error code; -EPERM can mean multiple things, and user usually wants more elaborate info on what went wrong.

I am too lazy to post relevant path to ln command - if you are old enough to play with those things, you should have no problems finding it on your own.

In case you do it to your system, a small hint: do not replace your system ln command, but copy compiled executable to /usr/bin/ manually under changed name like ln.all. Some badly written scripts (eg. using ln's error code as directory-detector while hardlinking directory tree) might make your filesystem a link-jungle, so it's best not give them more than they expect to get.
j_kubik
 
Posts: 1
Joined: Sun May 06, 2012 3:48 am UTC

Previous

Return to Individual XKCD Comic Threads

Who is online

Users browsing this forum: Bing [Bot], Eoink, funnyav, jowo, Lardy Plans, mscha, RogueLeader and 21 guests