files and wild character


 
Thread Tools Search this Thread
Top Forums Programming files and wild character
# 1  
Old 10-14-2004
files and wild character

Hai,
Can any one give idea how to display files by wildcharacter in c.
If there is any function available it will very usefull for me.
# 2  
Old 10-14-2004
You've posted this same question all over this site and the internet....

opendir()
readdir()

read the man pages for these two.

are the two functions you need to use or maybe
Code:
system("ls -1")

# 3  
Old 10-14-2004
and there's glob(3)
# 4  
Old 10-15-2004
see this

Hai sir,
I do know about ls-l and du -ah all how to list in the manner of dir*.* and dir *.p in linux.
I have not get correct reply that so i posted this questions,
Thanks
# 5  
Old 10-15-2004
Read up on

opendir()/readdir()/closedir()/fnmatch()

or

glob()

ftw() (with fnmatch()) may be of interest as well if you do not care about portability with BSD systems - everyone but they supports it.

And I'll close this thread now because you abused the ``report post'' button - It is there to notify moderators of messages that violate the forum rules in one way or another, not to get someone to help you quicker.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Find wild card directory and its files of some extensions

I want to use Find command to find directories that have certain name and them find files in that directory having only some extensions. So far, I have come up with this command to list directories with wild card name and list ALL the files in that directory. find . -type d -name prog\* -print... (11 Replies)
Discussion started by: sssccc
11 Replies

2. UNIX for Dummies Questions & Answers

Unable to find files using wild card search

Hi All, My server is AIX and i am trying to search for a file in a specific path in directory. The file name can be of two types: Position_20131114.csv Position123333_20131114.csv I am trying to assign a SOURCEFILE variable as mentioned below:, but i am unable to find/locate the files... (2 Replies)
Discussion started by: abhi_123
2 Replies

3. Shell Programming and Scripting

list files not matching wild card

Hi I need a unix command which generates the list of files that dont match the wild card pattern in the current directory say for example I have files like x.addfd.txt.H2012.txt x.addfd.txt.H2012.txt x.asegfd.txt.H2012.txt adfd.bagddf I need the list of files which dont match... (4 Replies)
Discussion started by: lijjumathew
4 Replies

4. UNIX for Dummies Questions & Answers

How to use wild cards to find files beginning with upper and lower case

Im trying to use wild cards to find files that start with either an upper or lower case letter e.g. list files that beginning with b or B, i also want to sort them by the time they were last modified. e.g latest file created first. At the moment i have the following code that ls -d... (3 Replies)
Discussion started by: parker4001
3 Replies

5. Shell Programming and Scripting

Passing variable and wild card character to grep in Perl

HI All, I have a script that needs to find out a list of files in a directory, i pass the search parameter as an argument. opendir ( DIR, $dir ) || die "Error in opening dir $dirname\n"; @filename1 = (grep {/$File_pattern/ } readdir(DIR)); The problem is my file patterns are like... (1 Reply)
Discussion started by: amit1_x
1 Replies

6. Shell Programming and Scripting

Breaking a file into three new files, character by character

I am new to shell scripting, and need a script to randomly distribute each character from a file into one of three new files. I also need each character to maintain it's position from the original file in the new file (such that if a character is written to File 1, Files 2 and 3 have spaces... (10 Replies)
Discussion started by: foxcastle
10 Replies

7. UNIX for Dummies Questions & Answers

wild char * in if

if ; then => is it correct? i need to check 10 files size and do the same action. The file name is same but extension of the files are different. how do i deal with it? Please help (1 Reply)
Discussion started by: nidhink
1 Replies

8. Shell Programming and Scripting

How to use wild card character in string concatenation--please help

Hi All, I'm new to shell scripting. Please help me in achieving this I am trying to a find regular expression that need to pick a file with begin with the below format and this code is called in xml file. currently the script accepts:... (0 Replies)
Discussion started by: vasavi_cherku
0 Replies

9. Solaris

Consoles gone wild!

I have a Sunfire V890 running solaris 10 that has a weird console problem. In the XWindows environment, everything seems to work fine. However, if I go to command-line mode in multi-user mode or otherwise, my prompt scrolls accross the screen so incontrollably, that the only thing you can do is... (5 Replies)
Discussion started by: josephgreensr
5 Replies

10. UNIX for Dummies Questions & Answers

Email files with files - wild character

Dear friends: I have these data files: fileaa fileab fileac filead I want to email these file to someone. How can I email EACH SINGLE FILE with a wild card character? mail john@mail.com<fileaa mail john@mail.com<fileab ...............................ac... (4 Replies)
Discussion started by: bobo
4 Replies
Login or Register to Ask a Question