Bash-interesting-command-examples: Difference between revisions
Jump to navigation
Jump to search
(Created page with "====Interesting one-liners==== * Find all drives and ignore loop devices <pre> root@kvm03:/var/log# lsblk | grep -v "loop\|NAME" | grep "^[a-z]\|^[A-Z]" | awk '{print $1}' sda...") |
mNo edit summary |
||
Line 8: | Line 8: | ||
</pre> | </pre> | ||
<pre> | |||
root@kvm03:/var/log# lsblk | grep disk | awk '{print $1}' | |||
sda | |||
sdb | |||
root@kvm03:/var/log# | |||
</pre> | |||
Revision as of 14:04, 15 March 2022
Interesting one-liners
- Find all drives and ignore loop devices
root@kvm03:/var/log# lsblk | grep -v "loop\|NAME" | grep "^[a-z]\|^[A-Z]" | awk '{print $1}' sda sdb root@kvm03:/var/log#
root@kvm03:/var/log# lsblk | grep disk | awk '{print $1}' sda sdb root@kvm03:/var/log#