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 / karunaprakash

Place the selected 5th coloumn in the file file1 and sort
the file1.


$ ls -l | cut -f 5 > file1
$sort file1

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should shell programming/scripting not be used?

586


What is basename in shell script?

585


What is shell and terminal?

572


How do you create a shortcut in linux?

589


How to print pid of the current shell?

598






How does shell scripting work?

607


Why is it called a shell?

503


is this growing field and what is average package in this?

1870


How do we create command aliases in a shell?

534


What is option in shell script?

556


What is bash coding?

494


Write down the syntax of "for " loop

605


How do I run a powershell script?

569


What is bash shell command?

557


What are the different variables present in linux shell?

608