Question

In: Computer Science

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) ?

Determine if the UP ARROW for the recalling of commands in the BASH shell is persistent across logins. In other words, are previous commands preserved and able to be recalled by UP ARROW from one login to the next, using the same login account? (yes or no) 27.)      .

If yes, clearly explain in detail why/how the BASH shell recalls these commands. Provide the technical answer as to what the shell uses to perform this action. Do not provide an answer which details how the user recalls the commands by just hitting the up arrow for example, but rather again, how the shell does this from a technical perspective, what it uses, etc. (Research if necessary):

28.)      .

(If you have problems recalling previous commands with UP ARROW, ensure you are in the BASH shell when using UP ARROW, by running echo $SHELL, and it should display /bin/bash). We will see more about “variables”, like SHELL later in the course.

Solutions

Expert Solution

1.RPM is a Red Hat Package manager.
   Command : rpm –qai | more

   Here "q" is Query, means you want to fetch something

   'a' means all

   'i' means Installed packages

   'more' is used for showing all the content even if it is more ...!

Finally the "command queries to display all the installed packages...!!"

2. Command : Ps – Af |grep -v ^root

In this command "Ps – Af" gives all running processes with full format listing (i.e Gives extra information about the process).

'grep -v ^root' grep is used to search something 'v' is used as invert (mean that it will select non-matching line).

Finally command is used to show all the processes that root is not involved ( Simply non-root processes).

3.There are two similar commands for adding user

    1.adduser -> Mostly used by administrator for creating user

    2. useradd -> It is a low level utility for adding users mostly used by non-root users

   Both have option

      "-d " => This will create new user in HOME_DIR as the value for the user's login directory. The default is to     append the LOGIN name to BASE_DIR and use that as the login directory name.

     "-e" => Means expire date.The date on which the user account will be disabled(format YYYY-MM-DD).

    "-p" => It is used to set password for the new user.By default there will be no password.

4.Solaris - Oracle Corporation

   Darwin - Apple Inc & Open source community

5.The UNIX operating systems can remember all the commands you have ever typed during all your log-in sessions. Each command that you have typed, correctly or not, is stored in a file, in your default home directory, called: .bash_history

It fetches the previous commands from that file.There are many ways that you can call the previous commands.


1. "History" -> This command lists all the commands that you have used.(It fetches from .bash_history)

2."up arrow" -> Used to show previously used commands

3."!!" -> This command executes the previous command

4."!<search_word>" -> Executes the most recent command that matches with search_word.

Thankyou : )

  


Related Solutions

a) Observe the following Linux commands and work out what each command does: 1) $ ls...
a) Observe the following Linux commands and work out what each command does: 1) $ ls –al 2) $ /etc/profile 3) $ chmod 200 final_assignment.txt b) Consider a scenario where Bob has downloaded his messages to the local machine with an access of POP3, he can create mail folders and move the downloaded messages into the folders. Bob can then delete messages, move messages across folders, and search for messages (by sender name or subject). But this paradigm—namely, folders and...
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
Linux question: Take the command 'vmstat' in linux for a program, explain why the number of...
Linux question: Take the command 'vmstat' in linux for a program, explain why the number of context switches is more than the number of interrupts?
Ubuntu Linux HW5: text processing; scripting 1. Write a Linux command to rewrite the /var/passwd file...
Ubuntu Linux HW5: text processing; scripting 1. Write a Linux command to rewrite the /var/passwd file to have a tab for each delimiter ':'. Hint: use tr 2. Write a Linux command to extract the user names and sort them. Hint: use cut 3. Write a for loop to to display a time table, e.g., 17 x 1 = 17; 17 x 2 = 34; etc., as follows: 17 x 1 = 17 17 x 2 = 34 17 x...
2. Does the market solution need either tradition and/or command? And does tradition and command solutions...
2. Does the market solution need either tradition and/or command? And does tradition and command solutions need markets?
Questions: Explain the following Linux commands Show your work examples/outcome. 1. command used to locate /Home/...
Questions: Explain the following Linux commands Show your work examples/outcome. 1. command used to locate /Home/ Directory…show the outcome 2. command used for October 2020 3. mv command and cat command 4. commands used- move to parent directory? 5. Explain why command is used ls -R?   What is the meaning of -R ? 6. Explain and describe two examples of how the touch command. 7. Explain what is the outcome of the commands ls -C ? 8. Explain command echo....
linux: Become the root user for this exercise. What command did you use to do this...
linux: Become the root user for this exercise. What command did you use to do this again? $ Now that you are root, create a new user on your system called labsevenuser. What is the command you used to create this user? # Set a new password for the new user you just created in step 2 above. What is the command you used to do this? # Create a new group called awesomepeople. Add the user you created in...
linux: Become the root user for this exercise. What command did you use to do this...
linux: Become the root user for this exercise. What command did you use to do this again? $ Now that you are root, create a new user on your system called labsevenuser. What is the command you used to create this user? # Set a new password for the new user you just created in step 2 above. What is the command you used to do this? # Create a new group called awesomepeople. Add the user you created in...
What does sda17 mean on Linux?
What does sda17 mean on Linux?
Unix / Linux 6. vi editor: In vi command mode, what are the keystrokes you would...
Unix / Linux 6. vi editor: In vi command mode, what are the keystrokes you would type to... Quit the vi editor and save any changes? 7. C language source files, by convention, have the suffix ".c". The associated "header" files have the suffix ".h". What is the command to perform the following task: List all the C source and C header files in the current directory. [Hidden files may remain hidden.] 8. C language source files, by convention, have...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT