This Blog is to share our knowledge and expertise on Linux System Administration and VMware Administration

Wednesday, October 25, 2017

How to get the huge files size & name with single command in Linux Server?

Use the below command to get the huge file size and name.

root@testserver:~# /usr/bin/find / -xdev -type f -size +1024 -ls | awk '{print $7,"",$11}' |sort -m | awk '{print $1/1024/1024,"","MB","",$2}' |sort -rn -k 1

45.284  MB  /var/cache/apt/pkgcache.bin
45.264  MB  /var/cache/apt/srcpkgcache.bin
39.8765  MB  /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-amd64_Packages
39.7197  MB  /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-i386_Packages
26.518  MB  /var/cache/apt/archives/libpython2.7-dev_2.7.12-1ubuntu0~16.04.1_amd64.deb
24.7127  MB  /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
22.3409  MB  /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_universe_i18n_Translation-en
21.4124  MB  /usr/lib/gcc/x86_64-linux-gnu/5/cc1plus
19.9162  MB  /usr/lib/gcc/x86_64-linux-gnu/5/cc1
19.4404  MB  /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.a
19.1068  MB  /usr/lib/gcc/x86_64-linux-gnu/5/lto1
18.8433  MB  /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7-pic.a
18.7048  MB  /usr/lib/snapd/snapd
14.6835  MB  /usr/bin/snap

....
...
..
.
Hope it helps.

No comments:

Post a Comment