Code Snippet

Just another Code Snippet site

linux

Linux | /etc/security/limits.conf

Limiting user processes is important for running a stable system. To limit user process resource, you have just to set shell limit by adding: a user name or group name or all users to /etc/security/limits.conf file and impose then process limitations. Example of /etc/security/limits.conf file A soft limit is like a warning and hard limit […]

, , ,

[Bash] How-To

Create a tar.gz file for each file : Add datetime in bash history : To replace the first occurrence of a pattern with a given string, use ${parameter/pattern/string}: To replace all occurrences, use ${parameter//pattern/string}: Show path in bash prompt Add following line in .bashrc Check keyboard input and call associated function: Script used to ask […]

, , ,

[How-To] SSH

SSH to a machine using an SSH bastion (proxy) for example : and with additional SSH options : —- SSHPass Execure command as ssh (using SSH PASS)

, , ,

[How-To] CentOS & RHEL

Create a new PV / VG / LV from an empty disk Create partition with fdisk Create PV / VG / LV Edit /etc/fstab & mount drive: ———- Extend an existing partition by adding a new disk Create a new PV / VG / LV from an empty disk Create partition with fdisk Create PV […]

, , ,

Previous Posts