LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What is a .cloc file? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-a-cloc-file-4175572482/)

chris_crunch 02-17-2016 08:05 AM

What is a .cloc file?
 
In a software package I downloaded, I found this file.


Code:

chris@chris-crunch:~/apps/caffe-master$ cat caffe.cloc
Bourne Shell
    filter remove_matches ^\s*#
    filter remove_inline #.*$
    extension sh
    script_exe sh
C
    filter remove_matches ^\s*//
    filter call_regexp_common C
    filter remove_inline //.*$
    extension c
    extension ec
    extension pgc
C++
    filter remove_matches ^\s*//
    filter remove_inline //.*$
    filter call_regexp_common C
    extension C
    extension cc
    extension cpp
    extension cxx
    extension pcc
C/C++ Header
    filter remove_matches ^\s*//
    filter call_regexp_common C
    filter remove_inline //.*$
    extension H
    extension h
    extension hh
    extension hpp
CUDA
    filter remove_matches ^\s*//
    filter remove_inline //.*$
    filter call_regexp_common C
    extension cu
Python
    filter remove_matches ^\s*#
    filter docstring_to_C
    filter call_regexp_common C
    filter remove_inline #.*$
    extension py
make
    filter remove_matches ^\s*#
    filter remove_inline #.*$
    extension Gnumakefile
    extension Makefile
    extension am
    extension gnumakefile
    extension makefile
    filename Gnumakefile
    filename Makefile
    filename gnumakefile
    filename makefile
    script_exe make

I have no idea what a .cloc file is, so I 'read' it with cat to find out more. I understand nothing, apart from the fact that these seem to be different codes?

I have googled what a .cloc file is but have not been able to find anything remotely helpful. Can anyone explain to me what this is, or where to find out more? Thanks :D

TB0ne 02-17-2016 08:24 AM

Quote:

Originally Posted by chris_crunch (Post 5501597)
In a software package I downloaded, I found this file.
Code:

chris@chris-crunch:~/apps/caffe-master$ cat caffe.cloc
I have no idea what a .cloc file is, so I 'read' it with cat to find out more. I understand nothing, apart from the fact that these seem to be different codes? I have googled what a .cloc file is but have not been able to find anything remotely helpful. Can anyone explain to me what this is, or where to find out more? Thanks :D

Putting "linux cloc file" into Google pulls up lots. The VERY FIRST HIT is:
http://cloc.sourceforge.net/

...which tells you that cloc stands for Count Lines Of Code. Essentially, it's a code checker/parser, and those are patterns used for various different types of programming languages.

Also, when asking such things, it'd be nice if you said what package it was you found this in and where you got it, rather than "a software package I downloaded", which tells us nothing.

jefro 02-17-2016 03:44 PM

In your case it is a text file. Some other commands use it as input.

Linux isn't really well tied to the extensions like windows is.

Habitual 02-17-2016 03:48 PM

http://linux.die.net/man/1/cloc

Isn't google wonderful?
Practically sucks the question out of your skull.

jefro 02-17-2016 09:19 PM

You may have installed cafe and not known what it was for and this is residual. It is a text file and tells that program how to handle things.

Ztcoracat 02-17-2016 09:56 PM

Quote:

Originally Posted by jefro (Post 5501991)
You may have installed cafe and not known what it was for and this is residual. It is a text file and tells that program how to handle things.

Is it like a cron job?

chris_crunch 02-18-2016 03:17 AM

Oh okay, so it's basically there to make sure the program is running properly...
Sorry guys that was a rather silly question; I think I phrased the question rather badly in the google searchbar...

Thanks for your time, again...!

jamison20000e 02-18-2016 03:25 AM

Best to cut to the chase with google only key words or some phrases like "how to..." this may help: http://www.sc.edu/beaufort/library/p...es/bones.shtml :)

jefro 02-18-2016 03:57 PM

I didn't mind the question. It was a good question. Just kind of confusing to me as caffe is an odd program to have.


All times are GMT -5. The time now is 07:01 AM.