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...
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?...
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
UNIX ONLY Write a bash script that will accept a filename as a command line argument....
UNIX ONLY Write a bash script that will accept a filename as a command line argument. Your script should first check whether the filename has been passed as argument or not (hint: at least one argument has to be provided). If no argument has been provided your script should display appropriate message and exit. If a file name has been provided, your script should check if the file exists in the current directory and display the contents of the file....
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