Stream a directory over SSH with tar
Copy a directory to another server with tar and SSH: why -f - is needed, where -C goes, who owns the extracted files, and compression in the pipe.
Filtering by topic #shell · clear
Copy a directory to another server with tar and SSH: why -f - is needed, where -C goes, who owns the extracted files, and compression in the pipe.
Argument list too long is the kernel refusing an oversized exec, and the glob you typed is usually why. Reproduce it, then fix it with xargs or find.
Sourcing a bash script runs it in your current shell. Executing forks a child. Why cd and export do not stick, and why source can close your session.
Open a shell in a running Compose service with docker compose exec, and use run --rm for a service that is stopped or must not be disturbed.
Bash globbing explained: how the shell expands wildcards into filenames before a command runs, plus nullglob, dotglob, globstar and extglob negation.
!! repeats the last command and !$ gives you its last argument. Learn the six bash history expansions worth knowing, plus :p to print one before it runs.