473,387 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to create a directory?

Hi,

I'm using gcc on Linux, and looking for the command used to create a
directory. Does anyone know it?
Thanks

Andre
Nov 13 '05 #1
7 51862
md or mkdir

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk

"sieg1974" <si******@yahoo.com> schrieb im Newsbeitrag
news:89*************************@posting.google.co m...
Hi,

I'm using gcc on Linux, and looking for the command used to create a
directory. Does anyone know it?
Thanks

Andre

Nov 13 '05 #2
"sieg1974" <si******@yahoo.com> skrev i meddelandet
news:89*************************@posting.google.co m...
Hi,

I'm using gcc on Linux, and looking for the command used to create a
directory. Does anyone know it?
Thanks

Andre


This is off topic in this newsgroup. The ANSI C standard library doesn't
contain any function for creating directories. Try asking in
comp.unix.programmer or similar newsgroup.
Nov 13 '05 #3
"cody" <de********@gmx.net> writes:
"sieg1974" <si******@yahoo.com> schrieb im Newsbeitrag
news:89*************************@posting.google.co m...
Hi,

I'm using gcc on Linux, and looking for the command used to create a
directory. Does anyone know it?


md or mkdir


[de-top-posted]

This is why it's best to ask questions like this in an appropriate
newsgroup. The regulars in a Linux newsgroup would know that there's
no "md" function or command. (It's an alias for "mkdir" in MS-DOS.)

The question itself isn't inherently off-topic, but the proper answer
is that there's no portable way to do it in C.

--
Keith Thompson (The_Other_Keith) ks*@cts.com <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
Nov 13 '05 #4
si******@yahoo.com (sieg1974) writes:
Hi,

I'm using gcc on Linux, and looking for the command used to create a
directory. Does anyone know it?


/* example */
#include<sys/stat.h>

int main(int argc,char **argv){
if (argc < 2) exit(1);
mkdir(argv[1],0777);
return 0;
}

try :
$>info libc
you will find A LOT of very usefull information .

Bye .

Nov 13 '05 #5

"Nicola Mingotti" <ni*************@libero.it> wrote in message
I'm using gcc on Linux, and looking for the command used to create > > a directory. Does anyone know it?

Your reply was valid for unix type systems only. In ANSI C there is no
standard way of creating directories.
Please don't give platform-specific information so that we can maintain
topicality on the group.

Nov 13 '05 #6
>"Nicola Mingotti" <ni*************@libero.it> wrote in message
> I'm using gcc on Linux, and looking for the command used to create > > adirectory. Does anyone know it? >

Your reply was valid for unix type systems only. In ANSI C there is no
standard way of creating directories.


mkdir(2)
CONFORMING TO
SVr4, POSIX, BSD, SYSV, X/OPEN.

If not ANSI C, then POSIX ;) which is quite a standard for me.

--
- Jan Engelhardt
Nov 13 '05 #7
Jan Engelhardt <je*****@linux01.gwdg.de> wrote:
"Nicola Mingotti" <ni*************@libero.it> wrote in message

> I'm using gcc on Linux, and looking for the command used to create > > a

directory. Does anyone know it?
>

Your reply was valid for unix type systems only. In ANSI C there is no
standard way of creating directories.


mkdir(2)
CONFORMING TO
SVr4, POSIX, BSD, SYSV, X/OPEN.

If not ANSI C, then POSIX ;) which is quite a standard for me.


But is not discussed in comp.lang.c, sorry.

It would have been much better to tell the OP that his problem is not
addressed by the C standard(s) and therefore by c.l.c and then redirect
him to a NG where he is more likely to get profound information.

This has already been done, five and six days ago. What made you think
it's a good idea to place an off-topic reply right here, right now?

No offense intended. Regards,

Irrwahn
--
do not write: void main(...)
do not use gets()
do not cast the return value of malloc()
do not fflush( stdin )
read the c.l.c-faq: http://www.eskimo.com/~scs/C-faq/top.html
Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ken Fine | last post by:
I want my application to maintain a directory tree based on months and years, e.g.: 2004 January file file file February file
2
by: Christian Pické | last post by:
Hi, I tried following code, but I get an execption "URI formats not supported" Directory.CreateDirectory(@http://www.test.com/shop/images); The path is not located on my own computers, but...
2
by: Paul Bromley | last post by:
How can I create a directory within a shared ntwork directory?? sServerName - is the Server name "\Docs" - is the shared directory "\Others" - is the directory to create. The following...
4
by: tomek | last post by:
hi i'm desperate... i'm trying this for 2 days now... so if anyone can help - please. i have upload form in which users can choose TYPE of file they are uploading (graphic/text/music) - and...
5
by: AmitGujrathi | last post by:
Hi all,,, can anybody pls tell me how to create directory on web server using C#.Net windows application thanks in Advance Amit
4
by: Robert | last post by:
Greetings New to Visual Studio 2008. Always us VB6.0 SP5. I am trying to copy files from A to B. I select a directory, and copy files. Works ok, but it does not create the directory first. ...
4
by: kathy30 | last post by:
I'm storing files in SQL and retrieving them when needed to the user's C: Drive This is accessed on our Intranet site, the problem is the create directory and saving files happens on the Server...
6
by: coolestavi007 | last post by:
Hi, I have to create directories on the FTP server. I have tried directory.exists but it doesnt work.Any other way to create directory on the server.Please help me.
1
by: printline | last post by:
Hello all I have a php script that uploads a file from a form into a directory. The directory is automatically created through the script. But the upload file is not put in to the directory,...
4
Frinavale
by: Frinavale | last post by:
I am not the greatest system administrator and I am having some problems with my current setup which has crippled my ability to continue my current Joomla project that I'm working on. I cannot...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.