Answer the question
In order to leave comments, you need to log in
How to use grep to display all the ports that are used by programs running as a specific user?
How to use grep to display all the ports that are used by programs running as a specific user?
Command: netstat -natp
displays all ports in use, and how to use grep to compose a command so that only the user's ports can be displayed.
For example! The user "Vasya" launched two programs using ports 443 and 80, and the user "Petya" launched a program that uses ports 22 and 21. How to grep the terminal to see the ports used by the program running on behalf of "Petya".
Answer the question
In order to leave comments, you need to log in
int i;
int tk;
string c;
private void Button1_Click(object sender, EventArgs e)
{
i = 300;
c ="5:00";
label1.Text = c;
timer1.Interval = 1000;
timer1.Enabled = true;
timer1.Start();
}
private void Timer1_Tick(object sender, EventArgs e)
{
tk = --i;
TimeSpan span = TimeSpan.FromMinutes(tk);
string label = span.ToString(@"hh\:mm");
label1.Text = label.ToString();
if (i < 0)
timer1.Stop();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question