Friday, August 19, 2016

Sharing a command output with others

wanna share a command output to others?

Answer: use netcat

First install netcat. package name is

Then, you can get the output of a command to a browser liike below:

$ service smb status | nc 9999
Redirecting to /bin/systemctl status  smb.service

So, open the link in browser:

Its contents are as below:
● smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2016-08-17 21:04:42 IST; 1 day 17h ago
 Main PID: 2055 (smbd)
   Status: "smbd: ready to serve connections..."
   CGroup: /system.slice/smb.service
           ├─2055 /usr/sbin/smbd
           └─2057 /usr/sbin/smbd
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

You can share this link with others.

No comments:

Post a Comment