linux-commands.md 619 B

Linux Commands

Sort directory contents by filesize (largest to smallest)

With K, MB or GB overview

ls -lSh

Flushing DNS

Debian/Ubuntu-based distros (non-BIND)

Clear systemd DNS cache

systemd-resolve --flush-caches

Confirm the DNS purge

systemd-resolve --statistics

0 cache size indicates a successful DNS purge.

RHEL/CentOS/Arch-based distros

Clear systemd DNS cache

systemctl restart nscd

Simply restarting the service clears the DNS cache.

###BIND-based DNS Servers

systemctl restart named

or

systemctl restart bind9