Find the answer to your Linux question:
Results 1 to 8 of 8
Hi, Can anybody tell me how can I traverse a directory from Kernel space? I'm using the path_lookup function. However, through the inodes I get with this functions I can ...
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    1

    File System

    Hi,

    Can anybody tell me how can I traverse a directory from Kernel space?

    I'm using the path_lookup function. However, through the inodes I get with this functions I can only access those files that have been displayed at some point by another process (doing ls from the terminal for example)

    Any idea ??

    Thanks.

  2. #2
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,230
    Hi malu_cazan,

    Welcome!

    I'm not sure of this but if you want, you can give it a try.

    I use "mc" midnight commander to traverse directories and copy or move files from one directory to another.
    nujinini
    Linux User #489667

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,975
    Nujinini, he is trying to do the traverse from kernel space - from within a kernel module I presume. MC won't help with that.

    Malu, can you please be more specific what exactly it is you are trying to do? That will help determine what functions you should be using. Also, you might want to move this thread to "The Linux Kernel" forum for better help on kernel programming issues.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    However, through the inodes I get with this functions I can only access those files that have been displayed at some point by another process (doing ls from the terminal for example)
    My guess, I think the function which you are using returns only cached inodes
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  5. #5
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,230
    Quote Originally Posted by Rubberman View Post
    Nujinini, he is trying to do the traverse from kernel space - from within a kernel module I presume. MC won't help
    Oohhhhh. I see... Anyway. I must follow this thread

    By the way....welcome home Rubberman!

    Have read so much about your experiences in your trip!
    nujinini
    Linux User #489667

  6. #6
    Just Joined!
    Join Date
    Jun 2010
    Posts
    6
    Does anyone have an answer to his question? I have a similar problem and would be interested in solution.

  7. #7
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,230
    Quote Originally Posted by guppy73 View Post
    Does anyone have an answer to his question? I have a similar problem and would be interested in solution.
    Hi and welcome aboard guppy73!

    You might want to try to start a new thread for your problem. Better chance of getting help specially if you can give as much details as you can. I warmly suggest

    Good luck!
    nujinini
    Linux User #489667

  8. #8
    Just Joined!
    Join Date
    Jun 2010
    Posts
    6
    Quote Originally Posted by nujinini View Post

    You might want to try to start a new thread for your problem. Better chance of getting help specially if you can give as much details as you can. I warmly suggest

    Good luck!
    Thank you for the quick response. I did as you suggested and created a thread under the "Linux Kernel" forum for my question. The thread is available at the following forum path (Note, it wouldn't let me directly link to the thread as a new user to the forums...sorry):

    Linux Forums > GNU Linux Zone > The Linux Kernel > Traversing/Counting contents of /proc/[pid]/fd

    The end of the URL looks like:

    .../linux-kernel/165102-traversing-counting-contents-proc-pid-fd-directories.html

    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...