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 the command ps –ef | less to view the first few...
Open a terminal: a) type the command ps –ef | less to view the first few processes running on the system. Which process has the ID of 1? b) What character do most processes have in the terminal column? What does this indicate? c) What user started the most of these processes? d) Which parent process started the most processes? e) Type ps –el | less. What character is in the state column for most processes? What does this indicate?...
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?
I need to combine two programs that can do the following (a) what ls command does...
I need to combine two programs that can do the following (a) what ls command does and (b) to check each file name to print its content if its name has ".lst" extension. These are the two programs Program - 1 /* * simple-ls.c * Extremely low-power ls clone. * ./simple-ls . */ #include <sys/types.h> #include <dirent.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { DIR *dp; struct dirent *dirp; if (argc != 2) { fprintf(stderr, "usage: %s...
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?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT