9 More Discussions You Might Find Interesting
1. Programming
Hi everyone
I am developing an utility.
At some part of it I read directory entries to a dynamic array: struct list
It stores pointers to items: list.entries,
which are structures: struct entry
If a number of files in a directory is greater then number of elements an array was initially... (11 Replies)
Discussion started by: torbium
11 Replies
2. SuSE
Dear Experts,
i am trying to find whether the given name is file or a directory
dirp = opendir(dirname);
direntp = readdir(dirp);
if(direntp->d_type & DT_DIR)
{
printf("\n is a dirctory");
}
else
{
//dir_or_file = Mtrue;
printf("\n not a directory");
}
it always... (9 Replies)
Discussion started by: vin_pll
9 Replies
3. Shell Programming and Scripting
Quick question.
I can not get the context corrert on this code.
opendir(DIR, ".");
@fileldiv = grep(/l*/,readdir(DIR));
closedir(DIR);
I am trying to search all html files within a dir that start with l.
Thanks for your help. (1 Reply)
Discussion started by: mrlayance
1 Replies
4. Solaris
According to Sun documentation (Ldoms 1.1 Administration Guide), To access the ldm(1M) man page, add the directory path /opt/SUNWldm/man to the variable $MANPATH. When I add the lines:
MANPATH=$MANPATH:/opt/SUNWldm/man
export MANPATH
to .profile, exit root and re-login, I would have "man ldm"... (5 Replies)
Discussion started by: StarSol
5 Replies
5. Programming
I am having a hard time doing this and can't seem to find an example to help me. This is my code:
DIR *dirp=opendir(pathname);
struct stat filebuf;
struct dirent entry;
struct dirent *dp=&entry;
RWCString pattern;
for (int i = 0; i < request_->getNumStreams(); i++)
{
... (2 Replies)
Discussion started by: ajgwin
2 Replies
6. Programming
hi all,
im using dirent.h headers readdir() function to traverse down a directory ( after openning it with opendir() ), and im printing the dir->d_name in a program.
while(( dir = readdir( d ) ) != NULL ){
if (stat(, &info) != 0){
fprintf(stderr, "stat() error on %s: %s\n",... (2 Replies)
Discussion started by: wolwy_pete
2 Replies
7. UNIX for Dummies Questions & Answers
hello every one im a new to unix i use solaris 9 experimental i would like to use real unix system but there are to many versions and i need someone to recommend a good one for me i also need help on how to use "man" (3 Replies)
Discussion started by: abu_malek
3 Replies
8. Filesystems, Disks and Memory
I am trying to read the directory contents throgh the readdir system call.
After getting the directory entry I am testing the type of it by using the folllowing macros S_ISDIR() S_ISREG() etc. But in some systems every file in the directory is displaying like a sub directory. and in some systems... (2 Replies)
Discussion started by: gandhevinod
2 Replies
9. Programming
If i have my own application ( say 'myTool'), then is it possible to create a man page for it?
such that "man myTool" will give information about it.
if so how to go about it?
thanks in advance,
Nads (3 Replies)
Discussion started by: Nads
3 Replies