以下用C符号链接 [英] following symbolic links in C

查看:175
本文介绍了以下用C符号链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我期待写一个C程序,该程序指定符号链接的名称,将打印的文件或目录链接指向的名字。关于如何启动有什么建议?

I'm looking to write a C program which, given the name of symbolic link, will print the name of the file or directory the link points to. Any suggestions on how to start?

推荐答案

请确保您有支持POSIX函数的环境中,包括 unistd.h中,然后使用的readlink 功能。

Make sure that you have an environment which supports POSIX functions, include unistd.h and then use the readlink function.

这篇关于以下用C符号链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