Unix/ls

From Rosetta Code
Unix/ls is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

Write a program that will list all files (including directories, symlinks, etc.) in the current folder, truncating everything except for the dirname/filename, similar to the Unix utility `ls`.