0

Saying that I want to execute ls -l on each file in the directory /usr.

Here is how I did:

cd /usr
find . -type f | ls -l

But it doesn't work as expected. The commands above will list all of directories in the /usr:

drwxr-xr-x  11 root root  4096 Mar  6 03:48 ./
drwxr-xr-x  23 root root  4096 Mar  6 02:32 ../
drwxr-xr-x   2 root root 36864 Mar  6 04:37 bin/
drwxr-xr-x   2 root root  4096 Apr 13  2016 games/
drwxr-xr-x  51 root root  4096 Mar  6 05:00 include/
drwxr-xr-x  73 root root  4096 Mar  6 04:34 lib/
drwxr-xr-x   3 root root  4096 Mar  6 03:48 libexec/
drwxr-xr-x  10 root root  4096 Mar  6 02:30 local/
drwxr-xr-x   2 root root  4096 Mar  6 04:34 sbin/
drwxr-xr-x 147 root root  4096 Mar  6 04:34 share/
drwxr-xr-x   6 root root  4096 Mar  6 04:00 src/

Why does the command give me such an output? How to list each file using ls -l in the /usr?

Yves
  • 3,291

0 Answers0