Find the answer to your Linux question:
Results 1 to 4 of 4
Helo. I have a problem. In windows I did a program that writes on screen all *.cpp files that are in a folder I want. Using recursion I went through ...
  1. #1
    Just Joined!
    Join Date
    Feb 2008
    Posts
    1

    C programming help

    Helo.

    I have a problem.
    In windows I did a program that writes on screen all *.cpp files that are in
    a folder I want. Using recursion I went through all folders and I filterd all *.cpp files.

    But in linux I dont know how becouse there is no CFindFile class.
    How do I search through folder with recursion?

    Please help me with my problem.

    Thank you.

  2. #2
    Linux Newbie
    Join Date
    Jan 2008
    Location
    UK
    Posts
    211
    Quick question does it need to be in C as for this sort of thing most people use builtin commands and or shell scripts.

  3. #3
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    Try this website. It shows how to use stat()

    using stat in linux C program : c, linux, stat, programming

  4. #4
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    So in Linux, our library is called the GNU C Library (glibc). It implements the C standard, along with all the assorted POSIX and Linux functions that help you function.

    Documentation on these functions are available through Linux's man pages (for instance, try running the command "man 2 write"), but you can find the entire manual online at:
    The GNU C Library

    And for your particular case, this section might be useful:
    File System Interface - The GNU C Library
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

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