what does `l` in `lseek` of unistd.h mean?











up vote
0
down vote

favorite












I am reading APUE to explore the details of C and Unix, and encounter lseek



NAME
lseek - move the read/write file offset
SYNOPSIS
#include <unistd.h>

off_t lseek(int fildes, off_t offset, int whence);


What does l mean, is it length?










share|improve this question




















  • 10




    softwareengineering.stackexchange.com/questions/244525/…
    – bolov
    Nov 12 at 9:03






  • 1




    l is for long, as @bolov suggests. However, I cannot mark that as a duplicate, since it's on another stack exchange site. Posting an answer with the same content doesn't feel right also.. Hmm..
    – gsamaras
    Nov 12 at 9:05












  • I feel sort of know nothing about C when start to read APUE.
    – JawSaw
    Nov 12 at 9:07






  • 1




    @gsamaras: I agree. But posting the same answer and linking to the original answer on Software Engineering might still be appropriate.
    – Sani Singh Huttunen
    Nov 12 at 9:10






  • 1




    @SaniSinghHuttunen you are right, I checked on meta site, and they say exactly this, so I went ahead and posted an answer! Swordfish, nice timing, but I posted an answer already. :) Lunding, of course it's not off-topic, I just didn't know what to do with cross-site duplicates. Now that I read the meta post, I know! :)
    – gsamaras
    Nov 12 at 9:19

















up vote
0
down vote

favorite












I am reading APUE to explore the details of C and Unix, and encounter lseek



NAME
lseek - move the read/write file offset
SYNOPSIS
#include <unistd.h>

off_t lseek(int fildes, off_t offset, int whence);


What does l mean, is it length?










share|improve this question




















  • 10




    softwareengineering.stackexchange.com/questions/244525/…
    – bolov
    Nov 12 at 9:03






  • 1




    l is for long, as @bolov suggests. However, I cannot mark that as a duplicate, since it's on another stack exchange site. Posting an answer with the same content doesn't feel right also.. Hmm..
    – gsamaras
    Nov 12 at 9:05












  • I feel sort of know nothing about C when start to read APUE.
    – JawSaw
    Nov 12 at 9:07






  • 1




    @gsamaras: I agree. But posting the same answer and linking to the original answer on Software Engineering might still be appropriate.
    – Sani Singh Huttunen
    Nov 12 at 9:10






  • 1




    @SaniSinghHuttunen you are right, I checked on meta site, and they say exactly this, so I went ahead and posted an answer! Swordfish, nice timing, but I posted an answer already. :) Lunding, of course it's not off-topic, I just didn't know what to do with cross-site duplicates. Now that I read the meta post, I know! :)
    – gsamaras
    Nov 12 at 9:19















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am reading APUE to explore the details of C and Unix, and encounter lseek



NAME
lseek - move the read/write file offset
SYNOPSIS
#include <unistd.h>

off_t lseek(int fildes, off_t offset, int whence);


What does l mean, is it length?










share|improve this question















I am reading APUE to explore the details of C and Unix, and encounter lseek



NAME
lseek - move the read/write file offset
SYNOPSIS
#include <unistd.h>

off_t lseek(int fildes, off_t offset, int whence);


What does l mean, is it length?







c unix lseek






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 at 9:21









gsamaras

50k2398182




50k2398182










asked Nov 12 at 9:01









JawSaw

4,01011633




4,01011633








  • 10




    softwareengineering.stackexchange.com/questions/244525/…
    – bolov
    Nov 12 at 9:03






  • 1




    l is for long, as @bolov suggests. However, I cannot mark that as a duplicate, since it's on another stack exchange site. Posting an answer with the same content doesn't feel right also.. Hmm..
    – gsamaras
    Nov 12 at 9:05












  • I feel sort of know nothing about C when start to read APUE.
    – JawSaw
    Nov 12 at 9:07






  • 1




    @gsamaras: I agree. But posting the same answer and linking to the original answer on Software Engineering might still be appropriate.
    – Sani Singh Huttunen
    Nov 12 at 9:10






  • 1




    @SaniSinghHuttunen you are right, I checked on meta site, and they say exactly this, so I went ahead and posted an answer! Swordfish, nice timing, but I posted an answer already. :) Lunding, of course it's not off-topic, I just didn't know what to do with cross-site duplicates. Now that I read the meta post, I know! :)
    – gsamaras
    Nov 12 at 9:19
















  • 10




    softwareengineering.stackexchange.com/questions/244525/…
    – bolov
    Nov 12 at 9:03






  • 1




    l is for long, as @bolov suggests. However, I cannot mark that as a duplicate, since it's on another stack exchange site. Posting an answer with the same content doesn't feel right also.. Hmm..
    – gsamaras
    Nov 12 at 9:05












  • I feel sort of know nothing about C when start to read APUE.
    – JawSaw
    Nov 12 at 9:07






  • 1




    @gsamaras: I agree. But posting the same answer and linking to the original answer on Software Engineering might still be appropriate.
    – Sani Singh Huttunen
    Nov 12 at 9:10






  • 1




    @SaniSinghHuttunen you are right, I checked on meta site, and they say exactly this, so I went ahead and posted an answer! Swordfish, nice timing, but I posted an answer already. :) Lunding, of course it's not off-topic, I just didn't know what to do with cross-site duplicates. Now that I read the meta post, I know! :)
    – gsamaras
    Nov 12 at 9:19










10




10




softwareengineering.stackexchange.com/questions/244525/…
– bolov
Nov 12 at 9:03




softwareengineering.stackexchange.com/questions/244525/…
– bolov
Nov 12 at 9:03




1




1




