I am supposed to write a shell script to which I send a command line argument, which represents a directory. Then I am supposed to echo all the filenames and number of lines for each file from that directory. I am also supposed to only do this for the top 10 files not older than 10 minutes.
find "$1" -cmin -10 -type f | head -10
This is what I tried for finding the files newer than 10 minutes, but I have gotten some errors. And also I am not sure how to get the names. Thanks in advance for all the help.
My file names are free. The error I get is that the permission is denied, when passing my home directory as the argument. So I don't get the list of names. I am supposed to both get the list of filenames and the number of lines of each of those files.
When I type /bin/bash ss1 /home/ivana
into the terminal, I get the following error:
find: '/home/ivana/.cache/dconf': Permission denied
I am using Linux.