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

Is shell a scripting language?

576


what is info area how many types?

2297


What is $1 in shell scripting?

593


What is the equivalent of a file shortcut that we have a window on a linux system?

609


Why should we use shell scripts?

594






What is shell company all about?

575


What happens when you type ls?

567


What is shell prompt?

568


What is the first line of a shell script called?

575


Write down the syntax for all the loops in shell scripting.

664


State the advantages of shell scripting?

596


What is the first line in every perl script called?

559


What are the different types of variables used in shell script?

556


How to check if a directory exists?

560


How do I save a powershell script?

562