Last active
December 12, 2023 05:44
-
-
Save devynspencer/cfdce35b3230e72214ef to your computer and use it in GitHub Desktop.
A quaint collection of bash commands detailing the inner struggle of mankind.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list all attached usb devices | |
lsblk --nodeps --noheadings --list --scsi --paths --output name,vendor,model,tran | grep ' usb' | |
# restart a fuckload of services at once | |
services=('api backup scheduler volume'); for service in $services; do systemctl restart openstack-cinder-$service; done | |
# display concise ip / network interface info | |
ip addr show | sed -nE "s/inet\s(.*)\/[0-9]+.*\s(\w+)/\2 \1/p" | column -to ' => ' | |
# lo => 127.0.0.1 | |
# enp0s25 => 10.107.1.95 | |
# virbr0 => 192.168.124.1 | |
# list all ethernet network interfaces | |
ip link show | sed -nE "s/[0-9]:\s(\w+):.*/\1/p" | grep 'en|eth' | |
# download and run a remote shell script | |
script_url='http://host.internal/directory/filename.sh'; wget $script_url -O - | bash | |
# extract one file from an rpm | |
rpm2cpio logrotate-1.0-1.i386.rpm |cpio -ivd etc/logrotate.conf | |
# install file from rpm | |
yum --nogpgcheck localinstall packagename.arch.rpm | |
# save youtube videos from all chrome tabs | |
chrome-cli list links | awk '{ print $2}' | sort -u | grep viewkey >> movies.db | |
# download youtube videos from all chrome tabs | |
chrome-cli list links | awk '{ print $2}' | grep viewkey | youtube-dl --external-downloader=aria2c --batch-file - # may cause wtf-mode on networking | |
chrome-cli list links | awk '{ print $2}' | grep viewkey | youtube-dl --batch-file - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Meanwhile, in finger town ...