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

ls -l | awk '{print $5}'

Is This Answer Correct ?    7 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the crontab?

547


How to print pid of the current shell?

604


c program which behaves like a shell(command interpreter). it has its own prompt say "NewShell$".any normal shell command is executed from your shell by starting a child process to execute a system program corrosponding to the command

4693


What is echo in shell?

638


i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..

1793






What is .sh file in mac?

561


What command needs to be used to take the backup?

533


Write a command sequence to find all the files modified in less than 2 days and print the record count of each.

939


I have 2 files and I want to print the records which are common to both.

702


What is awk script?

548


Can you write a script to portray how set –x works?

554


How do you create a shortcut in linux?

597


How does shell scripting work?

620


What are the different types of shell scripting?

538


What is meant by dos operating system?

578