var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: To list 50 largest files along with FULL PATH and owner
Below command list top largest 50 files regardless of subfolders.
$ls -lR /root/home | sort +4 -5nr | head -50
-rw-r--r-- 1 john dpst 192954384 Nov 7 07:36 filenxx1.gz
-rw-rw---- 1 paul dpst 192188934 Nov 18 10:10 filenyyy1.mov
My new requirement is to get its "owner" and its "full path"
Result - example:
Please help me how to loop the list of 50 files and to get is owner and full path using "find" or any command in unix.
Thanks in advance.
I haven't tested this, and I presumed that you did not want to include the operating system files.
du -a /home |sort -r -n >workfile
while read size file
if [ ! -d $file ]
ls -l $file
count=`expr $count + 1`
if [ $count -gt 50 ]
echo less than 50 files
Tags for this Thread