c - LINUX: List contents of a outside folder or of a subfolder without leaving current folder -
I have a program that sees a folder somewhere in your directory (the location is given at the start of the program ). One of its functions is that the user has to specify which content is stored in that specific folder. I was thinking of piping the ls command, but I'm sure how to get the contents of a folder in which you are not currently. help?
Thank you!
Just use LS?
ls / path / to / directory Alternatively, opendir () and readdir () , use man 3 opendir and man 3 readdir >
Comments
Post a Comment