1/4 testcase is not passing of "print_directory_structure.sh"

I am getting the desired output on my terminal. Don’t know why its not passing the testcase
Giving error:
“cp: cannot create regular file ‘/home/crio-user/workspace/QBox/backup’: No such file or directory”
though I have given the cmd of mkdir backup before this

@rajshreegupta2220 Did you check if the folder named backup has been created in the QBox directory?

sometimes in task board some hints are not given properly, so go through all the hints in the .sh file (todos), and make sure that you have implemented all the hints as it is said in the .sh file.

I am not sure if this is the issue causing the error but, how can u create something when it is already existing. So try deleting and then submit again :slight_smile:

no, you just have to change the diretory with cd direc_name
if you dont your submission will not consider as correct but you will do get output in terminal

yes it is being created

include cd means: include cd command in your bash script as given in the todos

@jayanta
User output:
cp: cannot create regular file ‘/home/crio-user/workspace/QBox/backup’: No such file or directory
.
|-- backup
|-- logs
| |-- vsftpd1.log
| |-- vsftpd2.log
| -- vsftpd3.log – transfer
This is the output I’m getting in unit testing
It is also showing that backup exists

directory is indeed created, what i said that in the .sh file, you also have to add the “cd dir_name” command as given in the todos of that .sh file

before writing the cp cmd for file transfer
I have written cd logs
and after that I have moved to qbox directory and then executed tree command

first create the directories
then copy
then cd
then tree (here dont use any parameter)

following exactly the same procedure

do I also need to give cmds for deleting the directories after tree cmd??

no, that will be enough

@Crio-Admin I counld not this error. please guide

same here. stuck for long time

where should we remove the created directories and files(i.e backup and transfer).At the start or at the last.i.e in tree output should we have 3 directories or 1 directory

step 1 - create “backup” dir using appropriate command.
step 2 - create “transfer” dir using appropriate command.
step 2 - copy file using appropriate command.
step 3 - change dir to QBox using appropriate command.
step 4 - execute tree command,
Hint - there will be 5 command in your script.

i am unable to run tree command it shows permission denied any suggestions

How are you guys changing directory in script. I am putting my entire code in a function and executing that function in my script.It gives correct output in terminal but fails the test case