Question

You have a bunch of text files in your home directory, and you are trying to...

You have a bunch of text files in your home directory, and you are trying to find which ones contain the word "opportunity". What command would you type to search within all the files for the word "opportunity"?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

grep -rw ~/home/ -e 'opportunity'

w: whole word
'~/home' : Folder path
r : recrsively search in subfolders
e : match string
'opportunity' : string to search

Add a comment
Know the answer?
Add Answer to:
You have a bunch of text files in your home directory, and you are trying to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Suppose that you wished to copy all of the text files from your fileAsst directory and...

    Suppose that you wished to copy all of the text files from your fileAsst directory and all of the files from your fileAsst/Planes directory into your current directory (without typing out the name of each individual file). What command would you give to make that copy?

  • 1. Navigate to your home directory by typing cd. Now type ls and notice that there...

    1. Navigate to your home directory by typing cd. Now type ls and notice that there is a subdirectory called Downloads. Now navigate to the root of the file system by typing cd /. From here, which single command would you use to navigate directly to the Downloads folder that is located in your home directory? The output of the command would be as follows: 2. From the Downloads directory which single command would you use to navigate back up...

  • INTRO TO UNIX COURSE Suppose that you wished to copy all of the text files from...

    INTRO TO UNIX COURSE Suppose that you wished to copy all of the text files from your fileAsst directory and all of the files from your fileAsst/Planes directory into your current directory (without typing out the name of each individual file). What command would you give to make that copy? Direct Paths I wish to copy from:   /home/ndashiel/UnixCourse/fileAsst /home/ndashiel/UnixCourse/fileAsst/Planes Direct Path I would like to copy into: /home/ndashiel/UnixCourse/commandsAsst Please help me with this, I have been struggling on this for...

  • a) How would you use the ls command to display all of the files/directories in the...

    a) How would you use the ls command to display all of the files/directories in the directory ‘/sbin’ that start with ‘bl’? b) How would you use the ls command to display all of the files/directories in your current directory that contain the word ‘grade’ somewhere in the name and end with ‘.pdf’? c) How would you use the ls command to display all of the files/directories in your current directory that are any two characters followed by the file...

  • do numbers 4-8 4. Given any directory, use the Is command to display: • all files...

    do numbers 4-8 4. Given any directory, use the Is command to display: • all files and sub-directories starting with the letter "D" (note do not list anything in any sub-directory) • its immediate sub-directories (sub-directories only, and no other ordinary files) its immediate hidden sub-directories only - take a screenshot (#3-3) that clearly shows the command and the result. 5. Assume that the following files are in the working directory: $ ls intro notesb ref2 section 1 section3 section4b...

  • In unix assume text1, text2, text 3 are three files in your current working directory, the...

    In unix assume text1, text2, text 3 are three files in your current working directory, the following command is valid cat text1 text 2 text 3 true or false?

  • 2. Without changing the ownership of test directory in your home directory, explain what the chmod...

    2. Without changing the ownership of test directory in your home directory, explain what the chmod command would be to make sure that super, as a member of the is229 group, had no ability to read, write, or execute files in the test directory.

  • QUESTION 1 From YOUR home directory, execute a find command string that will locate the file...

    QUESTION 1 From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the letc directory Select the correct find command string below that will accomplish this. find /etc-name 'resolv.conf -cat D find /etc-name 'resolv.conf -exec cat 0 find. -name 'resolv.conf -exec cat 0\ find /-name 'resolv.conf' -exec cat 0 QUESTION 2 What find command...

  • JAVA: create a program that reads all text files in a directory, calculates the occurrences of...

    JAVA: create a program that reads all text files in a directory, calculates the occurrences of words, and saves the result in one single output text file. assume that you are in a directory called Desktop/programdirectory, where you have multiple text files. textfile1.txt : "how are you" textfile2.txt: "great thank you" textfile3.txt: "great to see you. see you later" Then, your output.txt should have: how: 1 are: 1 you: 4 great: 2 thank: 1 to: 1 see: 2 later: 1

  • e. Write a command to search all the files in your parent directory whose name is...

    e. Write a command to search all the files in your parent directory whose name is starting from a number in between 9 to 10. (0.75)

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT