#linux bash script
Explore tagged Tumblr posts
Text
Introducing Spike Sleuth, a real-time Linux disk I/O monitoring tool designed to help you identify and analyze unexpected disk activity spikes. Born from the need to pinpoint elusive IOPS alerts, Spike Sleuth offers a lightweight solution that logs processes, users, and files responsible for high disk usage without adding overhead. Whether you're a developer, system administrator, or solutions architect, this tool provides the insights needed to maintain optimal system performance. Discover how Spike Sleuth can enhance your system monitoring and help you stay ahead of performance issues. #Linux #Monitoring #OpenSource #SystemAdmin #DevOps
#devops monitoring#disk I/O monitoring tool#iops monitoring#linux bash script#linux disk monitoring#linux performance#linux sysadmin tools#real-time monitoring linux#systemd service#troubleshoot disk spikes
0 notes
Text
Hey Linux users! Do you trust untested AI-generated bash scripts
Assume that you checked the script to make sure the script did what you wanted to do and that it's safe (eg, no rm -rf when you're not deleting something, or unnecessary use of sudo, etc) but you didn't test the script on a VM, test server, etc.
Personally, my answer is no, because I don't trust AI, and I believe you should always test all your bash script (unless they are super simple)
30 notes
·
View notes
Text
i love how much programmer shenanigans linux enables. run arbitrary scripts via file manager right-click actions. crack open the lock screen display code and fuck around with it. hell run any arbitrary code from ur fuckin timer app. so much FREEDOM. every time i see the option to run a bash script when some event happens a catperson gets their ears
#ktimer lets me run bash scripts when a timer finishes and i havent used it for anything yet but that could be SO MUCH SHENANIGANS#so much power. thankj u linux
39 notes
·
View notes
Text
still thinking about this one

