Recipes
Short, task-oriented how-tos: problem, solution, explanation.
-
Add a directory to your PATH permanently
How to put a directory on PATH for good on Debian, why ~/.local/bin needs no configuration at all, and what to do for any other directory.
-
Bulk rename a batch of files
Rename many files at once with a plain bash loop, safely handling spaces and previewing changes before committing.
-
Copy files between two machines over SSH
Transfer a file or directory tree between two machines with scp or rsync, and resume an interrupted transfer without starting over.
-
Find and replace across many files
Replace a string across a directory tree with grep -rl and sed -i, safely for filenames containing spaces, with a dry run and a backup first.
-
Find files without the permission denied noise
Why 2>/dev/null is the wrong fix for find's permission denied errors, and what -readable -prune does instead, including what happens to the exit status.
-
Find the largest files on disk
Locate what is eating your disk space, from a whole filesystem down to one directory.
-
Keep a program running after you log out
How to stop a long job dying when an ssh session ends, what each approach really does about SIGHUP, and an honest recommendation between them.
-
Find and kill whatever is using a port
Identify the process bound to a TCP port that's refusing to let a service start, then stop it.
-
Monitor a log file in real time
Watch a log file as new lines are written, filter it live, and keep watching across log rotation.
Nothing on this page matches that. Try the site search for everything else.