Thread: retrieving file attributes in Linux

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    6

    retrieving file attributes in Linux

    Hey guys! I need some help.

    I have a problem on retrieving the file attributes in Linux. Like information about
    file user(owner & group), file permission, timestamp, file name, etc....

    i need it to make a C program whose output is the same as the command "ls -la".

    thanks a lot!

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    stat() : http://www.opengroup.org/onlinepubs/...ions/stat.html

    As for listing the files in a directory, have a look in the FAQ.

  3. #3
    Registered User
    Join Date
    Sep 2008
    Posts
    6
    Quote Originally Posted by zacs7 View Post
    stat() : http://www.opengroup.org/onlinepubs/...ions/stat.html

    As for listing the files in a directory, have a look in the FAQ.
    I got it bro!

    thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  2. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  3. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  4. how to compile C++ file on linux OS
    By singh_nav in forum C++ Programming
    Replies: 4
    Last Post: 08-17-2004, 06:30 AM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM