In Linux, how can I find all *.js
files in a directory recursively? The output should be an absolute path (like /pub/home/user1/folder/jses/file.js
)
this answer worked for me:
find $PWD -name '*.js' > out.txt
It finds all *.js files, output absolute path, writes the results into out.txt.
Use find
on the command line:
find /my/directory -name '*.js'
If you just want the list, then you should ask here: http://unix.stackexchange.com
The answer is: cd / && find -name *.js
If you want to implement this, you have to specify the language.
Source: Stackoverflow.com