l is for long, as @bolov suggests. However, I cannot mark that as a duplicate, since it's on another stack exchange site. Posting an answer with the same content doesn't feel right also.. Hmm..
– gsamaras
Nov 12 at 9:05






l is for long, as @bolov suggests. However, I cannot mark that as a duplicate, since it's on another stack exchange site. Posting an answer with the same content doesn't feel right also.. Hmm..
– gsamaras
Nov 12 at 9:05














I feel sort of know nothing about C when start to read APUE.
– JawSaw
Nov 12 at 9:07




I feel sort of know nothing about C when start to read APUE.
– JawSaw
Nov 12 at 9:07




1




1




@gsamaras: I agree. But posting the same answer and linking to the original answer on Software Engineering might still be appropriate.
– Sani Singh Huttunen
Nov 12 at 9:10




@gsamaras: I agree. But posting the same answer and linking to the original answer on Software Engineering might still be appropriate.
– Sani Singh Huttunen
Nov 12 at 9:10




1




1




@SaniSinghHuttunen you are right, I checked on meta site, and they say exactly this, so I went ahead and posted an answer! Swordfish, nice timing, but I posted an answer already. :) Lunding, of course it's not off-topic, I just didn't know what to do with cross-site duplicates. Now that I read the meta post, I know! :)
– gsamaras
Nov 12 at 9:19






@SaniSinghHuttunen you are right, I checked on meta site, and they say exactly this, so I went ahead and posted an answer! Swordfish, nice timing, but I posted an answer already. :) Lunding, of course it's not off-topic, I just didn't know what to do with cross-site duplicates. Now that I read the meta post, I know! :)
– gsamaras
Nov 12 at 9:19














1 Answer
1






active

oldest

votes

















up vote
4
down vote













l is for long integer.



It is named like that to differentiate from the old seek() in version 2 of AT&T Unix. This is an anachronism before the off_t type was introduced.





References:



Infohost indicates:




The character l in the name lseek means "long integer". Before the
introduction of the off_t data type, the offset argument and the
return value were long integers. lseek was introduced with Version 7
when long integers were added to C. (Similar functionality was
provided in Version 6 by the functions seek and tell.)




As noted at the foot of lseek.html:




 A seek() function appeared in Version 2 AT&T UNIX, later renamed into
lseek() for ``long seek'' due to a larger offset argument type.





Note: Paraphrased from Why is the function called lseek(), not seek()?






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53258778%2fwhat-does-l-in-lseek-of-unistd-h-mean%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    4
    down vote













    l is for long integer.



    It is named like that to differentiate from the old seek() in version 2 of AT&T Unix. This is an anachronism before the off_t type was introduced.





    References:



    Infohost indicates:




    The character l in the name lseek means "long integer". Before the
    introduction of the off_t data type, the offset argument and the
    return value were long integers. lseek was introduced with Version 7
    when long integers were added to C. (Similar functionality was
    provided in Version 6 by the functions seek and tell.)




    As noted at the foot of lseek.html:




     A seek() function appeared in Version 2 AT&T UNIX, later renamed into
    lseek() for ``long seek'' due to a larger offset argument type.





    Note: Paraphrased from Why is the function called lseek(), not seek()?






    share|improve this answer



























      up vote
      4
      down vote













      l is for long integer.



      It is named like that to differentiate from the old seek() in version 2 of AT&T Unix. This is an anachronism before the off_t type was introduced.





      References:



      Infohost indicates:




      The character l in the name lseek means "long integer". Before the
      introduction of the off_t data type, the offset argument and the
      return value were long integers. lseek was introduced with Version 7
      when long integers were added to C. (Similar functionality was
      provided in Version 6 by the functions seek and tell.)




      As noted at the foot of lseek.html:




       A seek() function appeared in Version 2 AT&T UNIX, later renamed into
      lseek() for ``long seek'' due to a larger offset argument type.





      Note: Paraphrased from Why is the function called lseek(), not seek()?






      share|improve this answer

























        up vote
        4
        down vote










        up vote
        4
        down vote









        l is for long integer.



        It is named like that to differentiate from the old seek() in version 2 of AT&T Unix. This is an anachronism before the off_t type was introduced.





        References:



        Infohost indicates:




        The character l in the name lseek means "long integer". Before the
        introduction of the off_t data type, the offset argument and the
        return value were long integers. lseek was introduced with Version 7
        when long integers were added to C. (Similar functionality was
        provided in Version 6 by the functions seek and tell.)




        As noted at the foot of lseek.html:




         A seek() function appeared in Version 2 AT&T UNIX, later renamed into
        lseek() for ``long seek'' due to a larger offset argument type.





        Note: Paraphrased from Why is the function called lseek(), not seek()?






        share|improve this answer














        l is for long integer.



        It is named like that to differentiate from the old seek() in version 2 of AT&T Unix. This is an anachronism before the off_t type was introduced.





        References:



        Infohost indicates:




        The character l in the name lseek means "long integer". Before the
        introduction of the off_t data type, the offset argument and the
        return value were long integers. lseek was introduced with Version 7
        when long integers were added to C. (Similar functionality was
        provided in Version 6 by the functions seek and tell.)




        As noted at the foot of lseek.html:




         A seek() function appeared in Version 2 AT&T UNIX, later renamed into
        lseek() for ``long seek'' due to a larger offset argument type.





        Note: Paraphrased from Why is the function called lseek(), not seek()?







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 12 at 9:23

























        answered Nov 12 at 9:17









        gsamaras

        50k2398182




        50k2398182






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53258778%2fwhat-does-l-in-lseek-of-unistd-h-mean%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Bressuire

            Vorschmack

            Quarantine