List certain file in a folder and make list


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers List certain file in a folder and make list
# 1  
Old 09-15-2008
List certain file in a folder and make list

Hi,

im having problem that frustate me today.

there are list of file in a folder that i want to grab

the folder /subject/items/

in this folder there are this file

CREATE_SUBxxxx.xml
UPDATE_SUBxxxx.xml
DELETE_SUBxxxx.xml
loginresponsexxxxx.xml
core

how can i grab all the file and export it to list.txt
which contain all file like
CREATE_SUBxxxx.xml
UPDATE_SUBxxxx.xml
DELETE_SUBxxxx.xml

because i dont want the core and loginresponse file.
# 2  
Old 09-15-2008
Try:

Code:
ls -1 *_SUB????.xml > file

Regards
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to list todays file in perticular folder?

How to list todays file in perticular folder Moved thread to appropriate forum (9 Replies)
Discussion started by: pspriyanka
9 Replies

2. UNIX for Dummies Questions & Answers

Unable to list folder contents

I'm unable to list the contents of a directory once I move into it. I have full permissions on this directory (called "Scripts" in the below example). The scenario is shown below in detail: Command 'ls' works fine to begin with: 1: pmn@linuxhost /home/pmn > cd /opt/smt/proiv 2:... (4 Replies)
Discussion started by: pmn
4 Replies

3. HP-UX

List year for a Folder

Hi, I am trying to list the year for this folder but it does not show. See output: ==> ls -ltrde default drwxr-xr-x 2 bea /tmp 8192 Jul 10 22:56 default Any reasons ? Instead of showing year it shows 22:56. Why ? (1 Reply)
Discussion started by: mohtashims
1 Replies

4. Shell Programming and Scripting

How to copy all the contents of a list of files present in a folder to a particular file?

Hi All, I want to copy all the contents of a list of files in a folder to a particular file. i am using following command: cat dir/* >> newFile.txtIt's not working. Could you please help? Thanks, Pranav (3 Replies)
Discussion started by: Pranav Bhasker
3 Replies

5. Shell Programming and Scripting

Take a list if strings from a file and search them in a list of files and report them

I have a file 1.txt with the below contents. -----cat 1.txt----- 1234 5678 1256 1234 1247 ------------------- I have 3 more files in a folder -----ls -lrt------- A1.txt A2.txt A3.txt ------------------- The contents of those three files are similar format with different data values... (8 Replies)
Discussion started by: realspirituals
8 Replies

6. Shell Programming and Scripting

Convert perl qw list to text file list?

Does anyone have a good example? I am having trouble looping.. Thanks (1 Reply)
Discussion started by: mrlayance
1 Replies

7. Shell Programming and Scripting

Splitting a list @list by space delimiter so i can access it by using $list[0 ..1..2]

EDIT : This is for perl @data2 = grep(/$data/, @list_now); This gives me @data2 as Printing data2 11 testzone1 running /zones/testzone1 ***-*****-****-*****-***** native shared But I really cant access data2 by its individual elements. $data2 is the entire list, while $data,2,3...... (1 Reply)
Discussion started by: shriyer
1 Replies

8. Shell Programming and Scripting

Make a list in bash out of arguments

Hello, I have a very stupid/simple problem, but for some reason I cannot figure out...and I need your help! I am writting a bash scrip that should be executed using "my_script X Y Z T" where X Y Z and T can be any string, but there can be any number of arguments. I want my script to do... (4 Replies)
Discussion started by: jolecanard
4 Replies

9. Shell Programming and Scripting

Fastest way to list a file in a folder containing 800,000 files using wildcard

Hi, I have a directory with possibly around 800,000 files in it. What is the fastest way to list file(s) in this directory with a wildcard. for example would ls -1 *.abcdefg.Z or find . -name "*.abcdefg.Z" be the fastest way to find all of the files that end with .abcdefg.Z... (6 Replies)
Discussion started by: jerardfjay
6 Replies

10. Shell Programming and Scripting

trying to list everything in a folder except . and ..

I want to list everything in a directory, including dotfiles (example .file1) except for the . and .. that are in every folder. I'm guessing it's some sort of regular expression I need. So far, I have come up with ls -a | grep That lists the .file1 file only (though I don't see why it should,... (2 Replies)
Discussion started by: dkieran
2 Replies
Login or Register to Ask a Question