Hi All,
Is there a direct Linux command to find the largest file by checking recursively in all the directories.
Hi All,
Is there a direct Linux command to find the largest file by checking recursively in all the directories.
what do you mean by direct Linux command ?
we use, find for it, and we have discussed it lot of times before which is:
find . -type f -exec ls -s {} \; | sort -n -r | head -5
find . -type f -exec ls -s {} \; | sort -n -r
Another one, but it will not be efficient as the one using find command as given by "thegeek"
ls -lR directory | sort -nk5 | awk 'END { print $NF }'
GNU find
$ find /home/ -type f -printf "%p:%s\n" | sort -t":" -k2 -n | tail -1