How to search multiple directories with find command

The “find” command is a powerful command-line utility that can be used to search for files and directories in one or more directories. Here’s an example of how to search for files with the “.txt” extension in the directories “/home/user/dir1” and “/home/user/dir2”: find /home/user/dir1 /home/user/dir2 -name “*.txt” This command uses the “find” command with the … Read more

How to install sshpass on macOS / OS X

sshpass is a command-line utility that allows you to provide a password for an SSH login on the command-line, rather than being prompted for it interactively. Here’s an example of how to install sshpass on macOS/OS X: Install Homebrew: The easiest way to install sshpass on macOS/OS X is by using the package manager Homebrew. … Read more

How to stop cat command in Linux

You can stop the cat command in Linux by sending an interrupt signal (CTRL + C) to the terminal where the command is running. When you press CTRL + C it sends an interrupt signal to the process running in the terminal. This signal causes the process to terminate immediately. Alternatively, you can also stop … Read more

How do I list lxc snapshots for LXD on Linux?

In Linux, you can use the command-line utility “lxc” to list snapshots for a container managed by LXD. Here’s an example of how to list snapshots for a container called “container1”: lxc info container1 | grep Snapshots This command uses the “lxc info” command to display information about the container “container1”, and then pipes the … Read more

How to list all installed packages on OpenSUSE/SUSE Linux

In OpenSUSE/SUSE Linux, you can use the package manager “zypper” to list all installed packages. Here’s an example of how to list all installed packages on OpenSUSE/SUSE Linux: zypper se -i -t package This command uses the “zypper” command with the “se” (search) option, followed by the “-i” (installed) option and the “-t” (type) option … Read more