Join us at IRC!
Understanding is the answer, hatred is the problem, and hackers are the slaves abused and destroyed in the process of peace online - Deshouleres
Friday, May 25, 2012
Navigation
Members Online
Total Online: 24
Web Spiders: 14
Guests Online: 24
Members Online: 0

Registered Members: 70208
Newest Member: andresuran
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

print directories

z0mb1e
Member

Posts: 19
Location:
Joined: 28.01.06
Rank:
Moderate
Posted on 11-04-06 23:23
can anyone tell what commands do i need for a program in c, to print in the screen the directories? like command "dir" for windows, or "ls" for linux???thanx.


When there's no more room in Hell, the dead will walk the Earth...
Author

RE: print directories

thousandtoone
Member

Posts: 274
Location: chown thousandtoone /
Joined: 16.04.05
Rank:
Monster
Posted on 12-04-06 03:31
That was certainly helpful.

There is a command called 'system' in stdlib.h for in an ANSI-compliant setup. It works, but the return isn't very helpful, and without overloading support like C#, it can be bothersome for more than destructive applications that just do rm -rf /.

Try using execl() instead, coupled with fork or pipe.


rootbound admin.
Author

RE: print directories

SySTeM
-=[TheOutlaw]=-

Posts: 1524
Location: England, UK
Joined: 27.07.05
Rank:
The Overlord
Posted on 12-04-06 12:46
I'd just use system("dir";) if I was on windows, although this is for C++, I don't know if it would work in C




http://www.elites0ft.com/
Author

RE: print directories

trix_31
Member



Posts: 212
Location: UK
Joined: 31.01.06
Rank:
Uber Elite
Posted on 12-04-06 14:33
...:D




trix_31 www.myspace.com/sketchthis31
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.