1. Engineering
  2. Computer Science
  3. i am using vim unixlinux commandline program from my srpt...

Question: i am using vim unixlinux commandline program from my srpt...

Question details

I am using VIM UNIX/Linux commandline program. From my srpt script I am supposed to only read the directory information one time and make a tmp folder and make a text file inside it. The results must be put into the text file inside a folder called tmp. The file can just be called temp.txt. Once the file is created it should be read back as described below and displayed.

Here are the instructions.

Requirements ./srpt PATH Example ./srpt /testfolder Your script shall inspect the file names of every file and directory in the folder represented by PATH and accumulate a count of each of the following file system objects: Every file Every subdirectory (excluding PATH itself) Every symbolic link Every file that is 365 days old or older (old files) Every file that is larger than 500,000 bytes (large files) Every graphics file (any file with suffix of .jpg, .gif or.bmp) Every temporary file (any file with a suffix of .o) Every executable file (any file executable by the user) Total byte count of each file Your srpt script shall produce a report in this fommat in this order (note the exact spelling of the labels, the spacing and the commas in the numbers)

This is what I have so far. If you can get it to work using this code then please do. In any case I need you to write the code and send it to me. I am lost.

mkdir /tmp/$USER

find /bin ( -type f -fprintf /tmp/fcnt " " ) , ( -type d -fprintf /tmp/dcnt " " ) , ( -type f -size +1000c -fprintf /tmp/fsize "%s " )

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution