What is the command to find a file called auth.log in the /var/log directory? (Use the find command)
Added by Danielle H.
Step 1
Step 1: Open your terminal. Show more…
Show all steps
Your feedback will help us improve your experience
Sanchit Jain and 92 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
What command do I use to find the flag number displayed in the flag-fdisk file in the /root/temp folder in Fedora?
Sanchit J.
Assignment 7 -- Linux Commands - Find and Redirect The objective of this assignment is to give you the opportunity to prove that you can use the commands we went over in class. To accomplish this, you will follow the instructions listed below: While in your home directory, write a script (macro) called "find-fun" that performs the following steps: 1. Every command will send output to the screen AND to a file named "console-surveillance.txt" (appending to the file with each new command). 2. Use a command to find where the "PASS_MAX_DAYS" variable is set on your Linux computer. Your output should just list the target file -- if other files are being listed, try to eliminate them. 3. Run the command that will output the first 2 lines of this file. 4. Run the command that will output the last 2 lines of this file. 5. In the same directory (where the last file was found), list all files starting with "host" -- use the long listing format. 6. Use a command to find the file that shows the name of your computer. 7. Run the command that counts how many lines are in that file (just the lines, nothing else). 8. Use a command to make your name appear on the screen. **NOTE** Some of you will be tempted to write a script that does everything in sequence, and I will give extra credit for this, but it is not a requirement. Do the commands outside the script first to see how they work. Add them to the script one by one. This is easier, and I do not want you to not turn in the assignment because it was too difficult. Assignment Submission Criteria: To turn in this assignment, you will go to the NSC Canvas shell for this class. Submit your macro file ("find-fun") and your "console-surveillance.txt" file (which contains a record of everything you did).
Akash M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD