Linux:Bash Useful Tips: Difference between revisions
m added unattended dist-upgrade tip for Debian |
mNo edit summary |
||
Line 1: | Line 1: | ||
== Debian: unattended dist upgrade == | == CentOS: Renaming multiple files with the same extension == | ||
rename .ext .ext.bak *.ext | |||
(!) Beware that the rename command may work differently acc. to your Linux distribution | |||
== Debian: unattended dist-upgrade == | |||
apt update && \ | apt update && \ | ||
export DEBIAN_FRONTEND=noninteractive && \ | export DEBIAN_FRONTEND=noninteractive && \ | ||
apt -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade -yq && \ | apt -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade -yq && \ | ||
apt autoremove --purge -y | apt autoremove --purge -y | ||
(!) Use '''screen''' whenever possible for those kind of operations | |||
== Extending a LV (ext4/xfs) with all available space in one command == | == Extending a LV (ext4/xfs) with all available space in one command == | ||
lvextend -l +100%FREE /dev/vg_base/var -r | lvextend -l +100%FREE /dev/vg_base/var -r | ||
== snmp v3 command sample == | == snmp v3 command sample == | ||
snmpwalk -v3 -l authPriv -u <uid> -a SHA -A <pwd> -x DES -X <pwd> <fqdn/ip> <oid-optional> | snmpwalk -v3 -l authPriv -u <uid> -a SHA -A <pwd> -x DES -X <pwd> <fqdn/ip> <oid-optional> |
Latest revision as of 14:05, 23 August 2017
CentOS: Renaming multiple files with the same extension[edit]
rename .ext .ext.bak *.ext
(!) Beware that the rename command may work differently acc. to your Linux distribution
Debian: unattended dist-upgrade[edit]
apt update && \ export DEBIAN_FRONTEND=noninteractive && \ apt -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade -yq && \ apt autoremove --purge -y
(!) Use screen whenever possible for those kind of operations
Extending a LV (ext4/xfs) with all available space in one command[edit]
lvextend -l +100%FREE /dev/vg_base/var -r
snmp v3 command sample[edit]
snmpwalk -v3 -l authPriv -u <uid> -a SHA -A <pwd> -x DES -X <pwd> <fqdn/ip> <oid-optional>