bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ls: add a switch not to strip the directory we gave


From: Jim Meyering
Subject: Re: ls: add a switch not to strip the directory we gave
Date: Tue, 13 May 2003 18:01:34 +0200

address@hidden (Paul Jarc) wrote:
> Jim Meyering <address@hidden> wrote:
>> Another way to do it, perhaps more accessible :-)
>> is to use realpath (aka readlink --canonicalize), e.g.,
>>
>>   realpath `ls -1t ~/.procmail/bitbucket | sed q`
>
> I don't have this command, so I can't test it, but...
>
>>   readlink --canonicalize `ls -1t ~/.procmail/bitbucket | sed q`

Did you use the name of an existing directory?
If so, I'll bet you're using coreutils-5.0 on a Solaris system.
If not, please let me know.  `readlink --canonicalize' has a few bugs there.
I posted patches for them on bug-coreutils.

> This exits 1 with no output for me.  readlink sees only the basename
> of a file in some directory other than the current directory, so I
> don't think it can possibly construct the full path.

Of course it can, modulo bugs, and permissions.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]