Answer the question
In order to leave comments, you need to log in
How can I display only file permissions using the cut command?
How can I use the cut command to display only file permissions on a long listing of a directory?
Let's take the /etc directory.
ls -l /etc
How can I redirect this to the cut command so that it only displays file permissions?
Answer the question
In order to leave comments, you need to log in
After a minute of reading man cut:
$ ls -l /etc | cut -f 1 -d ' '
drwxr-xr-x
-rw-r--r--
-rw-r--r--
-rw-r--r--
-rw-r--r--
-r--r-----
drwxr-x---
-rw-r--r--
drwxr-xr-x
drwxr-xr-x
drwxr-xr-x
-rw-r--r--
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question