Question

In: Computer Science

please explain the following command sequences a) who | grep "Seneca" | sort | uniq >>who<<...

please explain the following command sequences

a) who | grep "Seneca" | sort | uniq >>who<<

b)sort <names > names

c)sort ~/files/phone 1> /dev/null2>phone2

d)ls/root/&> files.log

e)ls/etc/>files.log2>&1

Solutions

Expert Solution

a) who | grep "Seneca" | sort | uniq >>who<<

who command is used to find out the following information :
1. Time of last system boot
2. Current run level of the system
3. List of logged in users and more.

now grep command will find the user Seneca sort the output in ascending order and unique command will remove duplicate entries and output will be stored in the who file in the current directory

b)sort <names > names

this sort command will give content of the names to sort command and create the output in existing names file old content will be removed.

c)sort ~/files/phone 1> /dev/null2>phone2

sort output of phone file in the home directory's files folder output will be written

> is for redirect
1 is the file descriptor for Standard Out
& is the symbol for file descriptor (without it, the following 1 would be considered a filename)

d)ls /root/ &> files.log

& is the symbol for file descriptor and it will run in background and output will be store in files.log

e)ls /etc/ > files.log2 > &1

output of ls command that is used for file listing of current working directory of etc and store the output list in the files.log2 and this command will run in background and output will not show on terminal

if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and i can edit and change the answers if you argue, thanks :)


Related Solutions

this is bash scripting. a. Explain the difference between grep and egrep? b. Write a command...
this is bash scripting. a. Explain the difference between grep and egrep? b. Write a command to list files where third letter is x or y? c. Write command to remove array element with id 5
can you please do the following? (8) Step 8: type the following command: sort /etc/passwd |...
can you please do the following? (8) Step 8: type the following command: sort /etc/passwd | head -5 What is the output? Notice that this pipe can be simplified cat /etc/passwd | head -5 What is the output for this? You could accomplish the same thing more efficiently with either of the two commands: head -5 /etc/passwd head -5 < /etc/passwd (9) Step 9: The command displays all the files in the current directory sorted by file size ls -al...
Please explain how to do following in Linux How to list process How to grep process...
Please explain how to do following in Linux How to list process How to grep process how to kill a process how to know pid suppose proccess is down how to check it up and bring it up ?? please write the commands and execute and explain the process
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 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.
Use Quicksort algorithm to sort the following sequences: a.10, 80, 3, 19, 14, 7, 5, 12...
Use Quicksort algorithm to sort the following sequences: a.10, 80, 3, 19, 14, 7, 5, 12 b.Choose your sequence with 100different(random)integer numbers c.Choose your sequence with 1000different(random)integer numbers Please include your pseudocode, input sequence, and output in the report. Also, you need to analyze the computational time for different partition methods(e.g., best/worst/average cases)for sequences b and c. Will rate! design analysis and algorithms
Please explain the advantages and disadvantages of command-line operating systems in a paragraph or two.
Please explain the advantages and disadvantages of command-line operating systems in a paragraph or two.
At the command prompt, enter the following command and press enter. tasklist This command displays the...
At the command prompt, enter the following command and press enter. tasklist This command displays the currently running tasks (programs). You will see one specific program that appears over and over again in the list of running programs. This program is actually a wrapper program that runs computer instructions found in .DLL files. Based on the output of the command, which of the following programs is the wrapper program? A. lsass.exe B. winlogon.exe C. svchost.exe D. cmd.exe
Q1. PLEASE EXPLAIN THE ANSWER Near to lacO are other DNA sequences similar to lacO. A....
Q1. PLEASE EXPLAIN THE ANSWER Near to lacO are other DNA sequences similar to lacO. A. What prevents LacI from occupying these instead of the lacO in the promoter region? B. What role is proposed for those other lacO-like elements? Q2. PLEASE EXPLAIN THE ANSWER You are given an E. coli merodiploid with an F plasmid with this genotype: lacP- lacO+ lacZ+ lacY+ and a chromosome with a second copy of the lac operon with this genotype: lacP+ lacO+ lacZ-...
Sort the following set of numbers using bubble sort, insertion sort, and selection sort. Show the...
Sort the following set of numbers using bubble sort, insertion sort, and selection sort. Show the process step-by-step, and find the time complexity in Big-O notation for each method. For sorting, use ascending order. 49, 7, 60, 44, 18, 105
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT