LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-16-2005, 10:45 AM   #1
unix20009876
LQ Newbie
 
Registered: Nov 2005
Posts: 11

Rep: Reputation: 0
how to download a symlink file?


I use coreftp to download and upload files, but it displays symlink file www as a directory.

I want to download the symlink file www, but I can not find a software to do that, any help?

thx
 
Old 11-16-2005, 11:06 AM   #2
okmyx
Member
 
Registered: May 2004
Location: Cornwall, UK
Distribution: Ubuntu 8.04
Posts: 464

Rep: Reputation: 31
symlinks are symbolic links to other files or folders ( windows translation: shortcuts )

It sounds like this symlink links to a directory, hence the result your getting.

Why do you need to download a symlink? there isn't going to be any data in the file.
 
Old 11-16-2005, 11:28 AM   #3
unix20009876
LQ Newbie
 
Registered: Nov 2005
Posts: 11

Original Poster
Rep: Reputation: 0
no data inside?
I want to read its data!
 
Old 11-16-2005, 11:34 AM   #4
RedShirt
Senior Member
 
Registered: Oct 2005
Location: Denver
Distribution: Sabayon 3.5Loop2
Posts: 1,150

Rep: Reputation: 45
It doesn't have data. It is a shortcut. It is comprised wholly of a link to another location, that's it.
 
Old 11-16-2005, 11:37 AM   #5
unix20009876
LQ Newbie
 
Registered: Nov 2005
Posts: 11

Original Poster
Rep: Reputation: 0
mate,
shortcut files contain a lot of data.
if there is no data inside, how does it redirect to other places?
 
Old 11-16-2005, 11:43 AM   #6
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 115Reputation: 115
The only stuff in a symlink is to point to another file. We would rather not call all stuff "data", just useful stuff.
 
Old 11-16-2005, 11:44 AM   #7
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
unix20009876>

Windows shortcuts are files with metadata.

*NIX (and NTFS) symbolic links to files. Symlinks have no metadata as they are merely pointers to other files. When you "open" a symbolic link, you are actually opening the file it references, and not the symbolic link itself.
 
Old 11-16-2005, 01:07 PM   #8
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
If you want to read the value of a symbolic link readlink is the program you want to use.

Example:

Code:
j_shaw@jshaw /usr/src $ readlink linux
linux-2.6.14-gentoo-r2/
So as you can see, on this particular system, the /usr/src/linux symbolic link contains "linux-2.6.14-gentoo-r2/". What a symbolic link actually contains is the absolute path from the current location to where the read file/directory is. This is in contrast to a hardlink which simply contains an inode (and thus isn't possible across partitions).
 
Old 11-16-2005, 04:31 PM   #9
unix20009876
LQ Newbie
 
Registered: Nov 2005
Posts: 11

Original Poster
Rep: Reputation: 0
thanks to all,
now i know the concept of symlink files.

but:
1) can a symlink file point to multiple places or just one?
2) any comments for using VC++ on Windows OS to read info of a symlink file? now I am developing a VC++ program for company and need the tech.
 
Old 11-16-2005, 05:24 PM   #10
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
Quote:
Originally posted by unix20009876
thanks to all,
now i know the concept of symlink files.

but:
1) can a symlink file point to multiple places or just one?
Just one (failover SANs aside)

Quote:
2) any comments for using VC++ on Windows OS to read info of a symlink file? now I am developing a VC++ program for company and need the tech.
Hmm, Well, there is an API for accessing hard links on NTFS in MSDN but you don't want to use it. Really. Here's why:

1. While the filesystem itself supports it, support elsewhere in the OS is weak (e.g., you never see link functions accessed or manipulated anywhere in the GUI)
2. Whether or not third-party maintenance tools (NAV, NDD, speed disk, etc) deal with them gracefully is unknown
3. Unless the user has Unix for Windows (or GNU utilities) or the Resource Kit installed, they can't update/delete/etc. the links gracefully

Also: Good luck finding info on NTFS symbolic links. While the filesystem itself supports symbolic links, documentation/specs on NTFS symbolic links are scarce to nonexistent - and they are not quite the same as symbolic links on *nix filesystems. Again, how third-party utilities will interact with those undocumented and seldom-used features is unknown, so if you implement and use those features: TEST, TEST, TEST and RETEST. Perform both unit and integration testing in isolation prior to deploying any code using these features.

Here's a utility for creating hard links on NTFS, along with source (so you can use it as a reference): http://forge.novell.com/modules/xfmod/project/?ntfslink


Note that the Novell utility refers to hard links - which are different from symbolic links.

Other resources:

http://www.pcguide.com/ref/hdd/file/...Reparse-c.html
http://answers.google.com/answers/threadview?id=341355

In Vista, expect better symbolic link support (more *nix-like) as Microsoft moves to a more *nix-like architecture, but I wouldn't expect an exact parallel until Microsoft finishes rebranding BSD with Microsoft logos as they recompile^H^H^H^H^H^H^H, er, innovate. (sorry, couldn't resist the anti-M$ jab)
http://www.sysinternals.com/Utilities/Junction.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fast Download Site for Linux, enables >4GB Download of single file TigerLinux Linux - Distributions 9 10-29-2005 12:45 PM
symlink from ares download folder desheikh Linux - Newbie 2 09-19-2005 02:47 PM
Konqueror wont download download TAR,ZIP file but preview Velocide Linux - Newbie 0 03-22-2004 06:07 AM
*.h file download.. eye Linux - Software 1 06-03-2003 04:17 AM
how do i download this file? doublefailure Linux - General 4 09-01-2002 06:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration