Questions tagged [source-code]

71 questions
37
votes
11 answers

Counting lines of code?

if I want to count the lines of code, the trivial thing is cat *.c *.h | wc -l But what if I have several subdirectories?
Niklas Rosencrantz
  • 4,112
  • 6
  • 36
  • 58
21
votes
3 answers

convert executable back to C source code

Unfortunately I lost my source code and I just have the output file that made with gcc in linux and I don’t have any access to my pc now.is there any way to convert output file to source file (in c under linux)?
mahsa
  • 211
  • 1
  • 2
  • 3
15
votes
2 answers

How do I look at the source code for a command?

I suddenly decided I'd like to look at the source code for 'echo' $ which echo /usr/bin/echo so $ ls -al /usr/bin/echo -rwxr-xr-x. 1 root root 32536 Oct 31 2016 /usr/bin/echo so $strings /usr/bin/echo leads me to believe it's a compiled C…
9
votes
5 answers

How to get all paths from a website using cURL

curl //website// will get me the source code but from there how would I filter our every unique path and obtain the number of them? the question: Use cURL from your machine to obtain the source code of the "https://www.inlanefreight.com" website…
YnSkn
  • 323
  • 2
  • 3
  • 8
7
votes
4 answers

Usage of Bang (!) in bash

I am reading the bash source code, and the BNF grammar for bash would be: ::= | '!' | | '!'
frams
  • 516
  • 5
  • 17
4
votes
1 answer

How to become a Linux source code maintainer?

According to this link, when changes to the Linux source code are submitted, they are reviewed by a hierarchy of maintainers, eventually concluding with Linus himself. How does one become such a maintainer? (Context: I'm teaching a class about the…
user372803
4
votes
1 answer

How does providing an asc file ensure I'm downloading the intended source code?

I'm installing cmake from the cmake.org website and they provide two files that I believe are intended to verify the source code download cmake-3.11.0-rc3.tar.gz On the same page, they have links to download a cmake-3.11.0-rc3-SHA-256.txt file and a…
3
votes
0 answers

Location of the system-wide file table and inode table structures in the kernel source

To better understanding of the file management in Linux kernel I want to find out three table declarations in the source: a single process file descriptor table system-wide table of open files inode table At this moment I have found only a single…
MiniMax
  • 4,025
  • 1
  • 17
  • 32
3
votes
1 answer

How to organize 3rd-party libraries for Python?

I am new in Python. I want to install many 3rd-party libraries (I think they are also called packages?) like, for example, "AstroPy". But I am not sure where the new source code will be stored (I mean, the new ".py" text files that will be…
Stefano
  • 131
  • 2
3
votes
2 answers

Replacing backslashes with forward slash within double quotes

I have some C source code which was originally developed on Windows. Now I want to work on it in Linux. There are tons of include directives that should be changed to Linux format, e.g: #include "..\includes\common.h" I am looking for a…
Dumbo
  • 1,516
  • 6
  • 16
  • 20
3
votes
1 answer

How to find the source code by a simple method

As I know,the Linux is a open source project,which mean we can find all code that build this system. But that is too hard for me. Is there a simple method which can check the source code of any command? Such as the function hostname. I find it will…
yode
  • 1,037
  • 4
  • 11
  • 19
3
votes
1 answer

Are there any unminify tools for shell scripting?

Various minifier scripts exist for shell code, (e.g. bash-minifier), but how about the reverse? Are there any shell-centric utils or scripts to automatically turn a one-liner like this: echo foo;echo bar;echo "baz;bing";echo 'buz;bong' ...into…
agc
  • 7,045
  • 3
  • 23
  • 53
2
votes
1 answer

git clone from https URL fails, says it's 'remote-https' is not a git command and that templates werent' found

I'm working on a CentOS 7.9 GNU/Linux system. I've built and installed a newer version of git (2.34.1 instead of 1.8.3.1 that's bundled with the distribution) under /opt/git/2.34.1, with a symlink to that directory at /opt/git/current; and I've…
einpoklum
  • 8,772
  • 19
  • 65
  • 129
2
votes
2 answers

How can I get glibc/libstdc++ sources and set them up for gdb to find?

I'm debugging this program which raises an exception. This makes my debugger look for some source code, e.g. ../sysdeps/unix/sysv/linux/raise.c - and fail to find it. Now, I realize it's not necessary for me to have these sources, but still - I…
einpoklum
  • 8,772
  • 19
  • 65
  • 129
2
votes
1 answer

Does checkinstall command add dependencies in the package?

I learned about checkinstall today. I installed mdp on Linux Lite installed on VirtualBox using checkinstall. mdp depends on a package called libncursesw5-dev, which wasn't installed on my machine. But when I ran checkinstall, mdp was installed and…
1
2 3 4 5