Test case 1 and 3 module 1 QBox

User output:
total 252K
-rw-rw-r-- 1 root root 132K May 12 13:35 vsftpd1.log
-rw-rw-r-- 1 root root 26K May 12 13:35 vsftpd2.log
-rw-rw-r-- 1 root root 90K May 12 13:35 vsftpd3.log

Actual output:
total 252
-rw-rw-r-- 1 root root 134899 May 12 13:35 vsftpd1.log
-rw-rw-r-- 1 root root 25986 May 12 13:35 vsftpd2.log
-rw-rw-r-- 1 root root 91484 May 12 13:35 vsftpd3.log

User output:
grep: Login: No such file or directory
grep: successful: No such file or directory
32

Actual output:
32

my code is printing some warning s here is my code snippet

ls -ltrh ~/workspace/QBox/logs

grep -o -i 230 Login successful ~/workspace/QBox/logs/vsftpd1.log | wc -l

Hi @Vibhu007
Looks like you are facing challenges in the current module.

Below is a link to all the FAQ’s for the current module

Below are a few similar topics raised by other users which you might find usefull

Note - This is a BETA Feature,if you find this helpful, kindly let us know.
Feedback link - https://forms.gle/cmxN5pdTXgnwgC986

Kindly mark this as a solution if this has helped you solve your query

Hi @Vibhu007

( Please do not post your code on forum.)

I can see these are the test cases failing for you; list_files & print_number_of_occurrences
1. list_files : Look out, if at all you are using some extra options with “ls” which isn’t actually needed. You are almost there. Just a little change is needed. You need to remove one of the options

2 print_number_of_occurrences :
As you can see your output is:

grep: Login: No such file or directory
grep: successful: No such file or directory
32

Actual output is :

32

I would suggest you to carefully look at the examples over here

Have you missed something? Compare your code with examples over here. And you’ll find it right away

Feel free to ask your doubts here, if you continue to face some problem

Hi, Vibhu007
You can visit this link for reference.
Link:- https://www.tecmint.com/find-and-sort-files-modification-date-and-time-in-linux/
Hope it helps!
Also don’t forget to search how to search for string using grep and count the no. of lines it appeared in.
It solved my problem as well.
Thanks

Hi @Vibhu007 ,

Do the solutions suggested by @Crio-Admin, @Amogha_Crio-TA and @vishalbihani2 resolved your problem? If not, please let us know so we can help you. If they did, please mark the relevant one as solution and close this topic.

Thanks!

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.