Is there a C function call in linux that helps me get all the files in the directories of $PATH as a list or an array? Or should we parse through the $PATH variable manually to get them?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
returns a
:-delimited list of the directories in PATH. To translate to an array, you can usestrtokto split the string.