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...
What is the result of the command ? $ who | grep $USER $ grep \$HOME...
What is the result of the command ? $ who | grep $USER $ grep \$HOME economics1 $ echo u*>> economics1 $ echo ‘u*’ >> economics1 $ . economicsA $ set noclobber $ set -o $ chmod +x economics2 $ spell < economics1 economic is file name linux command
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.
What does the ​ netstat command do? The netstat command has many options. Please explain the...
What does the ​ netstat command do? The netstat command has many options. Please explain the following commonly used options and briefly explain the meaning of the output. How can you know which program (i.e., process) is using a specific port? ~$​ netstat -a ~$ ​ netstat -l ~$ ​ netstat -s ~$ ​ netstat -p ~$ ​ netstat -r ~$ ​ netstat -ie You can ignore those lines related to UNIX domain sockets.
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT