cut command

Asked by princen

how do i use the cut command on the output of a long directory listing in order to display only the file permissions in ubuntu and then pipe this output to sort and uniq to filter out any double lines. Then use the wc to count the different permission types in this directory

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Cesare Montedonico
Solved:
Last query:
Last reply:
Revision history for this message
Best Cesare Montedonico (cmontedonico) said :
#1

well, its easy,
$ ls -al | cut -d" " -f1 | sort | uniq | wc -l

Revision history for this message
princen (spurchampion) said :
#2

Thanks Cesare Montedonico, that solved my question.