Add specs.sh script

This commit is contained in:
Horseshoe Crab 2021-08-04 09:29:14 -07:00
parent b72f123d0c
commit 515175c842
2 changed files with 39 additions and 0 deletions

1
.gitignore vendored
View File

@ -15,4 +15,5 @@ etc
bin/jdk-11*
bin/ghidra*
bin/android-studio*
bin/bookworm

38
bin/specs.sh Executable file
View File

@ -0,0 +1,38 @@
#!/bin/sh
# This script (eventually) holds a bunch of commands that display basic
# hardware specification information (CPU, RAM, storage, etc...) so that I less
# frequently need to consult the internet or man pages.
#
# TODO: add more commands for more hardware peripherals
#
# x1phosura
_fetch_cpu_info() {
lscpu
}
_fetch_ram_info() {
lsmem
free -h
# TODO: get info on what model RAM
}
_fetch_blk_storage_info() {
sudo -v # validate sudo
# get list of block devices, display information on each
blk_dev_list=$(lsblk | grep 'disk' | awk '{print $1}')
for blk_dev in $blk_dev_list ; do sudo hdparm -I /dev/$blk_dev ; done
}
# TODO: add following: screen, NIC (wired/wireless), battery, camera, USB ports
# TODO: add command-line options to select which specs to display if desired
_fetch_cpu_info
_fetch_ram_info
_fetch_blk_storage_info