Closed DIGIX666 closed 4 months ago
Another student here, my interpretation of this audit question is:
tar -czf home.tar.gz . &
to put the job in the background (to test your "backgrounding" functionality)jobs
to see your job running the background (to test if your jobs
command is functioning correctly)The &
indicates the end of a command and causes it to execute asynchronously (in the background), but I understand the possible confusion in the question.
Hi Kévazy,
Thank you for your message. I had the same first interpretation but I get the same error
Ah, previously I have only been running the shell/command using WSL (Ubuntu) and I noticed from your path you are running Windows. I tried the same with PowerShell and I get the same error, so the question is likely Unix or Linux-specific...
According to this page, Cygwin seems to be a decent Unix-like terminal for Windows in case you do not feel like going through the hassle of installing WSL on your machine. It should, in theory, use pretty much the same tar
command as in actual Linux, but haven't tried it myself so no guarantees.
The path you see is what appears when I launch my go run .
project. My device is a Mac, so I'm on Unix too. I'll look into it, maybe it's a problem in my code. Haven't you had this problem on your side?
Hmm, yeah, I am now realizing this is a weirder case than I initially thought.
Didn't notice it before since it didn't cause any problems on my side, but I am indeed getting this error on Linux, which I guess is similar to yours (in the way that it is trying to read/add itself) but handled differently by the OS as opposed to Mac.
❯ tar -czf home.tar.gz .
tar: .: file changed as we read it
It goes away the second time you run it, but that's most likely due to it already existing and not being bundled with anything new from the current folder. So basically, the command works "good enough" on Linux, but yeah I do see that you pretty much have to adapt it to your OS when it's being handled differently. Now better understanding the context, your workarounds definitely seem fair enough to pass the audit.
I think problem come to my OS (macOS) because I try this command in the shell linux (Ubuntu) and all it's good. I try in other device mac, same problem.
Hello,
Can you confirm that you don't have any file named home.tar.gz
in the location where you run the command ?
The error occurs due to discrepancies in the implementation of the tar command across different systems. However, the primary objective of the project is not to ensure the flawless execution of the command but rather to ensure that the command is added to the jobs correctly.
Hello,
I confirm, I don't have file named home.tar.gz
before run a command tar -czf home.tar.gz . &
Okay thanks for you feedback, This will be fixed
No problem ;)
When it's fixed can you please ping me
Describe the bug
Should the audit command be
tar -czf ../home.tar.gz . & jobs
because the command indicate compresses the archive which is itselfUsers student : Thox66
Severity ⚠️ critical
Type ⚙️ functionality
To Reproduce Steps to reproduce the behavior:
tar -czf home.tar.gz . & jobs
Workarounds Any known workarounds for the issue:
tar -czf ../home.tar.gz . & jobs
tar --exclude='home.tar.gz' -czf ../home.tar.gz . & jobs
Expected behavior I would like someone to confirm whether this is an error in the audit and correct it to validate the project.
Desktop (please complete the following information):
Smartphone (please complete the following information):