Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #175808
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: [Newbie] Can ls command format output my way? |
| Date | 2016-12-18 16:50 +0100 |
| Message-ID | <sPLSN-1za-13@gated-at.bofh.it> (permalink) |
| References | <sPppg-31r-9@gated-at.bofh.it> <sPpyW-34V-11@gated-at.bofh.it> <sPqEG-3ZR-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 12/17/2016 10:59 AM, David Wright wrote:
> On Sat 17 Dec 2016 at 17:57:26 (+0200), Lars Noodén wrote:
>> 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.
>
> To get the format as the OP displayed it, you may also need to pipe
> the output through sort.
>
> But bear in mind that, using realpath, the output could have files
> rooted all over the place (eg try with /etc/systemd/), so after
> sorting them, files that you thought would appear together may well
> get separated.
>
> man find will make a good long read during the Polar Vortex!
This Vortex won't last long enough.
Several of the responses I've received are opening my eyes to
what can be done with some straight forward (if not simple) shell
commands.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[Newbie] Can ls command format output my way? Richard Owlett <rowlett@cloud85.net> - 2016-12-17 16:50 +0100
Re: [Newbie] Can ls command format output my way? Lars Noodén <lars.nooden@gmail.com> - 2016-12-17 17:00 +0100
Re: [Newbie] Can ls command format output my way? David Wright <deblis@lionunicorn.co.uk> - 2016-12-17 18:10 +0100
Re: [Newbie] Can ls command format output my way? Richard Owlett <rowlett@cloud85.net> - 2016-12-18 16:50 +0100
Re: [Newbie] Can ls command format output my way? emetib <chadbrabec@gmail.com> - 2016-12-18 19:10 +0100
Re: [Newbie] Can ls command format output my way? The Wanderer <wanderer@fastmail.fm> - 2016-12-17 17:00 +0100
Re: [Newbie] Can ls command format output my way? Kushal Kumaran <kushal@locationd.net> - 2016-12-17 17:10 +0100
THANK YOU [Re: [Newbie] Can ls command format output my way?] Richard Owlett <rowlett@cloud85.net> - 2016-12-17 18:20 +0100
Re: [Newbie] Can ls command format output my way? emetib <chadbrabec@gmail.com> - 2016-12-17 19:00 +0100
csiph-web