Module Milestone #4

I am always getting this error
“cp: cannot stat ‘/home/crio-user/workspace/QBox/logs/vsftpd1.log’: No such file or directory”
in my unit_testlog file while copying the vsftpd1.log file from logs folder to backup folder I have checked the presence of the file in the folder and also made sure there are no syntax errors. When I run this code in the workspace it works completely fine and shows the tree but when I submit the work it shows this error in log file.My Test Log File

You can see the tree that gets created in the workspace but not in the final results

As mentioned in task it should work from any directory. Try to think more towards it.

Hi, is it working now?
Your log file says there is no ‘logs’ file in QBox directory.You can see there is no folder named logs under QBox. And vsftpd1.log is not copied either. May be you have deleted it somehow, after you checked the presence of the same. Goto. File->OpenFolder->workspace->QBox and check if the log file is present or not. If it is not present go back to your task 1 and pull the file again. After that once again check the presence of your files under QBox.

One more thing:
Looking at the above screenshot we can say that the directories and files are properly created. But do note ‘.’(period) refers to the current directory. And it’s working all fine there. So try to execute those commands you have written in from some other directory, and see if you are getting the same behavior. If not, you have make little modifications to your commands.

I have already checked for these and here you can see i can print the tree from other directory as well

Hey aj, Even i encountered this mistake. This is a silly one but see to it that the path you are providing is a general path which should work in all systems (HINT). Happy Coding!

Upvote if it was useful. :slightly_smiling_face:

Can you explain a bit what do you mean by a general path? I am already using the full path from root directory.

Cool. Here’s a question that might help: Will the system that runs the test have same username and home as yours? If not, What should you replace or add in the path you are specifying to make it generalized.


please dont write /home it should be start with the ~wokplace and then your path it is already given in one of the module please refer it.

yeah understood thanks anyways

Use the mighty " ~ ".