Skip to content

Instantly share code, notes, and snippets.

@lhriley
Created June 22, 2017 23:28
Show Gist options
  • Select an option

  • Save lhriley/6bf75fd083c440af19f982233b33bdcd to your computer and use it in GitHub Desktop.

Select an option

Save lhriley/6bf75fd083c440af19f982233b33bdcd to your computer and use it in GitHub Desktop.
Find all file types in a given directory tree
find /var/log/* | xargs file
/var/log/apt: directory
/var/log/auth.log: ASCII text, with very long lines
/var/log/btmp: empty
/var/log/dist-upgrade: directory
/var/log/dmesg: ASCII text
/var/log/dpkg.log: ASCII text
/var/log/faillog: data
/var/log/fsck: directory
/var/log/fsck/checkroot: ASCII text
/var/log/fsck/checkfs: ASCII text
/var/log/kern.log: ASCII text
/var/log/lastlog: data
/var/log/lxd: directory
/var/log/syslog: ASCII text
/var/log/unattended-upgrades: directory
/var/log/unattended-upgrades/unattended-upgrades-shutdown.log: empty
/var/log/vboxadd-install-x11.log: ASCII text
/var/log/wtmp: data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment