Re: [Newbie] Can ls command format output my way?
On 12/17/2016 05:40 PM, Richard Owlett wrote:
[...]
> I don't wish anything but full path to all files in a top level directory.
>
> Followup question how should I found the answer for myself. I looks
> basic enough ...
> TIA
One way would be to use find combined with realpath.
find /media/data -exec realpath "{}" \;
That's recursive. If you want only that one directory, limit how deep
it may go:
find /media/data -maxdepth 1 -exec realpath "{}" \;
If that's too long to type out each time, you can make a shell alias or
function that accepts the path as an option and then passes that to find.
/Lars
Reply to: