diff --git a/.gitignore b/.gitignore index ab1cd64..3881fb3 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ etc bin/jdk-11* bin/ghidra* bin/android-studio* +bin/bookworm diff --git a/bin/specs.sh b/bin/specs.sh new file mode 100755 index 0000000..530b81b --- /dev/null +++ b/bin/specs.sh @@ -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 +