[linux] named pipe

I am learning new things while attempting hackthebox machines, one of the thing I learned about linux is the named pipe. To identify whether the file is a named pipe you can list like this: But if you try to read the content of the /tmp/f the screen will seem like hang... Because this file … Continue reading [linux] named pipe

Linux bash: A note about quotes

A note about quotes Single quote: ' ' supresses all special characters. Example: root@bt:/# echo '$?' $? $? is used to know the exit status, because $? is enclosed within a pair of single quotes all special meaning has been suppressed and printed out as it is. Double quote: " " supresses most of the special … Continue reading Linux bash: A note about quotes

Bash: Watching selected log file.

Reference: http://askubuntu.com/questions/1705/how-can-i-create-a-select-menu-in-a-shell-script There is an answer inside which actually works for my situation. Previous bash script which was not working #!/bin/bash LIST="syslog dmesg kern boot dpkg mintsystem Exit" PS3='Choose a log file to follow: ' select var in $LIST do if [ "$LIST" = "syslog" ] then watch tail /var/log/syslog elif [ "$LIST" = "dmesg" ] … Continue reading Bash: Watching selected log file.