aspose file tools*
The moose likes Linux / UNIX and the fly likes pattern matching using ls command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "pattern matching using ls command" Watch "pattern matching using ls command" New topic
Author

pattern matching using ls command

deepu bhadriraju
Greenhorn

Joined: Aug 01, 2012
Posts: 12
Create the following files: chapa, chapb, chapc, chapd, chape, chapA, chapB, chapC, chapD, chapE, chap01, chap02, chap03, chap04, chap05, chap11, chap12, chap13, chap14, and chap15.


With reference to question 7, What is the command for listing all files ending in small letters?


With reference to question 7, What is the command for listing all files ending in capitals?


With reference to question 7, What is the command for listing all files whose last but one character is 0?


With reference to question 7, What is the command for listing all files which end in small letters but not 'a' and 'c'?

i tried with the following command ls *[a-z] on fedora linux but it is giving all the fill that end with small and captial letters
please give me correct ls command for the above exercise
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

We're not here to do your homework for you, but here's a useful hint: "glob". Ask Google.


Customer surveys are for companies who didn't pay proper attention to begin with.
deepu bhadriraju
Greenhorn

Joined: Aug 01, 2012
Posts: 12
Tim Holloway wrote:We're not here to do your homework for you, but here's a useful hint: "glob". Ask Google.[/quote


I too don't want you to do my homework.i never expected this kind of reply.i made a mistake of copying all the questions. if you can correct what mistake i made in the above command i.e ls *[a-z] for the first question
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: pattern matching using ls command