I want to displays the owner privileges of the files in the current directory
For example the output like this :
rwx addr_ph.txt rw- add.txt rw- a.txt rw- filename.txt rwx g.txt rwx script rwx script.save
I’m trying to write this command , but the output is not correct :
ls -al | cut -d " " -f1,9
Advertisement
Answer
You just do this command :
ls -al | sed '1d'| tr -s " " " " | cut -d" " -f1,9 | cut -c2-4,11-