Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can. Use your favorite programming language's interface for listing the content of a directory!

`ls` is for you, the human.



In C, my favourite language, I would do this:

        system("ls");


Please never do this; do not use system, it executes $SHELL and you can fall victim to various PATH munging attacks. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: