Professional advice on my project


 
Thread Tools Search this Thread
Top Forums Programming Professional advice on my project
# 1  
Old 07-07-2009
Professional advice on my project

Hi guys,

I'm pretty much a newbie to C.I need professional advice on my project.I'm supposed to write a program to scan a directory for .exe files and list them if any and also subsequently scan the subfolders for the same and so on...

Any advice on how to do it would be gladly accepted.
thank you
# 2  
Old 07-07-2009
Code:
find <directory> -name '*.exe'

# 3  
Old 07-07-2009
Take a look at: opendir, readdir, closedir, stat, and strcmp. Put it in a loop inside a function recurses for every directory found.
# 4  
Old 07-13-2009
consider ftw()

for the sake of simplicity and elegance of code, i recommend the study of ftw() - file_tree_walk ;

good luck, and success !
alexandre botao
Alexandre V. R. Botao | Unix, C/C++, Shell, LDAP, SSL/TLS, SSH, Perl, Java, Python, Security, ...
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need advice for project UNIX to Linux migration

I am working on UNIX AIX to Linux migration. Does anybody know the good site for doing this? Thanks for contribution (4 Replies)
Discussion started by: digioleg54
4 Replies

2. UNIX for Dummies Questions & Answers

The professional way to use chmod ?

Oracle Linux 6.4 with bash Question from a beginner To change permissions using chmod, I can use 2 methods. Since I don't know the terminology, I am calling them Method1 and Method2. In the below example, both Method1 and Method2 do the same thing. Which one is you favourite method ? #... (5 Replies)
Discussion started by: omega3
5 Replies

3. Shell Programming and Scripting

FINDING DUPLICATE PROJECT ( directory project )

I have a project tree like that. after running find command with the -no -empty option, i am able to have a list of non empty directory DO_MY_SEARCH="find . -type d -not -empty -print0" MY_EXCLUDE_DIR1=" -e NOT_IN_USE -e RTMAP -e NOT_USEFULL " echo " " > $MY_TEMP_RESULT_1 while... (2 Replies)
Discussion started by: jcdole
2 Replies

4. News, Links, Events and Announcements

A new project was posted on The UNIX and Linux Forums project board.

A new project was posted on your project board. Project title: Bash Shell Tutoring Estimated Budget: $50/hr Start date: Immediately Required skills: Linux, Bash, Shell, UNIX I work as a datawarehouse designer and developer. Although I usually stick to the role of an analyst,... (0 Replies)
Discussion started by: Neo
0 Replies

5. Solaris

what is the use of /etc/project file and project administration commands?

i have two doubts.. 1. what is the use /etc/project file. i renamed this file and when i tried to switch user or login with some user account the login was happening slowly. but when i renamed it to original name it was working fine... why so? 2. unix already has useradd and grouadd for... (4 Replies)
Discussion started by: chidori
4 Replies

6. Solaris

SSH doesn't pick up user's project from /etc/project

We have a system running ssh. When a user logs in, they do not get the project they are assigned to (they run under "system"). I verify the project using the command "ps -e -o user,pid,ppid,args,project". If you do a "su - username", the user does get the project they are assigned to (and all... (2 Replies)
Discussion started by: kurgan
2 Replies

7. UNIX for Dummies Questions & Answers

Any Professional Help me in this ?

Hello Here i got a problem, i bought new 40GB hard disk today, i made it as Primary Slave, No when i install Solaris, it says disk need fdisk to make solaris partition, but it does not say which disk need partition, i mean i have two disks, how i suppose to know which disk this will partition,... (1 Reply)
Discussion started by: abidmalik
1 Replies
Login or Register to Ask a Question