here is the command that will display the bottom 7 lines of the /etc/passwd file.
==================================================================
cat < /etc/passwd | tail -7
screenshot of the output.
Please note output may differ in your case but the above command will work fine.

==================================================================
Kindly Check and Verify Thanks..!!!
Using the tail command, display the bottom 7 lines of the /etc/passwd file to the screen....
Exercise 1: Write a shell script that loops through the /etc/passwd file one line at a time. Prepend each line with a line number followed by a colon and then a space. Example output: 1: root:x:0:0:root:/root:/bin/bash 2: daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin 3: bin:x:2:2:bin:/bin:/usr/sbin/nologin 4: sys:x:3:3:sys:/dev:/usr/sbin/nologin Exercise 2: Write a shell script that asks the user for the number of lines they would like to display from the /etc/passwd file and display those lines. Example output: How many lines of /etc/passwd would you like...
Print all lines with user id of 1000 or higher in /etc/passwd. Post process the output of ls -al so that only those “files” that have rwx permission for the owner are shown. Post process the output of ls -al so that only those “files” that have rwx permission for others are shown (owner and group may have any permission). List all file names in the current directory, as well as in any subdirectories, that contain the word "foo" anywhere...
Linux systems keep user account information in the passwd file and the encrypted password in the shadow file. The passwd file containing account information might look like this: smithj:x:1001:1001:John Smith:/home/smithj:/bin/bash The shadow file containing password and account expiration information for users might look like this: smithj:KJDKKkkLLjjwlnttqoiybnm.:10063:0:99999:7::: The fields in the shadow file are separated by a colon, with the first field being the username and the second the password. Under normal circumstances, the password is encrypted but for the purpose...
Login to Suse Linux as root. Complete the task working as the root user. 1. What is your current directory. What did you enter at the command prompt to determine your current working directory? 2. Change directories if needed to find your foods (or food) file. Use vi to make the file contain 10 food items. Save your file and quit. Use the cat command, and option, and the argument food to display the food file with numbered lines. Use...
Completion is a screenshot of the batch file showing all
of the steps to create the file system shown below.
Instructions Create a batch file clifilesystem.cmd using Notepad which performs the following steps to create the file system shown below. Also use a proper comment for each step before the command. Proof your work. Finally submit the clifilesystem.cmd file in Blackboard Figure 1. The clijfilesystem.cmd file system Work from Desktop unless using an absolute path Desktop NOS110 OS Labs Homework...
Ensure that the Choose an option screen is displayed. If it is not and you have to go back into the repair mode Click Troubleshoot in the Choose an option screen Click Command Prompt in the Advanced options screen. You’ll see a command prompt window Type dir \Windows and press Enter to view the files and subdirectories in the \Windows directory (containing system files). Type copy /? and press Enter to view the documentation for the copy command. Press the...
PART 1: Explore commands that compare file contents: mkdir ~/mod7 cd mod7 cp /etc/passwd passwd.bak pr passwd.bak pr -n -d passwd.bak cp passwd.bak passwd.bak2 Add a new entry towards the top of the passwd.bak2 file for Albert Morris using vi : amorris:x:29000:0:Albert Morris: /home/amorris: /bin/bash) cmp passwd.bak2 passwd.bak sort passwd.bak more passwd.bak sort passwd.bak > passwd.bak3 sort passwd.bak2 > passwd.bak4 comm passwd.bak3 passwd.bak4 diff passwd.bak passwd.bak2 TO HAND IN: Take a screen shot of these commands plus their execution for PART 1....
1. Run script to create a file named Ch7/hands-on7 2. Run the find command searching all directories beginning with root and search for a file named whereis. Send standard error to /dev/null and the standard output to Ch7/where. As soon as you submit the command, press Ctrl-z. 3. Note the number that appears on the screen [job id] that appears on the screen. 4. Type: jobs 5. Run the command: ls –lR / >system_list 2> /dev/null & 6. Type: jobs...
1) Write a Unix command that will display the message below using echo and the value of your environment variable instead of the sample student login /students/astud01 My home directory is /students/astude01 2) Write a Unix command to display your login and the system date with both commands on one line (the output may be on separate lines) SAMPLE OUTPUT (details will differ): cconner Tue Jul 7 15:38:44 PDT 2015 3) 1.Write a Unix command that will redirect (>) the...
Using a Linux command-line interpreter, show the screenshots for executing the following commands: (1) display the current working directory, (2) list the contents of a directory, (3) change directory, (4) create a directory, (5) clear the screen, (6) copy a file from a directory into another directory, (7) delete a directory, (8) delete a file, (9) report information for a single process or set of processes, and (10) report a real-time statistics for current processes.