由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - A question about symbolic link
相关主题
gcc in mac OSXawk question
Shell Questionequivilent $REMOTEHOST in ksh
[转载] any fast way to learn Yak? (bison and flex)帮帮忙,用C作一个SHELL
FTP Help请教一个shell script的问题
Is there any software can D/L a whole directory?Help on get an integer from a date string
A simple question![转载] Perl text parsing
[转载] 问一个问题[转载] CVS question
multiple file copySolaris底下没有类似getopt_long的call?
相关话题的讨论汇总
话题: symbolic话题: link话题: directory话题: question话题: way
进入Unix版参与讨论
1 (共1页)
c*y
发帖数: 137
1
Hi,
Is there an easy way to tell whether a symbolic link is pointing to a
directory or a single file?
I know you can try to CD into the symbolic linked item and parse the server
response to see if it's a directory or not. Any cleaner/simpler way to do
this?
Thanks very much.
c******y
发帖数: 37
2
ls -FLd /path/to/soft_link

If you see a '/' at the end of the output,
the soft link is pointed to a directory.

【在 c*y 的大作中提到】
: Hi,
: Is there an easy way to tell whether a symbolic link is pointing to a
: directory or a single file?
: I know you can try to CD into the symbolic linked item and parse the server
: response to see if it's a directory or not. Any cleaner/simpler way to do
: this?
: Thanks very much.

c*y
发帖数: 137
3
Thanks!
ls -L will also do, it will list the information of the linked item, rather
than the link itself.

server

【在 c******y 的大作中提到】
: ls -FLd /path/to/soft_link
:
: If you see a '/' at the end of the output,
: the soft link is pointed to a directory.

1 (共1页)
进入Unix版参与讨论
相关主题
Solaris底下没有类似getopt_long的call?Is there any software can D/L a whole directory?
YACC tables (yyact, yypact, yypgo ...) 的问题 (转载)A simple question!
脚本编程求助: BC的使用[转载] 问一个问题
how to sscanf this case.multiple file copy
gcc in mac OSXawk question
Shell Questionequivilent $REMOTEHOST in ksh
[转载] any fast way to learn Yak? (bison and flex)帮帮忙,用C作一个SHELL
FTP Help请教一个shell script的问题
相关话题的讨论汇总
话题: symbolic话题: link话题: directory话题: question话题: way