Add specs.sh script
This commit is contained in:
parent
b72f123d0c
commit
515175c842
|
@ -15,4 +15,5 @@ etc
|
||||||
bin/jdk-11*
|
bin/jdk-11*
|
||||||
bin/ghidra*
|
bin/ghidra*
|
||||||
bin/android-studio*
|
bin/android-studio*
|
||||||
|
bin/bookworm
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue