I inherited a legacy development system which is poorly documented and the source code is not known if it still is available.
Now I could locate some of the source code and actually build one part of the system.
I wonder if I can find the rest of the source code and if there is any better way than locate *.c
and manually inspecting the files (that's how I found part of the code).
There are 3 machines and only one where I found the source code that seems to be a development machine. It also has 61 .deb
archives that seems to be the packaged versions of the projects, but looking into the .deb
archives shows that the source is not in the archives or at least not where I looked.
Is there a good way to "scan" an entire drive for source code?
find / -wholename '*/debian/rules'
. or (faster, if mlocate is installed)locate -r /debian/rules$
– cas Jul 31 '17 at 09:23locate
would be faster, but I’ve been disappointed in the past running it on recovered systems which had been cleaned up — thelocate
database still new about source code which was gone. (That can still be useful information if backups are available...) – Stephen Kitt Jul 31 '17 at 09:28.deb
archives that seems to be the packaged versioned of the projects” (sic). – Stephen Kitt Jul 31 '17 at 09:40find / -name CVS
would find checked-out copies of the code. – Stephen Kitt Jul 31 '17 at 09:41find: /proc/361/fd: No such file or directory
– Niklas Rosencrantz Jul 31 '17 at 09:44find: invalid predicate -wholename
andlocate: invalid option -- r
– Niklas Rosencrantz Jul 31 '17 at 09:45find
trying to read files in/proc
which disappear between the timefind
builds its list of files and the time it reads them. You can skip/proc
entirely. – Stephen Kitt Jul 31 '17 at 09:45-wholename
infind
and no-r
inlocate
. sorry about that. you can achieve similar withlocate / | grep ....
– cas Jul 31 '17 at 10:20locate
should work with justlocate '*debian/rules'
. Fromman locate
on my woody VM:If a pattern does contain metacharacters, locate only displays file names that match the pattern exactly.
(tested there, too). – cas Jul 31 '17 at 10:39