473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Symbolic links

TK
Hi,

I have to know whether a typical file (under Linux) a symbolic link is
(in the sense of the stat()-Funktion). How can I check it excactly?

Thanks for help.

o-o

THomas
Oct 10 '06 #1
4 3350
TK <to****@web.dewrote:
I have to know whether a typical file (under Linux) a symbolic link is
(in the sense of the stat()-Funktion). How can I check it excactly?
Sorry, but you got the wrong newsgroup: what you are looking for is
a system-specific (and thus non-standard) extension to C and that's
better discussed in the appropriate groups, e.g. comp.unix.programmer
or comp.os.linux.development.apps.

<OffTopic>
Since you already know about the stat(2) function have another look at
its man page and especially check for the S_ISLNK macro to be applied
to the 'st_mode' field of the structure returned by the function.
</OffTopic>
Regardsm Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
Oct 10 '06 #2
TK wrote:
Hi,

I have to know whether a typical file (under Linux) a symbolic link is
(in the sense of the stat()-Funktion). How can I check it excactly?
Ask in a newsgroup for programming on linux/unix.

In the meantime read man 2 stat, it should teach you how.
Oct 10 '06 #3


On Oct 10, 7:39 pm, TK <tok...@web.dewrote:
Hi,

I have to know whether a typical file (under Linux) a symbolic link is
(in the sense of the stat()-Funktion). How can I check it excactly?

Thanks for help.

o-o

THomas
This is off topic here. You'd better post this to comp.unix.programmer.
But your question is easy to answer. You can check the attribute of the
file directly. And do remember: "the C function lstat gives you the
status of a file regardless of whether it's a normal file or a symbolic
link, the stat function follows symbolic links and, if the specified
file was a symbolic link, returns the status of the linked-to file."

Oct 10 '06 #4
TK
TK wrote:
Hi,

I have to know whether a typical file (under Linux) a symbolic link is
(in the sense of the stat()-Funktion). How can I check it excactly?

Thanks for help.

o-o

THomas
Thanks for the tipps.

o-o

Thomas
Oct 10 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: ozarks | last post by:
I want to setup a database symbolic link within Windows XP to a network drive which has significanlty more space available and can't seem to get it working. Here is my setup.... - I am running...
0
by: Mark Everett | last post by:
Hi, I am runnign the latest version of mysql and I desperately need to move one of my tables from a database so that it is stored on another drive. I have read the symbolic links reference...
22
by: mp | last post by:
i have a python program which attempts to call 'cls' but fails: sh: line 1: cls: command not found i tried creating an alias from cls to clear in .profile, .cshrc, and /etc/profile, but none...
0
by: humbleaptience | last post by:
Hey Ya'll, I basically have a bunch of unix servers with a dataset scrambled through about 10 of them. On unix, I maintain a symbolic link file tree so that for each server it appears to have...
0
by: xhunga | last post by:
* Symbolic computation with the language c : The Derivative step by step. (Windows,Linux) You can find some examples into the file a_exampl.txt @ @
1
by: Remote_User | last post by:
Hi All, .NET 1.1 doesn't support creating symbolic links to files, like in Linux? Can i use C# to make a file point to another file? Thanks.
1
by: amygrant1701 | last post by:
Hi, I've done this before so I don't see what I could doing wrong here. I'm running mysql 5x on freebsd. I'm using the default data directory of "/var/db/mysql" In there I have several dozen...
2
by: Desmodromic | last post by:
Informix recommend that symbolic links be used for chunks. These links are then used in the dbspace definition. Does this advice hold for DB2? The equivalent would be to create symbolic links...
1
by: sora | last post by:
Hi, I've developed a MFC program under VS 6.0. My debugger *was* working fine and I've used it often for my project. Then, one day, the errors below appear and they prevent me from using the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.