Solved

Bash Shell ls command to list directory

Posted on 2008-10-30
1
929 Views
Last Modified: 2013-12-26
I use the "ls" command to list the directory and get the output as below.
AAA.BB-1  
AAA.BB-10
AAA.BB-2  
AAA.BB-3  
AAA.BB-4  
AAA.BB-5  
AAA.BB-6  
AAA.BB-7  
AAA.BB-8  
AAA.BB-9  
I was wondering how I can list the directory in ascending order based on the last number of each file? The desired output should be looked as below.
AAA.BB-1  
AAA.BB-2  
AAA.BB-3  
AAA.BB-4  
AAA.BB-5  
AAA.BB-6  
AAA.BB-7  
AAA.BB-8  
AAA.BB-9  
AAA.BB-10
Any suggestions?
0
Comment
Question by:bin571
1 Comment
 

Accepted Solution

by:
bin571 earned 0 total points
ID: 22844896
ls -U
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
copyEndy  challenge 15 86
delete a folder ever 5 minutes 6 60
RoboCopy to Changing External Drives 2 39
recursion example 16 112
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now