Implementing ls command in linux