Question

In: Computer Science

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

Solutions

Expert Solution

Command:

ps -ef | grep -v root

This will excluide all the UIDs with root.

ps -ef is the default one which will include root

The above answers is 100% correct.

If you have any doubts, leave a comment below and I'll help you out

Can you PLEASE UPVOTE. Thank you so much


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...
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
Use the find command to find all directories under /pub/cs/ whose name is cs160a. Be sure to only display the results that match, do not display any error output.
Unix/Linux1)Use the find command to find all directories under /pub/cs/ whose name is cs160a. Be sure to only display the results that match, do not display any error output.Hint: use: 2>/dev/null.2)Create a one-line command, using he famous.dat file, to add the word " STREET" to the address, for all who live on 2nd or 3rd.For example: '2nd' becomes "2nd STREET" and '3rd' becomes "3rd STREET".Display only the first 9 lines.Hint: use 2 sed statements with pipes.3)Display all lines in famous.dat...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT