A folder and a file with the same name in the same location [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
5
down vote

favorite













This question already has an answer here:



  • Same folder and file name in same location

    4 answers



I'm on 14.04 about to move up to 18.04. In that version of Ubuntu can I have a folder and a file in the same location with the same name?



My use case is that I have html files without the .html extension, that I push up to AWS S3, where I serve a few websites. Leaving off the .html extension enables me to have clean urls for the websites. And S3 is perfectly happy to have directories and files with the same name, and thankfully they serve the html file rather than a folder if you navigate to the URL that is a file and a folder.



This would be a nice to have in Ubuntu. I could have an html file called 'articles' and a folder called articles, and then my URLs would be "RESTful."



example.com/articles/title would give you the article with that title, and example.com/articles would serve up a list of articles.



Anyhow, AWS already does this, I was just hoping Nautilus, or Ubuntu could handle this so I don't have to go through an awkward coding nightmare where my local directories have different names from my server directories.



Does this work in 18.04 or can anyone think of a good work-around?










share|improve this question















marked as duplicate by Eliah Kagan, Zanna, pomsky, Fabby, Eric Carvalho Apr 23 at 0:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 5




    There's some sort of mistake in the question. What you're asking is dependent on the filesystem, not the type of GNU/Linux distro -- but the standard GNU/Linux filesystems (ext3, ext4, etc.) all don't allow an identically named file and folder in the same directory. Also, naming your HTML file index.html and putting them in a folder called e.g. example.com/title, so the full path is example.com/title/index.html, is one common way to accomplish what you're asking, because browsers won't show the index.html if you just go to https://example.com/title then.
    – Harry
    Apr 13 at 20:44






  • 1




    @Harry These are good points. Would you mind if I use them in my answer?
    – user68186
    Apr 13 at 20:46






  • 1




    @user68186 Go ahead, thanks for asking.
    – Harry
    Apr 13 at 20:47






  • 1




    @Harry This is not dependent on the filesystem. (You're right that it doesn't depend on the distro, either, though.) See Same folder and file name in same location and Why can't I have a folder and a file with the same name?
    – Eliah Kagan
    Apr 14 at 3:05







  • 2




    @JörgWMittag I think distinguishing between "directory" and "folder" is irrelevant to this. Are there OSes that let you have a file and folder with the same name--actually with the same name, not just displaying as though they do in some graphical browser that trims suffixes or hides some characters--in the same place? Some people claim "directory" and "folder" don't mean the same thing, but the distinction is not that some OSes have one and others the other. It is no more wrong to call directories folders on Ubuntu than Windows. It is not wrong at all.
    – Eliah Kagan
    Apr 14 at 11:38














up vote
5
down vote

favorite













This question already has an answer here:



  • Same folder and file name in same location

    4 answers



I'm on 14.04 about to move up to 18.04. In that version of Ubuntu can I have a folder and a file in the same location with the same name?



My use case is that I have html files without the .html extension, that I push up to AWS S3, where I serve a few websites. Leaving off the .html extension enables me to have clean urls for the websites. And S3 is perfectly happy to have directories and files with the same name, and thankfully they serve the html file rather than a folder if you navigate to the URL that is a file and a folder.



This would be a nice to have in Ubuntu. I could have an html file called 'articles' and a folder called articles, and then my URLs would be "RESTful."



example.com/articles/title would give you the article with that title, and example.com/articles would serve up a list of articles.



Anyhow, AWS already does this, I was just hoping Nautilus, or Ubuntu could handle this so I don't have to go through an awkward coding nightmare where my local directories have different names from my server directories.



Does this work in 18.04 or can anyone think of a good work-around?










share|improve this question















marked as duplicate by Eliah Kagan, Zanna, pomsky, Fabby, Eric Carvalho Apr 23 at 0:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 5




    There's some sort of mistake in the question. What you're asking is dependent on the filesystem, not the type of GNU/Linux distro -- but the standard GNU/Linux filesystems (ext3, ext4, etc.) all don't allow an identically named file and folder in the same directory. Also, naming your HTML file index.html and putting them in a folder called e.g. example.com/title, so the full path is example.com/title/index.html, is one common way to accomplish what you're asking, because browsers won't show the index.html if you just go to https://example.com/title then.
    – Harry
    Apr 13 at 20:44






  • 1




    @Harry These are good points. Would you mind if I use them in my answer?
    – user68186
    Apr 13 at 20:46






  • 1




    @user68186 Go ahead, thanks for asking.
    – Harry
    Apr 13 at 20:47






  • 1




    @Harry This is not dependent on the filesystem. (You're right that it doesn't depend on the distro, either, though.) See Same folder and file name in same location and Why can't I have a folder and a file with the same name?
    – Eliah Kagan
    Apr 14 at 3:05







  • 2




    @JörgWMittag I think distinguishing between "directory" and "folder" is irrelevant to this. Are there OSes that let you have a file and folder with the same name--actually with the same name, not just displaying as though they do in some graphical browser that trims suffixes or hides some characters--in the same place? Some people claim "directory" and "folder" don't mean the same thing, but the distinction is not that some OSes have one and others the other. It is no more wrong to call directories folders on Ubuntu than Windows. It is not wrong at all.
    – Eliah Kagan
    Apr 14 at 11:38












up vote
5
down vote

favorite









up vote
5
down vote

favorite












This question already has an answer here:



  • Same folder and file name in same location

    4 answers



I'm on 14.04 about to move up to 18.04. In that version of Ubuntu can I have a folder and a file in the same location with the same name?



My use case is that I have html files without the .html extension, that I push up to AWS S3, where I serve a few websites. Leaving off the .html extension enables me to have clean urls for the websites. And S3 is perfectly happy to have directories and files with the same name, and thankfully they serve the html file rather than a folder if you navigate to the URL that is a file and a folder.



This would be a nice to have in Ubuntu. I could have an html file called 'articles' and a folder called articles, and then my URLs would be "RESTful."



example.com/articles/title would give you the article with that title, and example.com/articles would serve up a list of articles.



Anyhow, AWS already does this, I was just hoping Nautilus, or Ubuntu could handle this so I don't have to go through an awkward coding nightmare where my local directories have different names from my server directories.



Does this work in 18.04 or can anyone think of a good work-around?










share|improve this question
















This question already has an answer here:



  • Same folder and file name in same location

    4 answers



I'm on 14.04 about to move up to 18.04. In that version of Ubuntu can I have a folder and a file in the same location with the same name?



My use case is that I have html files without the .html extension, that I push up to AWS S3, where I serve a few websites. Leaving off the .html extension enables me to have clean urls for the websites. And S3 is perfectly happy to have directories and files with the same name, and thankfully they serve the html file rather than a folder if you navigate to the URL that is a file and a folder.



This would be a nice to have in Ubuntu. I could have an html file called 'articles' and a folder called articles, and then my URLs would be "RESTful."



example.com/articles/title would give you the article with that title, and example.com/articles would serve up a list of articles.



Anyhow, AWS already does this, I was just hoping Nautilus, or Ubuntu could handle this so I don't have to go through an awkward coding nightmare where my local directories have different names from my server directories.



Does this work in 18.04 or can anyone think of a good work-around?





This question already has an answer here:



  • Same folder and file name in same location

    4 answers







nautilus files directory 18.04






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 at 20:44









anonymous2

3,14541746




3,14541746










asked Apr 13 at 20:20









Costa

5082725




5082725




marked as duplicate by Eliah Kagan, Zanna, pomsky, Fabby, Eric Carvalho Apr 23 at 0:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Eliah Kagan, Zanna, pomsky, Fabby, Eric Carvalho Apr 23 at 0:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









  • 5




    There's some sort of mistake in the question. What you're asking is dependent on the filesystem, not the type of GNU/Linux distro -- but the standard GNU/Linux filesystems (ext3, ext4, etc.) all don't allow an identically named file and folder in the same directory. Also, naming your HTML file index.html and putting them in a folder called e.g. example.com/title, so the full path is example.com/title/index.html, is one common way to accomplish what you're asking, because browsers won't show the index.html if you just go to https://example.com/title then.
    – Harry
    Apr 13 at 20:44






  • 1




    @Harry These are good points. Would you mind if I use them in my answer?
    – user68186
    Apr 13 at 20:46






  • 1




    @user68186 Go ahead, thanks for asking.
    – Harry
    Apr 13 at 20:47






  • 1




    @Harry This is not dependent on the filesystem. (You're right that it doesn't depend on the distro, either, though.) See Same folder and file name in same location and Why can't I have a folder and a file with the same name?
    – Eliah Kagan
    Apr 14 at 3:05







  • 2




    @JörgWMittag I think distinguishing between "directory" and "folder" is irrelevant to this. Are there OSes that let you have a file and folder with the same name--actually with the same name, not just displaying as though they do in some graphical browser that trims suffixes or hides some characters--in the same place? Some people claim "directory" and "folder" don't mean the same thing, but the distinction is not that some OSes have one and others the other. It is no more wrong to call directories folders on Ubuntu than Windows. It is not wrong at all.
    – Eliah Kagan
    Apr 14 at 11:38












  • 5




    There's some sort of mistake in the question. What you're asking is dependent on the filesystem, not the type of GNU/Linux distro -- but the standard GNU/Linux filesystems (ext3, ext4, etc.) all don't allow an identically named file and folder in the same directory. Also, naming your HTML file index.html and putting them in a folder called e.g. example.com/title, so the full path is example.com/title/index.html, is one common way to accomplish what you're asking, because browsers won't show the index.html if you just go to https://example.com/title then.
    – Harry
    Apr 13 at 20:44






  • 1




    @Harry These are good points. Would you mind if I use them in my answer?
    – user68186
    Apr 13 at 20:46






  • 1




    @user68186 Go ahead, thanks for asking.
    – Harry
    Apr 13 at 20:47






  • 1




    @Harry This is not dependent on the filesystem. (You're right that it doesn't depend on the distro, either, though.) See Same folder and file name in same location and Why can't I have a folder and a file with the same name?
    – Eliah Kagan
    Apr 14 at 3:05







  • 2




    @JörgWMittag I think distinguishing between "directory" and "folder" is irrelevant to this. Are there OSes that let you have a file and folder with the same name--actually with the same name, not just displaying as though they do in some graphical browser that trims suffixes or hides some characters--in the same place? Some people claim "directory" and "folder" don't mean the same thing, but the distinction is not that some OSes have one and others the other. It is no more wrong to call directories folders on Ubuntu than Windows. It is not wrong at all.
    – Eliah Kagan
    Apr 14 at 11:38







5




5




There's some sort of mistake in the question. What you're asking is dependent on the filesystem, not the type of GNU/Linux distro -- but the standard GNU/Linux filesystems (ext3, ext4, etc.) all don't allow an identically named file and folder in the same directory. Also, naming your HTML file index.html and putting them in a folder called e.g. example.com/title, so the full path is example.com/title/index.html, is one common way to accomplish what you're asking, because browsers won't show the index.html if you just go to https://example.com/title then.
– Harry
Apr 13 at 20:44




There's some sort of mistake in the question. What you're asking is dependent on the filesystem, not the type of GNU/Linux distro -- but the standard GNU/Linux filesystems (ext3, ext4, etc.) all don't allow an identically named file and folder in the same directory. Also, naming your HTML file index.html and putting them in a folder called e.g. example.com/title, so the full path is example.com/title/index.html, is one common way to accomplish what you're asking, because browsers won't show the index.html if you just go to https://example.com/title then.
– Harry
Apr 13 at 20:44




1




1




@Harry These are good points. Would you mind if I use them in my answer?
– user68186
Apr 13 at 20:46




@Harry These are good points. Would you mind if I use them in my answer?
– user68186
Apr 13 at 20:46




1




1




@user68186 Go ahead, thanks for asking.
– Harry
Apr 13 at 20:47




@user68186 Go ahead, thanks for asking.
– Harry
Apr 13 at 20:47




1




1




@Harry This is not dependent on the filesystem. (You're right that it doesn't depend on the distro, either, though.) See Same folder and file name in same location and Why can't I have a folder and a file with the same name?
– Eliah Kagan
Apr 14 at 3:05





@Harry This is not dependent on the filesystem. (You're right that it doesn't depend on the distro, either, though.) See Same folder and file name in same location and Why can't I have a folder and a file with the same name?
– Eliah Kagan
Apr 14 at 3:05





2




2




@JörgWMittag I think distinguishing between "directory" and "folder" is irrelevant to this. Are there OSes that let you have a file and folder with the same name--actually with the same name, not just displaying as though they do in some graphical browser that trims suffixes or hides some characters--in the same place? Some people claim "directory" and "folder" don't mean the same thing, but the distinction is not that some OSes have one and others the other. It is no more wrong to call directories folders on Ubuntu than Windows. It is not wrong at all.
– Eliah Kagan
Apr 14 at 11:38




@JörgWMittag I think distinguishing between "directory" and "folder" is irrelevant to this. Are there OSes that let you have a file and folder with the same name--actually with the same name, not just displaying as though they do in some graphical browser that trims suffixes or hides some characters--in the same place? Some people claim "directory" and "folder" don't mean the same thing, but the distinction is not that some OSes have one and others the other. It is no more wrong to call directories folders on Ubuntu than Windows. It is not wrong at all.
– Eliah Kagan
Apr 14 at 11:38










2 Answers
2






active

oldest

votes

















up vote
14
down vote



accepted










The OS and file system do not allow this



Ubuntu and its file systems (ext3, ext4, etc.) doesn't allow an identically named file and folder in the same directory.



Therefore, nautilus does not allow renaming a folder to an existing file name.



However, Ubuntu (GNU/Linux in general) file systems are case sensitive. You can have a folder called Articles and a file called articles in the same location. Note the folder name starts with a capital A, while the file name starts with a small a.



You can use any CaPiTaLiZaTion conventions you want for your folders and files.



An alternative



An alternative is to create a file called index.html inside each folder where you want the folder and the file to have the same name. Naming your HTML file index.html and putting them in a folder called e.g. example.com/articles/title, so the full path is example.com/articles/title/index.html, will also accomplish what you're asking.



When one types https://example.com/articles/title the web server will serve the index.html page and browsers won't show the index.html. It will show only https://example.com/articles/title.



Similarly, you can have a file called https://example.com/article/index.htmlto show what you want when one types https://example.com/article.



Thanks to Harry for the alternative and some other points.






share|improve this answer


















  • 1




    Beat me to it, lol.
    – anonymous2
    Apr 13 at 20:43










  • If I'm going to write a work around, I'll probably just work around for the directories. There's far less of them, than files. It'll make navigating much easier. S3 supports my need, so I'll just need to work around for my local setup. Bah... work arounds suck : (
    – Costa
    Apr 13 at 21:22






  • 1




    Much of this answer is okay, but the suggestion that it's just the filesystem, and not the OS, that prevents a directory and regular file with the same basename from residing in the same directory, makes little sense. Is there some filesystem, on any Unix-like OS, that really facilitates this? Suppose /foo contained a regular file bar and also a separate directory bar. How would they be distinguished? Which would the stat system call return information about when the path /foo/bar were passed as its first argument?
    – Eliah Kagan
    Apr 14 at 3:00







  • 1




    Thanks for editing! But I think this post still suggests that a combination of Ubuntu and some filesystem could allow this. I don't want to edit myself, as we may disagree, but I don't think it really depends on much. I don't think any OS or filesystem allows this (though some approach it with versioning semantics). The only reason I'm not saying this more definitively is there's a lot of weird stuff out there (but see this answer). I'd suggest saying "Neither the OS nor its filesystem allow it" instead of "It depends on..."
    – Eliah Kagan
    Apr 14 at 3:31






  • 2




    @user68186 I've edited. I went with the more neutral phrase "The OS and file system do not allow this." I believe this is sufficient to avoid giving the impression that the filesystem could facilitate it. As usual, please definitely feel free to edit this yourself to change it again, if you like (or to revert it altogether).
    – Eliah Kagan
    Apr 14 at 4:26

















up vote
1
down vote













Question is a possible duplicate of https://stackoverflow.com/questions/34550299/aws-s3-hosting-url-rewrite. If you look in the comments, you'll even see that his precise use case is removing the .html from his URLs.



While the accepted answer provides a valid, working solution, I think this is a case of the XY problem. In this case, what you really need is a URL Rewriting system, which dispenses with the naming convention problem altogether. While the previous article does not apply to AWS S3, it explains the concept fairly well. Unfortunately, since S3 is not a web server per se, it doesn't have URL Rewrite functionality, but it does have Webpage Redirects which, as stated in the duplicate question's answer, might be able to do this.






share|improve this answer





























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    14
    down vote



    accepted










    The OS and file system do not allow this



    Ubuntu and its file systems (ext3, ext4, etc.) doesn't allow an identically named file and folder in the same directory.



    Therefore, nautilus does not allow renaming a folder to an existing file name.



    However, Ubuntu (GNU/Linux in general) file systems are case sensitive. You can have a folder called Articles and a file called articles in the same location. Note the folder name starts with a capital A, while the file name starts with a small a.



    You can use any CaPiTaLiZaTion conventions you want for your folders and files.



    An alternative



    An alternative is to create a file called index.html inside each folder where you want the folder and the file to have the same name. Naming your HTML file index.html and putting them in a folder called e.g. example.com/articles/title, so the full path is example.com/articles/title/index.html, will also accomplish what you're asking.



    When one types https://example.com/articles/title the web server will serve the index.html page and browsers won't show the index.html. It will show only https://example.com/articles/title.



    Similarly, you can have a file called https://example.com/article/index.htmlto show what you want when one types https://example.com/article.



    Thanks to Harry for the alternative and some other points.






    share|improve this answer


















    • 1




      Beat me to it, lol.
      – anonymous2
      Apr 13 at 20:43










    • If I'm going to write a work around, I'll probably just work around for the directories. There's far less of them, than files. It'll make navigating much easier. S3 supports my need, so I'll just need to work around for my local setup. Bah... work arounds suck : (
      – Costa
      Apr 13 at 21:22






    • 1




      Much of this answer is okay, but the suggestion that it's just the filesystem, and not the OS, that prevents a directory and regular file with the same basename from residing in the same directory, makes little sense. Is there some filesystem, on any Unix-like OS, that really facilitates this? Suppose /foo contained a regular file bar and also a separate directory bar. How would they be distinguished? Which would the stat system call return information about when the path /foo/bar were passed as its first argument?
      – Eliah Kagan
      Apr 14 at 3:00







    • 1




      Thanks for editing! But I think this post still suggests that a combination of Ubuntu and some filesystem could allow this. I don't want to edit myself, as we may disagree, but I don't think it really depends on much. I don't think any OS or filesystem allows this (though some approach it with versioning semantics). The only reason I'm not saying this more definitively is there's a lot of weird stuff out there (but see this answer). I'd suggest saying "Neither the OS nor its filesystem allow it" instead of "It depends on..."
      – Eliah Kagan
      Apr 14 at 3:31






    • 2




      @user68186 I've edited. I went with the more neutral phrase "The OS and file system do not allow this." I believe this is sufficient to avoid giving the impression that the filesystem could facilitate it. As usual, please definitely feel free to edit this yourself to change it again, if you like (or to revert it altogether).
      – Eliah Kagan
      Apr 14 at 4:26














    up vote
    14
    down vote



    accepted










    The OS and file system do not allow this



    Ubuntu and its file systems (ext3, ext4, etc.) doesn't allow an identically named file and folder in the same directory.



    Therefore, nautilus does not allow renaming a folder to an existing file name.



    However, Ubuntu (GNU/Linux in general) file systems are case sensitive. You can have a folder called Articles and a file called articles in the same location. Note the folder name starts with a capital A, while the file name starts with a small a.



    You can use any CaPiTaLiZaTion conventions you want for your folders and files.



    An alternative



    An alternative is to create a file called index.html inside each folder where you want the folder and the file to have the same name. Naming your HTML file index.html and putting them in a folder called e.g. example.com/articles/title, so the full path is example.com/articles/title/index.html, will also accomplish what you're asking.



    When one types https://example.com/articles/title the web server will serve the index.html page and browsers won't show the index.html. It will show only https://example.com/articles/title.



    Similarly, you can have a file called https://example.com/article/index.htmlto show what you want when one types https://example.com/article.



    Thanks to Harry for the alternative and some other points.






    share|improve this answer


















    • 1




      Beat me to it, lol.
      – anonymous2
      Apr 13 at 20:43










    • If I'm going to write a work around, I'll probably just work around for the directories. There's far less of them, than files. It'll make navigating much easier. S3 supports my need, so I'll just need to work around for my local setup. Bah... work arounds suck : (
      – Costa
      Apr 13 at 21:22






    • 1




      Much of this answer is okay, but the suggestion that it's just the filesystem, and not the OS, that prevents a directory and regular file with the same basename from residing in the same directory, makes little sense. Is there some filesystem, on any Unix-like OS, that really facilitates this? Suppose /foo contained a regular file bar and also a separate directory bar. How would they be distinguished? Which would the stat system call return information about when the path /foo/bar were passed as its first argument?
      – Eliah Kagan
      Apr 14 at 3:00







    • 1




      Thanks for editing! But I think this post still suggests that a combination of Ubuntu and some filesystem could allow this. I don't want to edit myself, as we may disagree, but I don't think it really depends on much. I don't think any OS or filesystem allows this (though some approach it with versioning semantics). The only reason I'm not saying this more definitively is there's a lot of weird stuff out there (but see this answer). I'd suggest saying "Neither the OS nor its filesystem allow it" instead of "It depends on..."
      – Eliah Kagan
      Apr 14 at 3:31






    • 2




      @user68186 I've edited. I went with the more neutral phrase "The OS and file system do not allow this." I believe this is sufficient to avoid giving the impression that the filesystem could facilitate it. As usual, please definitely feel free to edit this yourself to change it again, if you like (or to revert it altogether).
      – Eliah Kagan
      Apr 14 at 4:26












    up vote
    14
    down vote



    accepted







    up vote
    14
    down vote



    accepted






    The OS and file system do not allow this



    Ubuntu and its file systems (ext3, ext4, etc.) doesn't allow an identically named file and folder in the same directory.



    Therefore, nautilus does not allow renaming a folder to an existing file name.



    However, Ubuntu (GNU/Linux in general) file systems are case sensitive. You can have a folder called Articles and a file called articles in the same location. Note the folder name starts with a capital A, while the file name starts with a small a.



    You can use any CaPiTaLiZaTion conventions you want for your folders and files.



    An alternative



    An alternative is to create a file called index.html inside each folder where you want the folder and the file to have the same name. Naming your HTML file index.html and putting them in a folder called e.g. example.com/articles/title, so the full path is example.com/articles/title/index.html, will also accomplish what you're asking.



    When one types https://example.com/articles/title the web server will serve the index.html page and browsers won't show the index.html. It will show only https://example.com/articles/title.



    Similarly, you can have a file called https://example.com/article/index.htmlto show what you want when one types https://example.com/article.



    Thanks to Harry for the alternative and some other points.






    share|improve this answer














    The OS and file system do not allow this



    Ubuntu and its file systems (ext3, ext4, etc.) doesn't allow an identically named file and folder in the same directory.



    Therefore, nautilus does not allow renaming a folder to an existing file name.



    However, Ubuntu (GNU/Linux in general) file systems are case sensitive. You can have a folder called Articles and a file called articles in the same location. Note the folder name starts with a capital A, while the file name starts with a small a.



    You can use any CaPiTaLiZaTion conventions you want for your folders and files.



    An alternative



    An alternative is to create a file called index.html inside each folder where you want the folder and the file to have the same name. Naming your HTML file index.html and putting them in a folder called e.g. example.com/articles/title, so the full path is example.com/articles/title/index.html, will also accomplish what you're asking.



    When one types https://example.com/articles/title the web server will serve the index.html page and browsers won't show the index.html. It will show only https://example.com/articles/title.



    Similarly, you can have a file called https://example.com/article/index.htmlto show what you want when one types https://example.com/article.



    Thanks to Harry for the alternative and some other points.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 14 at 4:22









    Eliah Kagan

    79.5k20221359




    79.5k20221359










    answered Apr 13 at 20:43









    user68186

    14.3k84360




    14.3k84360







    • 1




      Beat me to it, lol.
      – anonymous2
      Apr 13 at 20:43










    • If I'm going to write a work around, I'll probably just work around for the directories. There's far less of them, than files. It'll make navigating much easier. S3 supports my need, so I'll just need to work around for my local setup. Bah... work arounds suck : (
      – Costa
      Apr 13 at 21:22






    • 1




      Much of this answer is okay, but the suggestion that it's just the filesystem, and not the OS, that prevents a directory and regular file with the same basename from residing in the same directory, makes little sense. Is there some filesystem, on any Unix-like OS, that really facilitates this? Suppose /foo contained a regular file bar and also a separate directory bar. How would they be distinguished? Which would the stat system call return information about when the path /foo/bar were passed as its first argument?
      – Eliah Kagan
      Apr 14 at 3:00







    • 1




      Thanks for editing! But I think this post still suggests that a combination of Ubuntu and some filesystem could allow this. I don't want to edit myself, as we may disagree, but I don't think it really depends on much. I don't think any OS or filesystem allows this (though some approach it with versioning semantics). The only reason I'm not saying this more definitively is there's a lot of weird stuff out there (but see this answer). I'd suggest saying "Neither the OS nor its filesystem allow it" instead of "It depends on..."
      – Eliah Kagan
      Apr 14 at 3:31






    • 2




      @user68186 I've edited. I went with the more neutral phrase "The OS and file system do not allow this." I believe this is sufficient to avoid giving the impression that the filesystem could facilitate it. As usual, please definitely feel free to edit this yourself to change it again, if you like (or to revert it altogether).
      – Eliah Kagan
      Apr 14 at 4:26












    • 1




      Beat me to it, lol.
      – anonymous2
      Apr 13 at 20:43










    • If I'm going to write a work around, I'll probably just work around for the directories. There's far less of them, than files. It'll make navigating much easier. S3 supports my need, so I'll just need to work around for my local setup. Bah... work arounds suck : (
      – Costa
      Apr 13 at 21:22






    • 1




      Much of this answer is okay, but the suggestion that it's just the filesystem, and not the OS, that prevents a directory and regular file with the same basename from residing in the same directory, makes little sense. Is there some filesystem, on any Unix-like OS, that really facilitates this? Suppose /foo contained a regular file bar and also a separate directory bar. How would they be distinguished? Which would the stat system call return information about when the path /foo/bar were passed as its first argument?
      – Eliah Kagan
      Apr 14 at 3:00







    • 1




      Thanks for editing! But I think this post still suggests that a combination of Ubuntu and some filesystem could allow this. I don't want to edit myself, as we may disagree, but I don't think it really depends on much. I don't think any OS or filesystem allows this (though some approach it with versioning semantics). The only reason I'm not saying this more definitively is there's a lot of weird stuff out there (but see this answer). I'd suggest saying "Neither the OS nor its filesystem allow it" instead of "It depends on..."
      – Eliah Kagan
      Apr 14 at 3:31






    • 2




      @user68186 I've edited. I went with the more neutral phrase "The OS and file system do not allow this." I believe this is sufficient to avoid giving the impression that the filesystem could facilitate it. As usual, please definitely feel free to edit this yourself to change it again, if you like (or to revert it altogether).
      – Eliah Kagan
      Apr 14 at 4:26







    1




    1




    Beat me to it, lol.
    – anonymous2
    Apr 13 at 20:43




    Beat me to it, lol.
    – anonymous2
    Apr 13 at 20:43












    If I'm going to write a work around, I'll probably just work around for the directories. There's far less of them, than files. It'll make navigating much easier. S3 supports my need, so I'll just need to work around for my local setup. Bah... work arounds suck : (
    – Costa
    Apr 13 at 21:22




    If I'm going to write a work around, I'll probably just work around for the directories. There's far less of them, than files. It'll make navigating much easier. S3 supports my need, so I'll just need to work around for my local setup. Bah... work arounds suck : (
    – Costa
    Apr 13 at 21:22




    1




    1




    Much of this answer is okay, but the suggestion that it's just the filesystem, and not the OS, that prevents a directory and regular file with the same basename from residing in the same directory, makes little sense. Is there some filesystem, on any Unix-like OS, that really facilitates this? Suppose /foo contained a regular file bar and also a separate directory bar. How would they be distinguished? Which would the stat system call return information about when the path /foo/bar were passed as its first argument?
    – Eliah Kagan
    Apr 14 at 3:00





    Much of this answer is okay, but the suggestion that it's just the filesystem, and not the OS, that prevents a directory and regular file with the same basename from residing in the same directory, makes little sense. Is there some filesystem, on any Unix-like OS, that really facilitates this? Suppose /foo contained a regular file bar and also a separate directory bar. How would they be distinguished? Which would the stat system call return information about when the path /foo/bar were passed as its first argument?
    – Eliah Kagan
    Apr 14 at 3:00





    1




    1




    Thanks for editing! But I think this post still suggests that a combination of Ubuntu and some filesystem could allow this. I don't want to edit myself, as we may disagree, but I don't think it really depends on much. I don't think any OS or filesystem allows this (though some approach it with versioning semantics). The only reason I'm not saying this more definitively is there's a lot of weird stuff out there (but see this answer). I'd suggest saying "Neither the OS nor its filesystem allow it" instead of "It depends on..."
    – Eliah Kagan
    Apr 14 at 3:31




    Thanks for editing! But I think this post still suggests that a combination of Ubuntu and some filesystem could allow this. I don't want to edit myself, as we may disagree, but I don't think it really depends on much. I don't think any OS or filesystem allows this (though some approach it with versioning semantics). The only reason I'm not saying this more definitively is there's a lot of weird stuff out there (but see this answer). I'd suggest saying "Neither the OS nor its filesystem allow it" instead of "It depends on..."
    – Eliah Kagan
    Apr 14 at 3:31




    2




    2




    @user68186 I've edited. I went with the more neutral phrase "The OS and file system do not allow this." I believe this is sufficient to avoid giving the impression that the filesystem could facilitate it. As usual, please definitely feel free to edit this yourself to change it again, if you like (or to revert it altogether).
    – Eliah Kagan
    Apr 14 at 4:26




    @user68186 I've edited. I went with the more neutral phrase "The OS and file system do not allow this." I believe this is sufficient to avoid giving the impression that the filesystem could facilitate it. As usual, please definitely feel free to edit this yourself to change it again, if you like (or to revert it altogether).
    – Eliah Kagan
    Apr 14 at 4:26












    up vote
    1
    down vote













    Question is a possible duplicate of https://stackoverflow.com/questions/34550299/aws-s3-hosting-url-rewrite. If you look in the comments, you'll even see that his precise use case is removing the .html from his URLs.



    While the accepted answer provides a valid, working solution, I think this is a case of the XY problem. In this case, what you really need is a URL Rewriting system, which dispenses with the naming convention problem altogether. While the previous article does not apply to AWS S3, it explains the concept fairly well. Unfortunately, since S3 is not a web server per se, it doesn't have URL Rewrite functionality, but it does have Webpage Redirects which, as stated in the duplicate question's answer, might be able to do this.






    share|improve this answer


























      up vote
      1
      down vote













      Question is a possible duplicate of https://stackoverflow.com/questions/34550299/aws-s3-hosting-url-rewrite. If you look in the comments, you'll even see that his precise use case is removing the .html from his URLs.



      While the accepted answer provides a valid, working solution, I think this is a case of the XY problem. In this case, what you really need is a URL Rewriting system, which dispenses with the naming convention problem altogether. While the previous article does not apply to AWS S3, it explains the concept fairly well. Unfortunately, since S3 is not a web server per se, it doesn't have URL Rewrite functionality, but it does have Webpage Redirects which, as stated in the duplicate question's answer, might be able to do this.






      share|improve this answer
























        up vote
        1
        down vote










        up vote
        1
        down vote









        Question is a possible duplicate of https://stackoverflow.com/questions/34550299/aws-s3-hosting-url-rewrite. If you look in the comments, you'll even see that his precise use case is removing the .html from his URLs.



        While the accepted answer provides a valid, working solution, I think this is a case of the XY problem. In this case, what you really need is a URL Rewriting system, which dispenses with the naming convention problem altogether. While the previous article does not apply to AWS S3, it explains the concept fairly well. Unfortunately, since S3 is not a web server per se, it doesn't have URL Rewrite functionality, but it does have Webpage Redirects which, as stated in the duplicate question's answer, might be able to do this.






        share|improve this answer














        Question is a possible duplicate of https://stackoverflow.com/questions/34550299/aws-s3-hosting-url-rewrite. If you look in the comments, you'll even see that his precise use case is removing the .html from his URLs.



        While the accepted answer provides a valid, working solution, I think this is a case of the XY problem. In this case, what you really need is a URL Rewriting system, which dispenses with the naming convention problem altogether. While the previous article does not apply to AWS S3, it explains the concept fairly well. Unfortunately, since S3 is not a web server per se, it doesn't have URL Rewrite functionality, but it does have Webpage Redirects which, as stated in the duplicate question's answer, might be able to do this.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 14 at 8:22

























        answered Apr 14 at 8:15









        Bjonnfesk

        112




        112












            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491