I have the .gcda and .gcno files in a folder, from which I am running the below command.
$ gcovr -r .
and the result is as below
if I run gcov on the gcda files I get the proper coverage value.
After a tedious search in multiple forums and countless experiments, finally I figured out the issue and resolved it.
Two things are important to get the proper output from gcovr.
One is from where the gcovr is executed and other is the root directory path.
gcovr should be executed from the folder where the .gcda and .gcno files exist. And the root path is the folder where the source files(.c or .cpp) exist.
With this, the command looks like something as shown below.
rr-mac:gcdaFolder$ gcovr -r /path_to_C_sourceFiles/ .
For output html file below command works
rr-mac:gcdaFolder$ gcovr --html -o Filename_rp.html -r /path_to_C_sourceFiles/ .
Note: The dot(.) at the end is mandatory
Hope this is helpful for those who are struck with this type of issue.
Related
I have a directory that I have been storing a lot of files so I'm working on a script to watch the disk space if it gets more than 80% then it will compress the files.
all the files end with file.#
my question is how to zip all files that end with a number without zipping the zipped files
I did the most of the script but I'm stuck with at this point
please your help
You can zip the files that are outputted by this command find . -not -name "*.zip".
Find is a command that is used well, to "find" files based on various criteria.
You can read more about it using man find or (online version) here
Simply run the zip command with -x argument to exclude already zipped files from being added to the compressed archive. The command will look like:
zip -r compressed.zip . -x "*.zip"
I have a rule whose output files are symbolic link files. Even though the link files are being made, Snakemake exits with a MissingOutputException and lists the output files as being missing. If instead of making a symlink with "ln -s" I copy the files with "cp -p" it works. I tried increasing the --latency-wait but it made no difference.
Sounds like you are using relative path for source file when symlinking. Use absolute path.
Snakemake sees broken symlinks as missing output.
After some reading and trying rsync copy over only certain types of files using include option I can't get seem to get it to work.
I run the following command:
rsync -zarv -vvv -e ssh --prune-empty-dirs --delete --include="*/" --include="*.csv"
--include="*.hdf5" --include="*.pickle" --include="*.tar.gz" --include="*.bin"
--include="*.zip" --include="*.npz" --exclude="*" . user#host.com:/rsync
But at the target it backups any file I have in the directory and subdirectories. delete-before and delete-after does not delete files like .txt or .py. I have also tried the --exclude="*" before the extension includes but I am running 2.6.9 so it should be after as far as I have understood it.
Deleting files on the host machine will just sync them again for whatever reason I don't know.
Your command looks fine, although try using --delete-excluded instead of --delete.
--delete-excluded - also delete excluded files from destination dirs
It should eliminate any files that are --excluded and not --included on the destination.
Sorry to have bothered. This was a bash issue and not a command issue.
As I was using the command:
exec $COMMAND
instead of
eval $COMMAND
This made god knows what for error but executing it manually (after print) and correctly in bash made it work. Deleting items still seems flaky but that I can try some.
I need my client to be able to see the file in the directory they are allowed on. So I soft link the directory they are allowed on but can't see the files inside even tho they have the right (rwx).
ex:
/home/user1/project1.link/(couple of files)**
/clients/client_shamwow/project1/(couples of files)
**: Can't see the files.
This is the line I used:
ln -s /clients/client_shamwow/projet_prod /home/user1/projet_prod
is there something wrong that I am doing so they can't see the files in project_prod or I should use something else?
Your command doesn't match your example, but I assume you mean /home/user1/project1.link is a soft (symbolic) link, and when you run ls it lists just that name, rather than the contents of the directory the link points to. If that's the case, add the -L option to your ls command.
ls -lL /home/user1/project1.link
The man page says:
-L, --dereference
when showing file information for a symbolic link, show information
for the file the link references rather than for the link itself
Another way is simply to append /. to the end of your command, as in
ls -l /home/user1/project1.link/.
If that doesn't answer your question, I think you need to be more clear, and perhaps clean up the inconsistencies in your question. Even show some real output and the commands you ran.
Solved. No idea what happend. I just recreated the link the exact same way I did before and now I am able to see AND modify the files as the user1 w/o him being able to go anywhere else than what is in the folder project_prod. Thx for your time :)
I have a lastaction script I'm trying to run in my "log" folder, as I want to move all files and folders in the log folder inside the log/archive folder. So I simply added
mv log/* log/archive/2014
Obviously enough, I get an error saying archive folder cannot be moved to a subdirectory of itself, so I tried adding the extra parameter to the move command to move everything except the archive folder.
mv !(archive) log/* log/archive/2014
This exact command, if executed from cli, works just fine, but when added inside the lastaction/endscript block, it throws the following message
logrotate_script: 2: logrotate_script: Syntax error: "(" unexpected
Anybody has any clue on why this happens?
You are using bash as your shell. You also have the extglob setting enabled.
When logrotate is executing that shell script one or the other of those is not true.
Also that mv command looks odd to me. If archive is under log then I don't see why !(archive) doesn't have log/ as a prefix. Also the log/* should still be matching log/archive regardless of the extglob glob before it. (That is I would think you wanted mv log/!(archive) log/archive/2014, assuming you don't feel like just ignoring the warning from mv in the first place.)