oneliners/bash/biggest_file_in_installed_d...

4 lines
221 B
Bash
Raw Normal View History

2021-01-24 15:48:33 +01:00
#!/bin/bash
# find the biggest file in an installed deb package:
export PKG=vim; for i in $(dpkg -L $PKG) ; do if [[ -f "$i" ]] && [[ ! -L "$i" ]]; then ls -lh1 $i ;fi; done | sort -k 5 -hr | head -1 | cut -d " " -f 5,9-