Linux Lab 10.doc - NHTI Concord’s Community College IST170C Introduction to Linux I Fall 2017 Lab 10 1 What command would you enter to write the

Linux Lab 10.doc - NHTI Concord’s Community College...

This preview shows page 1 - 2 out of 2 pages.

NHTI, Concord’s Community College IST170C: Introduction to Linux I Fall 2017 Lab 10 1. What command would you enter to write the output of the date command to the date.txt file in the current directory without overwriting it? date | tee text.txt 2. What command would you enter to write the output of the find /var/spool command to the spool.txt file in the current directory while discarding any error statements? find /var/spool >> spool.txt 3. What command would you enter to write both the standard output and error from the find /var/spool command to the spool.txt file in the current directory? find /var/spool > spool.txt 4. What single command would you enter to display the output of the cat /etc/hosts command to the screen and write it to the hosts.txt file in the current directory? cat /etc/hosts/hosts.txt 5. What command would you enter to pass the output from the find /var/spool command, discarding any error statements, to the
Image of page 1

Subscribe to view the full document.

Image of page 2

Unformatted text preview: grep command searching for the term cron ? ls /spool > output ‘cron’ 6. Enter the command (preferably just one) in the Lab 10 Linux virtual machine that will replace the colons (:) in the /etc/passwd file with semi-colons and then write the first 10 lines of the output to a file named weird.txt in the /home/sysadmin/test/ directory. Insert a screenshot showing the command and the contents of the weird.txt file. 1 7. Enter the command(s) in the Lab 10 Linux virtual machine needed to list the different words that are in the test/longfile.txt file, the number of times each word in the file is repeated (e.g. the word apple is repeated 1020 times so the output should show this) and write this to a file named words.txt in the same directory. Insert a screenshot showing this and a listing of the contents of the words.txt file. 3 2...
View Full Document

  • Fall '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes