Commit de5d57b9 authored by Philippe Dagenais's avatar Philippe Dagenais Committed by Ed Reel

Add used disk space to the files command (#2216)

* Add used disk space to the files command

* Use the filelist variable

* Simplify the disk usage message
parent 3a1cabd6
......@@ -234,7 +234,9 @@ def files (pkgName)
if File.exists? "#{filelist}"
system "sort #{filelist}"
lines = `wc -l "#{filelist}"`.strip.split(' ')[0].to_i
size = `du -ch $(cat #{filelist}) | tail -1 | cut -f 1`
puts "Total found: #{lines}".lightgreen
puts "Disk usage: #{size}".lightgreen
else
puts "Package #{pkgName} is not installed. :(".lightred
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment