Computing.Net > Forums > Linux > How determine executable file-type

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How determine executable file-type

Reply to Message Icon

Name: zappsweden
Date: March 31, 2003 at 07:39:30 Pacific
OS: Red Hat 8
CPU/Ram: P2-350MHz
Comment:

With "man stat" i found alot of functions to use for determining file types. However, I did not find any information about determining if a file is an executable.

Where do I find such a function?
I have already searched the man pages for execv, execl, ... but with no success.



Sponsored Link
Ads by Google

Response Number 1
Name: Jake
Date: March 31, 2003 at 07:58:13 Pacific
Reply:

Use the file command.


0

Response Number 2
Name: zappsweden
Date: March 31, 2003 at 09:28:08 Pacific
Reply:

Oops, i forgot to mention that I must do it (assignment about doing a program simulating the ls command) with the C-language, not by using shell commands.

For example, I did use the S_ISDIR(m), from stat(2) in the manual section, to determine if a file was a directory.



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: How determine executable file-type

File type with extension igz www.computing.net/answers/linux/file-type-with-extension-igz/27337.html

How to do file sharing in Linux? www.computing.net/answers/linux/how-to-do-file-sharing-in-linux/6154.html

Executable files in Linux...... www.computing.net/answers/linux/executable-files-in-linux/6688.html