Preview

Uli101 quiz 4b Q A

Good Essays
Open Document
Open Document
341 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Uli101 quiz 4b Q A
Uli101 quiz 4b – redirecting and piping

Your present working directory is /var/www
Your home directory is /home/brian

1. sort the last five lines of file 8 and display it to the screen. Redirect all errors to /dev/null (use paths that are relative-to-home)

2. using the shortest paths possible display all lines that contain the text “username” of file10 and append them to file7

3. using relative paths only, count the lines of file14 that contain the text “trumpet”. Append the output to file6

4. using relative to home paths output the contents of file8 appended to a new file called file21 in your home directory

5. using the shortest path possible count the number of lines of text in file6 that contain the text “Subnet”. Redirect the output to file8

6. using the shortest paths possible create a file18 in Brian’s home directory that contains a directory listing of the docs2012 directory

7. find all of the files under /tmp that have names starting with “f”. append the output and all error messages to file4 (absolute paths)

8. send an email to steve@gmail.com Subject is “Quiz 4b” use the contents of file10 as the body message

9. what command would search the first 10 lines of all files in upload for the word “Author” (relative paths only)

10. copy file 6 to your home directory on the remote host zenith.senecac.on.ca Connect as the user brian

ANSWERS
1. tail –s ~/docs/file8 | sort 2> /dev/null
2. grep username ~lisa/documents/file10 | tee –a ./cgi_bin/file7
3. grep trumpet ../../shared/mkt/docs/file14 | wc –l >> ./cgi_bin/file6
OR
grep –c trumpet ../../shared/mkt/docs/file14 >> ./cgi_bin/file6
4. cat ~/docs/file8 >> ~/file21
5. grep “Subnet” cgi_bin/file6 | wc –l > ~/docs/file8
Don’t necessarily need the quotation marks
6. ls /shared/mkt/docs2012 > ~/file18
7. find /tmp –name f* >> /var/www/html/file4 2>&1
8. mail steve@gmail.com -s “Quiz 4b” < ~lisa/documents/file10
9. head ../ftp/upload/* | grep Author head -10 works as well
10. scp

You May Also Find These Documents Helpful

  • Satisfactory Essays

    How can you find out which utilities are available on your system for editing files? Which utilities are available for editing on your system?…

    • 344 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Unit 2 NT1430

    • 377 Words
    • 2 Pages

    10. Experiment by calling the file utility with the names of files in /usr/bin. How many different…

    • 377 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    1) After the external file is loaded the user must develop the section of the program that displays the ten five- letter words.…

    • 553 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    NT2670 Midtern Questions

    • 842 Words
    • 3 Pages

    What directory enables you to use a web site to publish files located anywhere on the network?…

    • 842 Words
    • 3 Pages
    Powerful Essays
  • Satisfactory Essays

    POS 420 Week 5 UNIX Paper

    • 541 Words
    • 4 Pages

    Complete the University of Phoenix Material: File Processing Commands Worksheet located on your student website.…

    • 541 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Intro to Unix Project 2

    • 636 Words
    • 3 Pages

    2- Description of pipes: The symbol | is the Unix pipe symbol that is used on the command line. What it means is that the standard output of the command to the left of the pipe gets sent as standard input of the command to the right of the pipe. Note that this functions a lot like the > symbol used to redirect the standard output of a command to a file. However, the pipe is different because it is used to pass the output of a command to another command, not a file.…

    • 636 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    5. You have forgotten the purpose of the -n option in the cat command. Which of the following can you enter at the Linux command line to find out what the -n option does when used with cat?…

    • 2601 Words
    • 11 Pages
    Good Essays
  • Powerful Essays

    Case Study for Fraud

    • 996 Words
    • 4 Pages

    1. Based on the information you have gathered during your first task, what discrepancies/irregularities exist in Shawn Davidson’s file?…

    • 996 Words
    • 4 Pages
    Powerful Essays
  • Good Essays

    Minimum of TWO errors must be correctly identified to earn a passing grade (35 points) on this part. To earn an excellent grade (50 points), you must correctly identify FOUR errors and specifically state what is needed to correct each.…

    • 756 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Given a document D from A entity, find a ranked list of Top 10 documents with B, which are similar to D.…

    • 392 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Linux Commands

    • 1489 Words
    • 6 Pages

    Bash command line for Linux a alias Create an alias • apropos Search Help manual pages (man -k) apt-get Search for and install software packages (Debian/Ubuntu) aptitude Search for and install software packages ( Debian/Ubuntu) aspell Spell Checker awk Find and Replace text, database sort/validate/index b basename Strip directory and suffix from filenames bash GNU Bourne-Again SHell bc Arbitrary precision calculator language bg Send to background break Exit from a loop • builtin Run a shell builtin bzip2 Compress or decompress named file(s) c cal Display a calendar case Conditionally perform a command cat Concatenate and print (display) the content of files cd Change Directory cfdisk Partition table manipulator for Linux chgrp Change group ownership chmod Change access permissions chown Change file owner and group chroot Run a command with a different root directory chkconfig System services (runlevel)…

    • 1489 Words
    • 6 Pages
    Satisfactory Essays
  • Good Essays

    Any Bad Moment

    • 2957 Words
    • 12 Pages

    | (copy out) cpio -o reads the standard input to obtain a list of path names and copies those files onto the standard output.…

    • 2957 Words
    • 12 Pages
    Good Essays
  • Better Essays

    English Irregular Verbs with Phonetic Transcription beat | /bi: t/ | beat | /bi:t/ | beaten | /'bi: tn/ | become | /bɪ 'kʌm/ | became | /bɪ 'keɪm/ | become | /bɪ 'kʌm/ | begin | /bɪ 'gɪn/ | began | /bɪ 'gæn/ | begun | /bɪ 'gʌn/ | bend | /bend/ | bent | /bent/ | bent | /bent/ | bind | /baɪnd/ | bound | /baʊnd/ | bound | /baʊnd/ | bite | /baɪt/ | bit | /bɪt/…

    • 982 Words
    • 4 Pages
    Better Essays
  • Good Essays

    Cobol

    • 43832 Words
    • 176 Pages

    Table Handling Indexed Tables & Index Names Search & Start Verbs Programs using OCCURS & Screen Section List of Programs…

    • 43832 Words
    • 176 Pages
    Good Essays
  • Good Essays

    on other computers on a network. Second, there are File Hosting Services that work in…

    • 801 Words
    • 4 Pages
    Good Essays

Related Topics