Pergunta de entrevista da empresa Apple

How would I implement the 'ls' command in Unix?

Respostas da entrevista

Sigiloso

1 de fev. de 2010

I did not have sufficient knowledge in filesystems to answer that question.

Sigiloso

23 de fev. de 2010

I remember the way how I did it when I was in college is to first to know the current directory then you iterate each of file/directory nodes in the file system at that level and print out each of them one at time.

Sigiloso

3 de ago. de 2015

If this is in reference to the command line. Typing ls in terminal in the "desired" file directory, will output all files within that file. So, for example if you navigate to your "documents" folder and type "ls" you will see all files contained inside your documents folder.