Skip to main content
added 1 character in body
Source Link
Yves
  • 3.4k
  • 8
  • 38
  • 66

As we know, ls -S will list all files ordered by size.

What I'm trying to do is to list all files in the directory /usr ordered by size. So I executed the command as below:

find /usr -type f -exec ls -lS {} \;

However, it doesn't seem that this command listlists all files ordered by size... -S doesn't work here.

As we know, ls -S will list all files ordered by size.

What I'm trying to do is to list all files in the directory /usr ordered by size. So I executed the command as below:

find /usr -type f -exec ls -lS {} \;

However, it doesn't seem that this command list all files ordered by size... -S doesn't work here.

As we know, ls -S will list all files ordered by size.

What I'm trying to do is to list all files in the directory /usr ordered by size. So I executed the command as below:

find /usr -type f -exec ls -lS {} \;

However, it doesn't seem that this command lists all files ordered by size... -S doesn't work here.

Source Link
Yves
  • 3.4k
  • 8
  • 38
  • 66

ls -lS on the output of find doesn't sort the output

As we know, ls -S will list all files ordered by size.

What I'm trying to do is to list all files in the directory /usr ordered by size. So I executed the command as below:

find /usr -type f -exec ls -lS {} \;

However, it doesn't seem that this command list all files ordered by size... -S doesn't work here.