Dear All.
I would like to use a legacy command of tar through system call in C source code.
With legato Develope studio system. I made some sample code as below in order to compress for some directory
{
RunSystemCommand(“cd /home”);
RunSystemCommand(“tar -czvf log.tar.gz /home/log”);
}
After executing code. I got the result log message as below
but there is no log.tar.gz file in /home directory
Jan 6 02:04:11 | svclayerlogctl[21792]/svclayerLogCtlComponent T=mLogFileMgr | svclayerLogCtlComponent.c RunSystemCommand() 69 | Success: cd /home
Jan 6 02:04:11 | svclayerlogctl[21792] | | tar:
Jan 6 02:04:11 | svclayerlogctl[21792] | | Removing leading ‘/’ from member names
Jan 6 02:04:11 | svclayerlogctl[21792] | |
Jan 6 02:04:11 | svclayerlogctl[21792] | | a home/log
Jan 6 02:04:11 | svclayerlogctl[21792] | |
Jan 6 02:04:11 | svclayerlogctl[21792] | | a home/log/logfile0.txt
Jan 6 02:04:11 | svclayerlogctl[21792] | |
Jan 6 02:04:11 | svclayerlogctl[21792] | | a home/log/logfile1.txt
Jan 6 02:04:11 | svclayerlogctl[21792] | |
Jan 6 02:04:11 | svclayerlogctl[21792]/svclayerLogCtlComponent T=mLogFileMgr | svclayerLogCtlComponent.c RunSystemCommand() 69 | Success: tar -czvf log.tar.gz /home/log
Do I miss something ?
Thank you all