20 June 2021

How to list all html files in a directory recursively sorted by file size?

 How to list all html files in a directory recursively sorted by file size?

$du -a -h | sort -nr | grep 'html' | less

Note:

1. '-a' means all files and directories, not just directories.

2. '-h' means human readable.

3. '-n' means numeric sort.

4. '-r' means recursive.

No comments:

Post a Comment