DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-08-05 22:21:34

GZ
Member
Registered: 2009-08-05
Posts: 5

How do I create a symbolic link?

Hello,

I would like to transfer my downloads with bittorrent to the non-RAID volume. The wiki suggests:

"By default, the downloaded files are stored on Volume_1 (HD_a2). To make the files downloaded on Volume_2, create empty folders (complete, incomplete, torrents) on Volume_2 and create symbolic links on HD_a2 pointing on HD_b2."

But how do I create a symbolic link?

What do I write and how do I save it? Is it a file in a special format in the original folder? Or a command with a program? My computer has Windows Vista but that might not matter I guess? The drives volume_1 and volume_2 are mapped in explorer.

Regards,
GZ

Offline

 

#2 2009-08-05 23:45:26

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: How do I create a symbolic link?

Offline

 

#3 2009-08-06 01:17:53

GZ
Member
Registered: 2009-08-05
Posts: 5

Re: How do I create a symbolic link?

fonz wrote:

http://dns323.kood.org/forum/viewtopic.php?id=2648

Ok, thank you.

Is there an easier way to make a symbolic link specifically for the DNS-323? Without reading ten introductory articles about Linux? If not, I will probably just move the files once in a while from one volume to the other and wish I bought another NAS.
: )

Offline

 

#4 2009-08-06 08:04:01

bkamen
Member
From: Central East Illinois, USA
Registered: 2007-07-16
Posts: 80
Website

Re: How do I create a symbolic link?

Soooo, yea...

it would be 'ln' -- but make sure to read the switches.

As for all those "intro" articles... they teach you what's "going on"... without it - you can make disastrous mistakes with the power Unix/Linux gives a user.

I knew a user once who skipped the basics...

He wiped out a server I built for a company using 'rm -rf *' because of that knowledge barrier.

Don't become a statistic yourself. Educate yourself.

-Ben


--
Ben - Don't Ask me how I fixed it - I have no idea what I'm doing!
============================================
http://www.benjammin.net/

Offline

 

#5 2009-08-06 11:06:51

GZ
Member
Registered: 2009-08-05
Posts: 5

Re: How do I create a symbolic link?

Ok I will remember your warning, thank you.

I assumed it would always be the same specific procedure to make a symbolic link from volume_1 to volume_2 on the DNS-323? And the only difference would be folder path and IP?

Edit: I have searched the articles for "symbolic" and had two hits. One of them explained what it was, but not enough for me to make a symbolic link from one volume to the other unfortunately.

I still don't know if I should drop a file with a certain format in the folder with commands, or if I need to connect with a terminal of some kind. In that case I don't know how to connect from Windows to the NAS and what terminal to use? Or if I should connect via software provided by D-link?

But if there is an easy solution to make a specific symbolic link from volume_1 to volume_2 I would love to hear about it.



Instructions about "symbolic link" in general:

"The “ln” utility creates a new directory entry (linked file) which has the same properties as the original file. Symlink (for short) can be thought as a sort of a short-cut known from Windows systems.

There are two kind of such links in Unix/Linux systems:

    * symbolic links - referring to a file - they can be considered as Windows short-cuts,
    * hard links - referring to a disk area, in other words to a physical disk area where a file is located.

If a file to which a symbolic link was created is removed (deleted), the symlink will be listed in red (provided the shell supports colors). If we delete a file with a hard link nothing will happen. The file won’t be erased until the number of hard links equals zero.

All symlinks are created by ln command issued with -s parameter.

adam@laptop:~/Documents/polishlinux.org/examples$ cat file
Symlink example.

adam@laptop:~/Documents/polishlinux.org/examples$ ln -s file
symlink_file

adam@laptop:~/Documents/polishlinux.org/examples$ ls -l
lrwxrwxrwx 1 adam adam    4 2007-06-01 19:11 symlink_file -> file
-rw-r--r-- 1 adam adam   22 2007-06-01 19:10 file

adam@laptop:~/Documents/polishlinux.org/examples$ rm file

adam@laptop:~/Documents/polishlinux.org/examples$ ls
symlink_file

The above listing shows symbolic link in action. ls (with -l) tells us the number of hard links for a “file” file remained the same. Contrary to the below example where number of two hard links had diminished to one after a file deletion and the “file” file was still present.

adam@laptop:~/Documents/polishlinux.org/examples$ ln file hardlink_file

adam@laptop:~/Documents/polishlinux.org/examples$ ls -l
-rw-r--r-- 2 adam adam   22 2007-06-01 19:11 hardlink_file
-rw-r--r-- 2 adam adam   22 2007-06-01 19:11 file

adam@laptop:~/Documents/polishlinux.org/examples$ rm file

adam@laptop:~/Documents/polishlinux.org/examples$ ls -l
-rw-r--r-- 1 adam adam   22 2007-06-01 19:11 hardlink_file"

Last edited by GZ (2009-08-06 13:05:24)

Offline

 

#6 2009-08-06 23:12:39

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: How do I create a symbolic link?

You have much to learn, young Padawan.

In order to create a symbolic link on your NAS, you need to have command line access to your DNS-323.

The easiest way to get command line access is to run a telnet server on the DNS-323. 
(the telnet server is not part of the D-Link stock firmware)

The easiest way to get a telnet server running on your DNS-323 is to run FFP (Fonz Fun Plug) http://dns323.kood.org/howto:fun_plug

Once you have FFP installed and a telnet server running,
you can use a windows telnet client such at Putty http://www.chiark.greenend.org.uk/~sgtatham/putty/ to access the DNS-323.
to gain command line access to make your symbolic link. 
You may also need to create a script to re-create this symbolic link after each re-boot.

Quick-start version:
1. install FFP on your DNS-323
2. install Putty on your Windows box
3. Read through the 10 article about Linux that Fonz suggested.
   ("With great power, there must also come great responsibility." - Ben Parker)
4. telnet to your DNS-323 and get command line access and make your symbolic link

Last edited by mig (2009-08-06 23:18:12)


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#7 2009-08-07 00:26:44

GZ
Member
Registered: 2009-08-05
Posts: 5

Re: How do I create a symbolic link?

Many thanks!
smile

Your instructions gave me a clear view on what level of work this requires and how to attack this task. I am not fumbling in the dark any more, thank you!

Regards,
GZ

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB