How to display full path/absolute path with ls command
December 17, 2020
How to list files and directories to show full path / absolute path name in the shell terminal.
We can use the ls command -d option in combination with the environment variable $PWD.
Syntax
ls -d $PWD/*
Example
Use the ls command to display the absolute path names of all files or directories in the current directory.
➜ ~ ls -d $PWD/*

Use the ls command to display absolute path names in long list format (-l).
➜ ~ ls -dl $PWD/*

One Comment
This seems to break the -R flag. Do you know of a way around this?