bashoneliners.com

Welcome to bashoneliners.com, a curated collection of practical and well-explained Bash one-liners, snippets, tips and tricks. We aim to make each published one-liner to be of high quality: useful, easy to read, follows best practices, with clear, detailed, accurate explanation. These one-liners should help you automate tasks, troubleshoot problems, whether it be in system administration, file management, networking or programming.

Scan all open local ports without any external programs

for i in {1..65535}; do (< "/dev/tcp/127.0.0.1/$i") &>/dev/null && { echo; echo "[+] Open Port at: $i"; }  || printf "."; done; echo

May 8, 2019Goeks1

Uses 'at' to run an arbitrary command at a specified time.

echo 'play alarmclock.wav 2>/dev/null' | at 07:30 tomorrow

February 4, 2012Anon5MAQumYj