Linux commands a) Run a command to listen to your computer\'s ports, such as: tc
ID: 3700264 • Letter: L
Question
Linux commands a) Run a command to listen to your computer's ports, such as: tcp 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN 1315/mongod tcp6 0 0 :::139 :::* LISTEN 1079/smbd udp 0 0 0.0.0.0:5353 0.0.0.0:* 714/avahi-daemon: r udp6 0 0 :::48054 :::* 714/avahi-daemon: r b) Write the commands that will display lines with anything not a letter or number in a text file 6 - a) Write the commands that will display lines containing letters a thru z and A thru Z in a text file b) Write the commands that will display lines with numbers only using the following format xxx-xxx-xxxx found in a text file
Explanation / Answer
Let me know if you have any doubt.
#5)
a) netstat -an
b) grep [^a-zA-Z0-9] file
#6)
a) grep [a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|LM|N|O|P|Q|R|S|T|U|V|W|X|Y|Z] file
b) grep 'd{3}-d{3}-d{4}' file
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.