customising listing of files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers customising listing of files
# 1  
Old 07-04-2005
customising listing of files

Hi,

I have some 5000 files in one directory, with the format for example

aaaaaa.12344.20050605.log
aaaaaa.12345.20050606.log
aaaaaa.12346.20050607.log
aaaaaa.12347.20050608.log
aaaaaa.12348.20050609.log
bbbbbb.12345.200506010.log
bbbbbb.12346.20050615.log
bbbbbb.12347.20050625.log
bbbbbb.12348.20050615.log
bbbbbb.12349.20050625.log
bbbbbb.12350.20050615.log
cccccc.12343.20050625.log
cccccc.12344.200506115.log
cccccc.12345.200506115.log
cccccc.12346.20050625.log
cccccc.12347.200506205.log
cccccc.12348.20050605.log
dddddd.12349.20050605.log
dddddd.12334.20050605.log
dddddd.12354.20050605.log
dddddd.12324.20050605.log
dddddd.123454.20050605.log

i want to list of out distinct file output, when i give ls -l command

output shd be

aaaaaa
bbbbbb
cccccc
dddddd

is this possible to get the output like this..

pls help
# 2  
Old 07-04-2005
ls | cut -d. -f1 | sort | uniq

Cheers
ZB
# 3  
Old 07-04-2005
thanks

Wow ,

thatst lovely output


thanks yaar
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Listing the file name and no of records in each files for the files created on a specific day

Hi, I want to display the file names and the record count for the files in the 2nd column for the files created today. i have written the below command which is listing the file names. but while piping the above command to the wc -l command its not working for me. ls -l... (5 Replies)
Discussion started by: Showdown
5 Replies

2. SuSE

Listing files

Hi, This may be silly for some of you guys, but please guide me, I have the followin fies in my directory, root@unix:/onlineredo/XTT77 : ls -l total 4129992 -rw------- 1 XTT77 XTT77 10493952 Jul 28 2010 S0106839.LOG -rw------- 1 XTT77 XTT77 10493952 Jul 28 2010 S0106840.LOG... (3 Replies)
Discussion started by: suren1829
3 Replies

3. Shell Programming and Scripting

perl script for listing files and mailing the all files

Hi, I am new to perl: I need to write perl script to list all the files present in directory and mail should be come to my inbox with all the files present in that directory. advanced thanks for valuable inputs. Thanks Prakash GR (1 Reply)
Discussion started by: prakash.gr
1 Replies

4. UNIX for Dummies Questions & Answers

listing certain files

How would i list the files that begin with a and end with .erc with 4 characters between (5 Replies)
Discussion started by: trob
5 Replies

5. UNIX for Advanced & Expert Users

listing files excluding files from control file

I have a directory named Project.I have a control file which contains valid list of files.I would like list the files from directory Project which contains files other than listed in the control file. Sample control file: TEST SEND SFFFILE CONTL The directory contains followign... (15 Replies)
Discussion started by: ukatru
15 Replies

6. Programming

Listing Files

Dear All, I want to list all the files of a Directory. I am not able to find out the code. So plz send me code in C in Unix Environmrnt so that I can Display all the file names of a Directory (3 Replies)
Discussion started by: krishna_sicsr
3 Replies

7. UNIX for Dummies Questions & Answers

customising the output

customising the output if i have entries in my file like 1234 A 3433 A 4343 B 3434 B 7667 C 4343 D can i get the output like A B C D 1234 4343 7667 4343 3433 3434 and also like (3 Replies)
Discussion started by: vasikaran
3 Replies

8. Linux

Listing of files

How can I list all files in a directory and its subdirectories that have been created or changed since the system was booted. I was trying to acomplish this with "ls" and "find" commands but could not get anything usefull. Maybe some one can provide me a hint. Thank you for your time. (1 Reply)
Discussion started by: Vitalka
1 Replies

9. UNIX for Dummies Questions & Answers

Recursive directory listing without listing files

Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories. The following command also shows the files but I only want to see the directories. ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies
Login or Register to Ask a Question