Question

In: Computer Science

What does this command do & ps -ef | grep tty | less Searches the output...

What does this command do & ps -ef | grep tty | less

Searches the output from the ps command for tty and displays it one screen at a time

Displays all of the interactive running processes

Searches the output from the ps command for the word more

Displays output from the ps command one screen at a time

Solutions

Expert Solution

ps -ef command is used to lists all the process in the full format that are currently running in your machine, it includes UID(who have started the process), PID(ID of each process, its unique), PPID(It represents the ID of the parent process, it's not unique) and CMD(to run that process)

These all information helps us to identify who have started which process and we can easily kill those processes if we want.

Output:

If you're using grep tty | less, then it will simply open up the result of ps -ef in a command line in an interactive shell while less command is used to print information page wise.

ps -A: to list down active processes
ps -ef: to list down processes in full format

I hope it helps.


Related Solutions

Open a terminal a) Type ps –ef | grep bash. Record the PID. b) Open a...
Open a terminal a) Type ps –ef | grep bash. Record the PID. b) Open a second terminal (leaving the first active) and type kill –l to see the available kill signals c) Type kill -2 (# of the recorded PID). Did the first terminal session close? d) Type kill -3 (# of the recorded PID). Did the first terminal session close? e) Type kill -15 (# of the recorded PID). Did the first terminal session close? f) Type kill...
Give a bash command that runs "ps -ef" , but only displays items whose UID is...
Give a bash command that runs "ps -ef" , but only displays items whose UID is not equal to root
Linux operation 1. Explain what this command does: rpm –qai | more ..... ? 2. Ps...
Linux operation 1. Explain what this command does: rpm –qai | more ..... ? 2. Ps – Af |grep -v ^root, Explain how this command to find application processes could helpful in the real world to the system administrator?? 3. Clearly describe 3 valid command options, and their meaning, of this command used to add users? 4. List 2 different variants of the Unix (not Linux) operating system, as well as their corresponding vendor (the company that developed them) ?...
$ grep/ sbin/nologin$/etc/passwd| cut -d “:”-f1| short| less explan the output
$ grep/ sbin/nologin$/etc/passwd| cut -d “:”-f1| short| less explan the output
linux Using the grep or egrep commands, what would be the full command (including regular expression)...
linux Using the grep or egrep commands, what would be the full command (including regular expression) to view only the lines in the file /boot/grub/grub.cfg that DO NOT begin with a hashtag (the # sign). In other words, what would be the command to print all the lines in this file that do not begin with this character.
Under what circumstances are suspicion-less searches of government employees’ offices constitutional?
Under what circumstances are suspicion-less searches of government employees’ offices constitutional?
1. What does vasoconstriction or vasodilation do to venous return and cardiac output? How does this...
1. What does vasoconstriction or vasodilation do to venous return and cardiac output? How does this occur? 2. How would viscosity change as the number of red blood cells increase or decrease? 3. Give an example of when the size of a blood vessel's lumen would change. 4. Would vasoconstriction or vasodilation make the lumen smaller? What happens to the resistance when the lumen gets smaller? What happens to blood pressure?
Does a monopolistic competitor produce more or less output as compared to an efficient level of...
Does a monopolistic competitor produce more or less output as compared to an efficient level of production? Explain. What are the benefits and drawbacks of this? Should the government intervene to alter this?
What is the function of this program (what does it do)? What is the output if the input is 12d (12 decimal)?
What is the function of this program (what does it do)? What is the output if the input is 12d (12 decimal)? What would be the output if the input is 47d? Sub bx, bx Mov ecx, 16 GetInt ax Nxt: shl ax,1 jc Addone jnc LB1 Addone: inc bx LB: loop Nxt PutInt bx
What is the function of this program (what does it do)? What is the output iſ the input is 120 (12 decimal)?
What is the function of this program (what does it do)? What is the output iſ the input is 120 (12 decimal)? What would be the output if the input is 47d? 
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT