What commands would you use to extract all of the usernames


You need some help with this linux Operation systems.

Display the complete command that will accomplish the following actions. (ie. If you were asked which command would allow you to navigate to the /var directory you would display the following: cd /var (NOT just the command cd))

1. What command(s) would you use to extract all of the usernames from a database called /etc/passwd and then sort this output alphabetically in reverse order?

How would you run this same command and have the output saved in a file called System_Users?

2. Which command would you use to extract the first 15 characters in each line of the /etc/passwd file?

3. What command would you use to find all empty (0 byte) files in the /etc directory? How could you run the same command and not have any error messages show up on the console?

4. What command would you use to find all files in your home directory that are owned by the sysadmin user?

5. What command would you use to find all the instances in which the word "host" is used in the /etc directory and show this information one screen at a time?

6. What command would you use to determine the number of lines and words in the /etc/mailcap file?

7. What command would you use to view only the first seven (7) lines of the /etc/mailcap file?

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: What commands would you use to extract all of the usernames
Reference No:- TGS02871212

Expected delivery within 24 Hours