148 notes
·
View notes
Text
I had this very silly idea yesterday—why do shells depend on a single working directory? Why not design a shell that lets you work "from" multiple directories at once?
Then if you run "ls" it'd list all of the files in all the directories you're in, you could perform operations on all of them, or specify one directory with some shell builtin prefix.
Of course "cd -" and pushd/popd exist for switching directories but they're not the most convenient thing in the world.
#i think cd would probably fail if the operation failed for any of the directories but there are arguments to make it partially succeed#bash#terminals#shell script#linux
3 notes
·
View notes
Text
Fix Settings in Gnome Terminal (linux)
#!/bin/bash
_setProfile() { gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$1/ $2 $3; } _setTerminalProfile() { prof=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d "'"); _setProfile $prof use-theme-colors false; _setProfile $prof background-color '#000000'; _setProfile $prof foreground-color '#FFFFFF'; _setProfile $prof use-transparent-background true; _setProfile $prof background-transparency-percent 60
} _setTerminal() { yay -Runs gnome-terminal; yay -S gnome-terminal-transparency; _setTerminalProfile; yay -Runs gnome-console; }
_setTerminal
#programming#linux#ignore this i'm just moving a bash script from one computer to another#not relevant unless you also want to make your terminal transparent for some reason#only works on arch linux you have to change yay to your pkg manager#mit license
9 notes
·
View notes
Text
I made a cute little startup notification greeter for my Linux system (but it should work anywhere you have access to a POSIX-compliant shell, the date command, and the notify-send command!) I have it included in my window manager's startup script, so it will run every time I log on.
#!/bin/sh [ "$(date +%H)" -gt "11" ] && GREET="afternoon" || GREET="morning" notify-send "Welcome." "Good $GREET, $USER"
That first line is doing a few things. First, it is getting the current hour (in 24-hour time, so an integer between 0 and 23) with $(date +%H). Then the -gt checks if it is greater than 11 (NOT 12; our hour value starts at 0) . If the hour is greater than 11, it sets the variable GREET to "afternoon". If the hour is NOT greater than 11, it sets GREET to "morning".
The second line is a call to the notify-send command, a simple command-line program to send desktop notifications. We pass 2 arguments: The notification title (or "summary" as it is referred to in the documentation), and the body. Our title is simply "Welcome." In the body, we call 2 variables: the GREET variable we set in the first line, and the USER variable which stores your username.
(my setup: Dunst notification daemon, with the Catppuccin Mocha color scheme)
47 notes
·
View notes
Text
i did a little bash thing that allows you to get the Template functionality most file explorers have within your terminal.
templ(){
FILE=$1
EXTENSION=${1#${1%\.}}
TEMPLATE=$(find ~/Templates -maxdepth 1 -type f -iname "$EXTENSION")
if [ -f "$FILE" ]; then
echo "File $FILE exists."
return 1;
fi
if [ ! -f "$TEMPLATE" ]; then
echo "No Template Found; creating blank file"
touch $FILE
return 1;
fi
cp "$TEMPLATE" "$FILE"
}
it's supposted to kinda work like an extended touch where it detects the extension and if it finds a template in ~/Templates then it just copies that over.
i wanted it because i found myself googling "[language] boilerplate" a lot recently
just copy it over to your .bashrc or source it from a seperate file, populate your Templates directory with some templates and you should be good to go.
if you have any additional ideas then please tell. i'm thinking of maybe having a couple different templates for the same extension, like java interface vs class that you have to choose but idk.
also i didn't really check to see if that kind of thing already existed, so if it does please tell me
5 notes
·
View notes
Text
i find it so insanely funny when the tech guy is "hacking" something and you see his screen and it's absolutely random code they found somewhere that either makes no sense or is really really simple
#kuu.txt#like i just saw a bash file on the screen omg i'm crying#comments and all. something about downloading a python package?#did they really just print some random help file and called it a day just bc the comments get a cool colour omg#sorry i have trauma with shell scripts and anything linux#programmer yes but a loyal win user <3
7 notes
·
View notes
Video
youtube
Linux Fancy Scripts To Mount And Unmount Disk Via Dmenu 2025_05_14_03:48:50
0 notes
Text
#bash#python#bash scripting#scripting#technology#linux#linuxadministrator#linuxubuntu#linuxsystemadministration#devops#devopstools#education
0 notes
Text
How to get and extract filename extension in Bash
-> How to get and extract filename extension in Bash
5 notes
·
View notes
Text
Set up a printer Cronjob and bash script, step by step in detail
Daughter asked if there was a way to set up her new inkjet printer to print once a week to prevent the printer heads from drying out, much like her last printer had done. She really doesn’t want to buy a printer again just because she didn’t use it enough. I said “Absolutely. I can just set up a cronjob to print to it from my Linux computer and schedule that to print once a week. Problem…
0 notes
Text
DogCat - Exploiting LFI and Docker Privilege Escalation -TryHackMe Walkthrough
In this walkthrough, we’ll explore the Dogcat room on TryHackMe, a box that features a Local File Inclusion (LFI) vulnerability and Docker privilege escalation. LFI allows us to read sensitive files from the system and eventually gain access to the server.There are a total of 4 flags in this machine which we need to find. Let’s Dive in! Step 1: Scanning the Target Start by scanning the target…
#Backup Script Exploit#Bash Reverse Shell#Crontab Exploit#Cybersecurity in Docker#Docker Container Security#Docker Exploit Tutorial#docker privilege escalation#Docker Security#Docker Vulnerabilities#Linux Privilege Escalation#Netcat Listener Setup#Reverse Shell Exploit#Shell Injection Attack#Tar Archive Exploit#Volume Mount Vulnerability
1 note
·
View note
Text
so thought i might as well pin this now. for future reference, most things on this blog are made using a janky ass bash script i made while bored last semester. feel free to copy and use it if you want(needs bash and ffmpeg installed to work)
[traverse the "keep reading" for code]
! /bin/bash mkdir gifmktemp343123423 #set values starttime=0 playtime=100 if [[ -z $2 ]]; then starttime=0 else starttime=$2 fi if [[ -z $3 ]]; then playtime=100 else playtime=$3 fi #create palette ffmpeg -ss $starttime -t $playtime -i $1 -filter_complex "[0:v] palettegen" gifmktemp343123423/palette.png #make gif ffmpeg -ss $starttime -t $playtime -i $1 -i gifmktemp343123423/palette.png -filter_complex "[0:v][1:v] paletteuse" gifmktemp343123423/output.gif #find resulotion x1=$(ffmpeg -i $1 2>&1 | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | cut -d'x' -f1) y1=$(ffmpeg -i $1 2>&1 | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | cut -d'x' -f2) x2=540 y2=$((($x2*$y1)/$x1)) echo $starttime echo $playtime echo $y2 #compress gif ffmpeg -i gifmktemp343123423/output.gif -s $x2"x"$y2 yourgif.gif rm -r gifmktemp343123423
#coding#gif#programming#bash#linux#ffmpeg#will probably edit this if i change the script... probably
1 note
·
View note