Day10: Linux_Bash_Scripts_Validation

Hi, I have completed the task as per the instructions but won’t complete successfully.
I have tried previous recommended solutions to no attempt.

Please support to check what I’m missing. Thanks


Your answer looks a little weird, as if you initially used different names for some of your items. I tried the lab, and it worked:

[tony@stapp01 ~]$ /scripts/media_archive.sh 
  adding: var/www/html/media/ (stored 0%)
  adding: var/www/html/media/index.html (stored 0%)
  adding: var/www/html/media/.gitkeep (stored 0%)
xfusioncorp_media.zip                    100%  595     1.8MB/s   00:00    
[tony@stapp01 ~]$ ssh 'natasha@ststor01'
Last login: Sun May 24 20:16:29 2026 from 10.244.164.11
[natasha@ststor01 ~]$ ls -l /archives/
total 4
-rw-r--r-- 1 natasha natasha 595 May 24 20:18 xfusioncorp_media.zip
[natasha@ststor01 ~]$ 
logout
Connection to ststor01 closed.
[tony@stapp01 ~]$ cat /scripts/media_archive.sh 
# /bin/sh
zip -r /archives/xfusioncorp_media.zip /var/www/html/media
scp /archives/xfusioncorp_media.zip natasha@ststor01:/archives/

The names are slightly different (we randomize these), but it does work.

1 Like

hi refer to this solution

Thanks this works.

I was creating the zip manually, seems it should be included in the script as well