Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please give me the details of command used and the answer to each question Shell Script: #!/bin/bash Simple shell script. As bob, write a shell
Please give me the details of command used and the answer to each question
Shell Script: #!/bin/bash
Simple shell script. As bob, write a shell script that examines all the processes on the system and reports bash shell processes into a file called bashlog. First, this script should append to the bashlog the date. Then, it should do a ps aux, and all lines (use grep) containing the letters bash but not containing the letters cpeek should be appended to the bashlog. Your script file should be called cpeek Test your shell script by running your command several times with various users logged in (for example root and your esa account) (i.e., just make sure it works). 1) Report: the exact contents of cpeek. (Do NOT report the contents of your bashlog.) More advanced shell script. As bob, write a shell script called clook. This shell script takes an argument that should be the name of the directory. If it is given the name of something that isn't a directory (or doesn't exist) it should print "Sorry". If it is given the name of a directory it should print the names of any items in that directory that are files and are executable. Test your shell script by running your command on /etc/printcap (it's a file and should print "Sorry") and on /sbin (do an Is to see the names of the executables). 2) Report: the exact contents of clook. On the cheetah examine and report the following: 3) What three hard drives are attached to the file tree and where (mount/df)? With the df command, Linux lists one hard drive as a virtual device called /dev/root. You can determine which hard drive this is by doing a mount command and looking for the entry for "". 4) On the root (/) file system, how much disk space is available (df)? 5) On the root (/) file system, what is the file system type and is the file system read only or read/write (mount)? 6) In your home directory, how much space have you used (not much yet) (du)? 7) Your home directory is on one of the hard drive partitions. Report the line in the fstab that causes that partition to be mounted. On the system you administer, using the system administrator account; examine the superblock of the linux partition on your primary drive /devvmeOn1p1) using the xfs_info command. 8) Report: The file system version, the data block size and the number of data blocks in that file system. 9) fdisk -l: For the primary disk you administer describe the partitions that are on the disk? For each partition report, what cylinder it starts at, what cylinder it ends at, and what kind of a partition it is (Linux, DOS, swap). Be very careful with this one, DO NOT MODIFY or WRITE anything with fdisk; you could erase your hard driveStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started