The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem in opening UNIX file in Windows arunkumar_mca UNIX for Dummies Questions & Answers 4 09-18-2008 01:23 PM
problem opening TCP ports thehaapyappy IP Networking 5 04-30-2008 08:25 AM
Getting Following problem when opening shell script (Very Urgent) sunitachoudhury Shell Programming and Scripting 1 03-31-2008 08:01 AM
Problem Opening X-Clients in Solaris mahatma UNIX for Advanced & Expert Users 2 03-13-2006 02:08 AM
Problem opening port 9998 erica057 AIX 3 09-21-2005 06:27 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-25-2009
vkn_1985 vkn_1985 is offline
Registered User
  
 

Join Date: Oct 2009
Posts: 4
Problem in opening a file!

Hello All,
I am new to programming in unix.
I am trying to create a file by using open command. The entire file is :


Code:
#include<fcntl.h>
main(void){
int fd;
fd = open("File1", O_CREAT|O_WRONLY, S_IRUSR|S_IWUSR|S_IRWXO);
printf("%d ", fd);
}

The problem I am facing a strange problem. When I execute the above file (using gcc), I dont see File1 getting created! But if I change the filename with any other name (say File2), I am able to get create the file!

Could anyone pls tell me what could be happening?

Regards,
karthik

Last edited by pludi; 10-26-2009 at 08:55 AM.. Reason: code tags, please...
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0