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.
|
|