From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Dereferencing a symlink...or that alike...
Date: Sat, 17 Aug 2013 22:05:59 -0700 [thread overview]
Message-ID: <130817220559.ZM3201@torch.brasslantern.com> (raw)
In-Reply-To: <20130818024002.GC3129@solfire>
On Aug 18, 4:40am, meino.cramer@gmx.de wrote:
}
} suppose I have the following symlink in my $HOME
}
} etcetera -> /etc
}
} . Is there a way to get back "/etc" only (not the contents
} of /etc/. nor "etcetera") when doing a 'ls' or such?
Depends on what is covered by "or such" ...
% zmodload zsh/stat
% zstat +link etcetera
/etc
However, that prints nothing if the file is not a symbolic link.
I don't know of any external utility that will print *only* the target
of the symlink. E.g.
% /usr/bin/stat --format=%N etcetera
'etcetera' -> '/etc'
next prev parent reply other threads:[~2013-08-18 5:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-18 2:40 meino.cramer
2013-08-18 4:30 ` Phil Pennock
2013-08-18 5:05 ` Bart Schaefer [this message]
2013-08-19 4:13 ` Phil Pennock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=130817220559.ZM3201@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).