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?
Linux 1. Give a command line (one command) for displaying the files lab1, lab2, lab3, and...
Linux 1. Give a command line (one command) for displaying the files lab1, lab2, lab3, and lab4. Can you give another command lines that do the same thing by making use of the file name similarities? What is the command line for displaying the files lab1.c, lab2.c, lab3.c, and lab4.c? (Hint: use shell metacharacters.) 2. How to determine the number of users who are logged on to Linux server system at this time? What command did you use to discover...
Ubuntu Linux HW2: 1. Give one line of the Linux command to see your (your login...
Ubuntu Linux HW2: 1. Give one line of the Linux command to see your (your login ID) credential data from the passwd file. Use a pipe and grep command. 2. Give one line of the Linux command to calculate the following and save it in the hex to a file calcOut. Use bc and <<<. 3+2*4 Submit Screenshots HW3: Permission Show the result clearly after each of the following commands are executed. 1. Create a subdirectory, “HW3”. Write the Linux...
Linux What is the tar command? a. Can you compress files using tar? Please explain how...
Linux What is the tar command? a. Can you compress files using tar? Please explain how and provide a brief example. b. How do you create a tar file? Please provide an example. c. How do you extract files in a tar format? Please provide an example.
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...
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.
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....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT