What's behind a file descriptor in Linux? Also, i/o redirection with dup2.

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 33

  • @thaianle4623
    @thaianle4623 3 роки тому +7

    I like your teaching style, super detailed with hand-on example

  • @midhunrajr372
    @midhunrajr372 3 роки тому +3

    Very productive 20 mins. This video deserves more views than 1K.

  • @devmahad
    @devmahad Рік тому +7

    For my own reference:
    File descriptor is a int that store the id of file, so that we can access that later. This is store in a vnode table, that we can access using ulimit -a command. Now, we can use the output of one program, from standard input and send it to standard output. Or we can do vice versa.

    • @natnaelberhane3141
      @natnaelberhane3141 Місяць тому

      It's an index in a file descriptor table. A file descriptor table (FDT) is a list that keeps track of files created or used by the process. FDT is a list of pointers (pointers to `file` struct) that point to entry in the Open File Table (OFT).
      OFT contains entries for every currently open file or resource across all processes including file offsets and pointers to vnodes. The vnode table holds information about files and directories.
      FDT is per-process while OFT and vnode table are system-wide and shared across processes.

  • @aboalesaad
    @aboalesaad Рік тому

    such a seemless & to the point explanation.
    Thanks : )

  • @davidsun9026
    @davidsun9026 3 роки тому

    Thank you for posting these vids. Been a great help in my self education

  • @ashupar84
    @ashupar84 3 роки тому

    Hi there, the lecture/study material is good.

  • @PrashantSharma-ql4yb
    @PrashantSharma-ql4yb 3 роки тому

    Awesome explanation, thank you!!

  • @almehedi818
    @almehedi818 3 роки тому +31

    May Allah bless you, I've been thinking about doing some system programming for a while now. Thanks to you, I think I'm motivated enough to jump in. I hope you will publish more videos like this in near future :) Thank you

    • @6srer
      @6srer 7 місяців тому

      Im joining now😂😂
      How was your journey?

    • @almehedi818
      @almehedi818 7 місяців тому +2

      @@6srer learned a lot. Worth watching.

  • @abdulrahmanmasri8767
    @abdulrahmanmasri8767 3 роки тому

    Thanks a lot for your explanation

  • @rotrose7531
    @rotrose7531 3 роки тому

    Great great explanation

  • @entropy7571
    @entropy7571 3 роки тому

    You're an awesome teacher

  • @chetansoni8620
    @chetansoni8620 4 роки тому

    Thanks... I learn something new today

  • @Elywely
    @Elywely 3 роки тому +8

    Is there a way to get these assignments and the rest of the lectures? Im really interested in this topic.

  • @josiaskas
    @josiaskas 2 роки тому

    Thanks that was super clear

  • @karem_darwesh
    @karem_darwesh Рік тому

    What a king

  • @AmolGautam
    @AmolGautam 5 місяців тому

    thanks for this.

  • @tengjiang8922
    @tengjiang8922 3 місяці тому

    Great lecture! I'm wondering why is spawning subprocesses for ulimit and wc here?

  • @pranavsingh1081
    @pranavsingh1081 3 роки тому

    very helpful

  • @edgarcalochcampos1930
    @edgarcalochcampos1930 4 роки тому

    great!

  • @prashantpathak3175
    @prashantpathak3175 3 роки тому

    @Chris Thanks for this video. I need a help, So, I want to see the output of a running process (a .sh script with echo statement). When I went inside the /proc//fd, and run tail -f 1, no output were seen, then I tried ls -l, I see file discriptor is linked to pipe :[XXXXXX]. Not sure what it means? And how I can see the output of fd 1 of this process

  • @dawnwatching6382
    @dawnwatching6382 3 роки тому

    But if you spawn a process on the output side of the pipe, what if it tries to read before the process on the input side of the pipe finishes? I assume it waits until there's something to read?

  • @gaborm4767
    @gaborm4767 2 роки тому

    What is 361?

  • @aboalesaad
    @aboalesaad Рік тому

    Could anyone find these slides?

  • @kennethcarvalho3684
    @kennethcarvalho3684 2 місяці тому

    Is v-node the same as i-node

  • @volovodov
    @volovodov 3 місяці тому

    > Talks about Linux
    > Is on Windows
    mfw

  • @inoplanetyanya
    @inoplanetyanya 3 роки тому +1

    Меня укачало

  • @mcpietrooficial
    @mcpietrooficial 2 роки тому

    Girlirntn

  • @michalski9141
    @michalski9141 2 роки тому

    I don't trust this man, guess why

    • @ta7ino
      @ta7ino 2 місяці тому

      why?