Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I was wondering if someone could help me out. I've downloaded some files that end in .c (c scripts I assume?). How do I run these under linux? What ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2003
    Posts
    1

    Compiling


    Hi, I was wondering if someone could help me out. I've downloaded some files that end in .c (c scripts I assume?). How do I run these under linux?

    What is the command? Do I have to compile them first?

    Thanks

  2. #2
    Linux Engineer kriss's Avatar
    Join Date
    Jun 2003
    Posts
    1,113
    Yes you need to compile them.

    Code:
    gcc -o binaryfile sourcecode.c
    or,
    Code:
    gcc sourcecodefile.c
    then the binary file will be named a.aout

    To run the files, either specify the full path to the file, f.x. /home/user/a.out or ./a.out

Posting Permissions

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