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:23locatewould be faster, but I’ve been disappointed in the past running it on recovered systems which had been cleaned up — thelocatedatabase 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.debarchives that seems to be the packaged versioned of the projects” (sic). – Stephen Kitt Jul 31 '17 at 09:40find / -name CVSwould 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 -wholenameandlocate: invalid option -- r– Niklas Rosencrantz Jul 31 '17 at 09:45findtrying to read files in/procwhich disappear between the timefindbuilds its list of files and the time it reads them. You can skip/procentirely. – Stephen Kitt Jul 31 '17 at 09:45-wholenameinfindand no-rinlocate. sorry about that. you can achieve similar withlocate / | grep ....– cas Jul 31 '17 at 10:20locateshould work with justlocate '*debian/rules'. Fromman locateon 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