Maddox

How to Count Files in Directory in Linux

How to Count files in Directory of Linux?

To count files in directory, use the “ls [path] | wc -l”, “find [path] | -type f | wc -l”, “tree [path]”, and “rsync –stat –dry-run -a [path]” commands.

How to Set or Change Hostname in Linux

How to Set or Change Hostname in Linux

To set or change the hostname in Linux, use the command “sudo hostnamectl set-hostname [name]” or by changing the computer name in Sharing of Settings.