/* * http://sosal.tistory.com/ * made by so_Sal */ LINK 2){ perror("Usage :: _ls [Directory] \n"); exit(EXIT_FAILURE); } char* position; position = argv[1]; // 메인함수는 디렉토리 목록을 출력할 위치를 _ls(position,0); // 인자로 받아 _ls 함수의 매개변수로 전달하는 일만 수행합니다. exit(0); } void _ls(char* pos,int depth){ //depth는 처음 0이고, 디렉토리 출력중 새로운 디렉토리를 만나면 //depth를 증가시켜 재귀적으로 함수를 다시 호출합니다. DIR *dp; // 실제 파일을 가리키는 포인터 struct dirent *..