Here’s the table of contents:

  1. Show size of folders using du
  2. Show installed packages when using apt
  3. Show differences between folders
  4. Run linux command from python and get the output

Show size of folders using du

du -chs * --exclude=/media --exclude=/mnt | sort -h

See!

Show installed packages when using apt

apt list --installed

See!

Show differences between folders

diff -qr dir1 dir2

See!

Run linux command from python and get the output

import subprocess
result = subprocess.run(['ls', '-l'], stdout=subprocess.PIPE)
result.stdout

See!