System() function not working when using 7z command

Hi,
I am trying to use 7z command to compress my data file in my legato application, but it is neither giving error nor showing any compressed file, means it has no effect. My command is system(“7z a myfile.7z myfile.csv”); Pls help. One doubt I have is whether I need to make sandboxed option true or false?

Have you tried to type this one uart console and see if your commmand is working?

Thanks for the help. Sorry I didn’t understand you, do mean to try this command on SSH terminal?

Yes, you can try that on ssh terminal

It is telling “-sh: 7z: not found”.

Then you cannot use system 7zip.