# Unix / Linux

{% embed url="<https://twitter.com/x0rz/status/1037626490790326273>" %}

You can use $timeout command in linux to exit the bash command if it doesn't finishes in time X \
\
Example: \
\
$timeout 2 cat \*.txt \
\
If [$cat](https://twitter.com/search?q=%24cat\&src=ctag) commane doesn't finishes in 2 seconds it will kill the command. Usefull while automation.

* <https://madaidans-insecurities.github.io/guides/linux-hardening.html>

{% embed url="<https://twitter.com/DissectMalware/status/1073785021029343232?ref_src=twsrc%5Etfw%7Ctwcamp%5Eembeddedtimeline%7Ctwterm%5Ecollection%3A1073939531731210240%7Ctwcon%5Etimelinechrome&ref_url=https%3A%2F%2Ftwitter.com%2Fpentesterland%2Ftimelines%2F1073939531731210240>" %}

port forwarding - <https://unix.stackexchange.com/questions/115897/whats-ssh-port-forwarding-and-whats-the-difference-between-ssh-local-and-remot>

**$** alias s="du -hs \* | sort -rh | head -5"

* [What are some good resource/projects to learn Linux basics?](https://twitter.com/cyberashx/status/1272593657670008832?s=20)
