Grep word after match; awk print after match (Linux)
Grep word after match, grep everything after match, grep characters after match, grep next line after match, and awk print after match on Linux (GNU grep -P with \K, -A, match/substr). Brief patterns for the word before …
Linux: find duplicate files by hash, list them and remove duplicates safely
Use find with sha256sum (or md5sum) to list identical files on Linux, group by hash, then delete duplicate copies interactively or after a dry-run—plus how “duplicate by name” differs from same content.
Bash remove from array: one element, first item, duplicates and subtract another array
Bash patterns to remove an element from an array, drop the first item, dedupe (bash array remove duplicates), and subtract all values of one array from another using loops or an associative map.
Bash progress bar: text bar, script implementation, pv and dialog
Build a bash progress bar and bash loading bar in the terminal with carriage return redraws, reusable functions, multi-step jobs, plus pv for pipe byte counts and dialog for a gauge widget.
Bash counter: loop counters, increment patterns and script counters (for, while)
Bash counter patterns: C-style for loop counter, bash while loop counter, increment with (( )) and let, bash for count over a list, and a small script counter over files—plus links to deeper increment and loop guides.
Bash / Linux: count string or word occurrences in a file (grep, wc, awk)
Count how many times a word or substring appears in a file, count lines and words with wc, whole-word matches with grep -E, and build a frequency table with awk or sort/uniq.
Linux: top memory and CPU consuming processes (ps, sar, scripts, metrics file)
Find top CPU and memory consuming processes on Linux with ps, top, sar, and pidstat; sample output after controlled stress; Bash scripts that append metrics to a file and ideas for email alerts.
Bash: check if a string contains text, digits, or a prefix ([[ ]], globs, regex)
Bash patterns to see if a string contains a substring or character, if it is only digits, if it starts with a prefix, and how [[ =~ ]] and globs differ— with quoting, empty-string gotchas, and a short locale note.
Bash trap Ctrl+C (SIGINT): catch, ignore and cleanup with trap
Bash trap Ctrl+C (SIGINT): linux ctrl c signal basics, trap INT and trap ctrl-c patterns, ignore with trap empty string, EXIT cleanup, quoting pitfalls, and subshell vs child-process behavior.
Bash until vs while loop: exit codes, same counter and when to pick each
Bash until vs while using exit status: bash until loop runs while a command fails, while loop bash runs while it succeeds. Examples for counters, wait until ready, and while read line-by-line.
Bash script multiple arguments: all args, functions, another script and typeset -f over SSH
Bash multiple arguments with positional parameters, bash pass all arguments via "$@", bash pass multiple arguments to a function, forwarding to another script, and bash pass function over SSH with typeset -f or declare …
Bash increment variable: add 1, counters, loops and (( )) vs $(( ))
Bash increment variable and bash add 1 to variable with $(( )), ((++)), bash increment variable in loop (for/while), bash increment counter patterns, let, and post vs pre-increment pitfalls.
Bash format number with commas on Linux: printf, numfmt and script examples
Bash format number with commas using printf thousands grouping, LC_NUMERIC and GNU numfmt, plus a pure Bash comma formatter for integers and decimals. Covers locale (en_US vs en_IN), C/POSIX limits, and readable output …
How to Change Username in Linux Using usermod
Learn how to change username in Linux with usermod, rename the home directory, update the primary group, verify UID/GID ownership, and fix common username rename errors safely.
JavaScript await: async functions, try/catch, Promise.all, top-level await
How await works in JavaScript: javascript await, js await, async await javascript, await promise inside async functions, sequential vs Promise.all concurrency, try/catch on rejections, await on non-promises, top level …
JavaScript factory pattern (functions, classes, and async factories)
JavaScript factory pattern and factory functions: return plain objects, pick implementations by input, constructor-based factories, ES6 class factories, closure privacy, and async factories—with Node-tested output.
Nested loops in Java (for, while, do-while, and examples)
Nested loops in Java: nested for, while, and do-while (including mixed loops), Scanner menu example, labeled break, and complexity. Runnable examples with OpenJDK 17-tested output.
How to Reset Index in pandas (DataFrame, groupby, drop=True) [Examples]
Learn how to reset index in pandas on a DataFrame or Series. Covers pandas groupby reset_index, reset index to start at 0 with drop=True, dataframe reset_index after sort or filter, df reset_index, and resetting column …
How to Check Sudo Access for a User in Linux
Learn how to check sudo access in Linux. Check if you or another user has sudo privileges with sudo -l, test sudo access non-interactively in a bash script with sudo -n, and list all sudo users, with real tested output.
How to Check Disk Space in Linux: df, du, lsblk & What They Actually Show
Learn how to check disk space in Linux from the command line. Use df to check free space, du to check disk usage by folder, and find what is eating your storage, with real tested output and fixes for "No space left on …
Git Remote Set-URL: Change Remote Repository URL [Examples]
Learn how to use git remote set-url to change a remote repository URL. Change origin from HTTPS to SSH, add or delete push URLs, rename remotes, and fix the "this repository moved" error, with real tested examples and …
Git Remove Remote: Remove Origin, Upstream or Any Remote
Learn how to remove a Git remote, remove origin, remove upstream, verify remote removal, fix no such remote errors, and understand when to use remote remove, set-url, rename, or prune.
Git Remove File from Tracking Without Deleting It
Learn how to remove a file or folder from Git tracking without deleting it locally. Includes example git rm --cached output, .gitignore behavior, commit cleanup, directory removal, and skip-worktree patterns.
Git Push Force Explained: --force vs --force-with-lease [Examples]
Learn how to use git push force safely. Understand git push --force vs --force-with-lease, force push to a remote branch, origin master, and after rebase or amend with real examples.
CPU, Processors, Cores, Threads, Hyper-Threading and Cache Explained
Understand CPU, processor, socket, core, thread, hyper-threading, CPU cache, frequency scaling and Linux commands like lscpu, nproc, mpstat and cpupower with validated output.
How to Check Filesystem Type in Linux
Learn how to check filesystem type in Linux for mounted paths, disks, partitions, LVM volumes, USB drives, ISO media, and unmounted filesystem images with tested findmnt, lsblk, blkid, df, file, stat, udevadm, fstab, …
How to Refresh Network Settings in Ubuntu
Learn how to refresh network settings in Ubuntu after IP address, route, DNS, DHCP, Netplan, NetworkManager, or systemd-networkd changes. Includes safe remote-server workflow, tested verification commands, and practical …
How to Backup Brave Browser Profile, Settings, Bookmarks, and Session on Linux
Learn how to backup and restore Brave Browser profile data on Linux, including settings, bookmarks, session files, cache, profile paths, tar archives, checksums, and safe restore steps.
How to Install a Specific Version with APT
Learn how to install a specific package version with apt or apt-get on Ubuntu and Debian, list available versions, simulate installs safely, handle dependency conflicts, and hold or unhold package versions.
How to Add User to Sudo Group in Linux
Learn how to add a Linux user to the sudo group on Ubuntu and Debian, use the wheel group on RHEL-based systems, verify sudo access, and avoid confusing group-based sudo with custom sudoers file rules.

