#linux bash script
Explore tagged Tumblr posts
techbreeze-it-solutions · 3 months ago
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
0 notes
elementaryos-official · 28 days ago
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
janokenmun · 5 months ago
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
39 notes · View notes
nixcraft · 2 years ago
Text
still thinking about this one
Tumblr media
148 notes · View notes
x11-official · 6 days ago
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.
3 notes · View notes
sinesalvatorem · 1 year ago
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
9 notes · View notes
allylikes · 2 years ago
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.
Tumblr media
#!/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
wayfire-official · 7 months ago
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
kyaruun · 2 years ago
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
7 notes · View notes
unixbhaskar · 2 months ago
Video
youtube
Linux Fancy Scripts To Mount And Unmount Disk Via Dmenu 2025_05_14_03:48:50
0 notes
thelinuxgurus · 4 months ago
Text
0 notes
nixcraft · 2 years ago
Text
How to get and extract filename extension in Bash
Tumblr media
-> How to get and extract filename extension in Bash
5 notes · View notes
lowtechlinux · 5 months ago
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
joy-jules · 10 months ago
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…
1 note · View note
linuxtldr · 11 months ago
Text
1 note · View note
youther-gif-workshop · 1 year ago
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
1 note · View note