Question: How to redirect the shell command history to Syslog? There are several methods to do this. You can try with any one of the 3 methods below: Method 1 – via rsyslog service To use rsyslog for logging every shell command, just follow steps below: 1. Create a new rsyslog configuration file, and define […]
Archives for May 2021
How to Change the Default Shell In Linux
In the following example “
What is umask in UNIX/Linux
The user file creation mode mask (umask) is a built-in shell command that may be used to set default values for the read/write/execution permissions on newly created files. It should be executed in either the “.cshrc” or “.profile” shell startup files. It is given a three-digit octal value, which represents the binary inverse of the […]
pvresize Command Examples in Linux
pvresize is a tool to resize Physical Volume which may already be in a volume group and have active logical volumes allocated on it. Expand the PV on /dev/sda1 after enlarging the partition with fdisk: # pvresize /dev/sda1 Shrink the PV on /dev/sda1 prior to shrinking the partition with fdisk (ensure that the PV size […]
Converting Many Small Files To A Sequence File In HDFS
Having a lot of small files in HDFS is not efficient for processing and also not good for NameNode metadata. This FAQ provides some common questions and answers on how to convert many small files to a larger sequence file and how to access it. What use cases sequence file option would be better than […]