Sponsored Content
Full Discussion: Almost -> Hello World!
Top Forums Programming Almost -> Hello World! Post 302450936 by teresaejunior on Saturday 4th of September 2010 11:18:24 PM
Old 09-05-2010
Oh, thanks! I actually got it with:

Code:
FILE *fp = fopen("/tmp/filename","r");
if( fp ) {
    unlink("/tmp/filename");
    exit(EXIT_SUCCESS);
fclose(fp);
}

But unfortunately I thought I would just paste it in the beginning of some int main() and it would work, but is far beyond that... Too many source files and none of them worked. Thanks anyway!
 

7 More Discussions You Might Find Interesting

1. Solaris

hello world

just wanted to give salutations to all in here. i hope to contribute as much as i take. happy "unix-ing" :b: (0 Replies)
Discussion started by: JeepResQ
0 Replies

2. What is on Your Mind?

What The World Needs Now...

What does the world need now.... ??? Feel free to suggest new items to the poll .... we might add them :) (25 Replies)
Discussion started by: Neo
25 Replies

3. UNIX for Dummies Questions & Answers

What in the world does $$ mean?

If I type "echo $$" in to the command line it outputs some random number but it outputs the same one every time. What is this? (7 Replies)
Discussion started by: weexpectedthis
7 Replies

4. What is on Your Mind?

How Will the World End?

How will the world end (someday long into the future, we hope)? (68 Replies)
Discussion started by: Neo
68 Replies

5. Programming

Exact meaning of the "world" in "hello world"

Hello! I have a question to native English-speaking people. In the popular program's "hello world" greeting, what meaning the "world" has: "all", "everybody", "people", "friends" or "whole world", "planet", "Earth", "Universe"? In other words, to whom this greeting is addressed: to the... (14 Replies)
Discussion started by: Eugene Muzychen
14 Replies

6. What is on Your Mind?

Hello World!

Just wanna say "Hello World!" :) (6 Replies)
Discussion started by: ment0smintz
6 Replies

7. What is on Your Mind?

Mad World Remix of Moby Video (Are You Lost In The World Like Me)

This is an excellent video comment on modern society and the remix is good too: https://www.youtube.com/watch?v=5DU1B_XkyIk 5DU1B_XkyIk Watch the video above and post your comments. (3 Replies)
Discussion started by: Neo
3 Replies
UNLINK(3)								 1								 UNLINK(3)

unlink - Deletes a file

SYNOPSIS
bool unlink (string $filename, [resource $context]) DESCRIPTION
Deletes $filename. Similar to the Unix C unlink() function. An E_WARNING level error will be generated on failure. PARAMETERS
o $filename - Path to the file. o $context - Note Context support was added with PHP 5.0.0. For a description of contexts, refer to "Streams". RETURN VALUES
Returns TRUE on success or FALSE on failure. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.0.0 | | | | | | | As of PHP 5.0.0 unlink(3) can also be used with | | | some URL wrappers. Refer to "Supported Protocols | | | and Wrappers" for a listing of which wrappers | | | support unlink(3). | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 Basic unlink(3) usage <?php $fh = fopen('test.html', 'a'); fwrite($fh, '<h1>Hello world!</h1>'); fclose($fh); unlink('test.html'); ?> SEE ALSO
rmdir(3). PHP Documentation Group UNLINK(3)
All times are GMT -4. The time now is 09:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy