Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to sort a result of Ls -l command based on columns. Ex.
i want to sort 5th column from output of ls -l command.

Answer Posted / kiran

$ ls -al | sort -n -k5

The -n in my example means "sort numerically", and the -k5
option means to key off of column five. Like other Unix
commands, these options can be combined and shortened, like
this:

$ ls -al | sort -nk5

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you debug a script?

1024


What are the various stages of a linux process it passes through?

1121


What is shell geeksforgeeks?

1053


wats the deinitions for shell utility and filter?

2275


How will you copy a file from one machine to other?

964


Is bash a shell script?

1017


What are the disadvantages of shell scripting?

1148


Determine the output of the following command: name=shubham && echo ‘my name is $name’.

952


‎What is a shell? · ‎Types of shell · ‎what is shell scripting?

939


What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?

1030


write a shell script to check the failed jobs?

4366


What's the difference between scripting and coding?

1118


What language is bash written in?

966


What is bourne shell scripting?

936


What are types of shells?

989